Example 12694
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": "Lucas Lesch",
"email": "Emmanuelle.Sawayn-OKon72@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Cecelia Trantow",
"email": "Omer.Connelly@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "b95e2d3c-c801-4fcb-a8f9-f1e774b8918c"
}
delay_ms: 268 # simulated latency
}