Example 9391
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": "Danny Bailey",
"email": "Judson.Thompson58@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Catherine Konopelski",
"email": "Rebeca24@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "3e092504-de32-409a-a234-c34fdb8ecedb"
}
delay_ms: 54 # simulated latency
}