Example 3183
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": "Georgia O'Reilly",
"email": "Jonathon.Marks@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Daniella Metz",
"email": "Elfrieda_Schumm34@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "03f2ba67-d86f-468b-859b-f7a71bff10a5"
}
delay_ms: 465 # simulated latency
}