Example 7383
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": "Neoma Dooley",
"email": "Hubert_Spencer@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Edmund Dooley",
"email": "Jordan86@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "596b7ea6-833a-431c-bf50-6c8e0d8278ad"
}
delay_ms: 468 # simulated latency
}