Appearance
694 - API Mock
Mock API response payloads for testing. This is an example of a MAML document.
maml
# Mock API definition
{
endpoint: "/api/v1/users"
method: "GET"
status: 200
# JSON response body
response: """
[
{
"id": 1,
"name": "Whitney Hodkiewicz",
"email": "Kate77@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Glen Herzog MD",
"email": "Vicente20@hotmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "a3bf10c9-497b-46f2-93d8-1350f8a63d25"
}
delay_ms: 416 # simulated latency
}