Example 6995
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": "Amos Bauch I",
"email": "Ansley76@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Eveline Beer-Metz",
"email": "Lila.Roberts@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "27300b49-b2dc-4f6f-97f0-c0c855b8f205"
}
delay_ms: 277 # simulated latency
}