Example 13595
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": "Laura Daugherty",
"email": "Adriel67@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Jared Heaney-Rippin",
"email": "Xander.Block@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "8a7d3ae3-0b53-4455-a526-f86dfb92afd6"
}
delay_ms: 125 # simulated latency
}