Example 17190
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": "Van Prosacco",
"email": "Breanne_Rowe96@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Bria White",
"email": "Ludwig_Bradtke@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "59357f47-193c-4fd7-a119-b5c5b346c9da"
}
delay_ms: 232 # simulated latency
}