Example 9888
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": "Evelyn Kassulke-Gleason",
"email": "Janie.Brekke73@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Ismael Hammes",
"email": "Grady73@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "4785eeca-5bbd-4eaa-9415-218ed8207a27"
}
delay_ms: 347 # simulated latency
}