Example 9100
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": "Jovan Kuvalis",
"email": "Shanna.Zboncak55@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Debbie Schaefer",
"email": "Judah84@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "2ffd1ae7-aa56-4434-b576-223c8691a4ab"
}
delay_ms: 429 # simulated latency
}