Example 8881
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": "Kayleigh Veum",
"email": "Ophelia98@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Lonzo Lindgren V",
"email": "Lee.Lubowitz@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "60894942-e034-461f-9d1e-dc0bbcacd343"
}
delay_ms: 460 # simulated latency
}