Example 2895
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": "Kellie Hansen",
"email": "Florencio_Marks88@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Ernestine Blanda",
"email": "Jerry.Christiansen62@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "7660aad2-a9ce-47a1-b355-5f7117387fa7"
}
delay_ms: 206 # simulated latency
}