Example 9196
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": "Gladys Mohr",
"email": "Vivianne20@gmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Mason Emard",
"email": "Antonio.Kshlerin@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "e73f2a69-13eb-41d8-a454-c7cd4a7e9fc3"
}
delay_ms: 141 # simulated latency
}