Example 15396
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": "Rick Smith",
"email": "Norma.Macejkovic@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Ms. Asia Jacobson",
"email": "Ross_Marvin87@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "c3d8aaa2-f15b-4cf9-935f-5842611360d8"
}
delay_ms: 454 # simulated latency
}