Example 3293
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": "Elaine Hayes DVM",
"email": "Lonie46@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Kyle Stiedemann",
"email": "Hyman.Macejkovic@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "e78f0912-0750-4c21-9424-52611b9a3f3c"
}
delay_ms: 171 # simulated latency
}