Example 6692
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": "Dr. Orville Romaguera",
"email": "Santiago.Hodkiewicz11@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Hugh Parker",
"email": "Lempi24@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "1c5e7fd5-ba8b-41d7-a545-a1668a37f050"
}
delay_ms: 162 # simulated latency
}