Example 7686
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": "Judd Ullrich",
"email": "Elias67@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Mr. Billy Rempel",
"email": "Joe.Rohan19@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "9e17b0d7-f938-4e40-81de-de4f1204327e"
}
delay_ms: 416 # simulated latency
}