Example 7000
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": "Stella Becker",
"email": "Michael50@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Carroll Block",
"email": "Lisa_Kunde@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "3747f71a-966d-43aa-9e03-5a2561e355ad"
}
delay_ms: 252 # simulated latency
}