Example 12499
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 Mante",
"email": "Lori84@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Ted Kuphal III",
"email": "Sherman13@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "af314b35-5dda-4572-b318-d6ac62a5ee6d"
}
delay_ms: 359 # simulated latency
}