Example 15999
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": "Gustavo Swaniawski",
"email": "Shanie.Wisozk34@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Joaquin Hayes",
"email": "Herminio_Hansen47@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "98737397-b1af-487f-be8d-e6b931dc76f9"
}
delay_ms: 312 # simulated latency
}