Example 14597
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": "Lila O'Hara",
"email": "Rafael85@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Marcos Cremin-Klocko",
"email": "Stewart.Spencer40@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "fed7bd2b-40a0-4647-aaf0-d57034c4db8c"
}
delay_ms: 171 # simulated latency
}