Appearance
1099 - 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": "Twila Marks",
"email": "Eric.Schulist13@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Mr. Kenya Konopelski I",
"email": "Eddie92@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "bb8f8149-4996-42ff-bd47-a91af8af7d3d"
}
delay_ms: 427 # simulated latency
}