Example 16886
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": "Juvenal Ferry PhD",
"email": "Marcus49@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Chad Skiles",
"email": "Eulalia.Wintheiser27@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "42927e9b-782e-492d-b459-569a687da5d2"
}
delay_ms: 270 # simulated latency
}