Example 15083
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": "Mr. Fidel Cronin",
"email": "Yadira.Romaguera1@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Velma O'Keefe Jr.",
"email": "Ginger_Kiehn@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "0e4b9901-99c3-410f-9474-32bef50f80ef"
}
delay_ms: 68 # simulated latency
}