Example 9092
API Mock
Mock API response payloads for testing.
# Mock API definition
{
endpoint: "/api/v1/users"
method: "GET"
status: 200
# JSON response body
response: """
[
{
"id": 1,
"name": "Becky Kreiger",
"email": "Lexus.Stroman67@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Felix Marquardt",
"email": "Billie.Jakubowski@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "ea3b282c-a2b0-4cf2-991b-9a1d75192d8c"
}
delay_ms: 102 # simulated latency
}