Example 14290
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": "Chester Reichel DDS",
"email": "Leroy48@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Lexus Halvorson",
"email": "Cora63@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "b792b20a-7da6-48fd-8593-fb1d73d00df3"
}
delay_ms: 285 # simulated latency
}