Example 7498
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": "Dixie Ankunding",
"email": "River63@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Travis Okuneva",
"email": "Estella_Wilkinson1@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "7e6e8af6-5c00-47b2-ac95-3ec055c08a85"
}
delay_ms: 83 # simulated latency
}