Success or error, it's easy to tell.
FormatResponses are always going to be json, unless specified otherwise.
Successful Response
You should see the following response structure when you provide a valid request, that does not error out.
{
"body": {
"examples": [
{
"PK": "123abc",
"ts": 1665556443,
"name": "Cheese",
}
]
},
"success": true,
"message": "Optional message goes here"
}- Successful responses will have a
success:truebool set. - When data is returned, it's in the
body.controllerNamearray. Above assumes "examples" controller. - Every unique object has a primary key, denoted by the
PKfield.
Failure / Error
If you receive an error, it will look like this.
{
"body": [],
"success": false,
"error": {
"message": "Error message goes here",
"code": _ERROR_CODE_
}
}- Error responses will have a
success:falsebool set. bodywill be an empty array.errorobject will containmessageandcode.- First 3 digits of the error code will match the HTTP status code.
