Web API Response Format
All responses are in JSON formatted in a specific way.
Responding to GET a single entity record
{
"success": true,
"message": "Nisi proident tempor cillum sint duis eu elit dolor Lorem amet qui officia occaecat.",
"timestamp": "2014-03-03T23:20:23Z",
"errors": [],
"object": {
"id": 1,
}
}
Returning to GET a list of objects
{
"success": true,
"message": "Nisi proident tempor cillum sint duis eu elit dolor Lorem amet qui officia occaecat.",
"timestamp": "2014-03-03T23:20:23Z",
"errors": [],
"object": [
{
"id": 1,
},
{
"id": 1,
}
]
}
Returning to POST,PUT,DELETE an object
{
"success": false,
"message": "Nisi proident tempor cillum sint duis eu elit dolor Lorem amet qui officia occaecat.",
"timestamp": "2014-03-03T23:20:23Z",
"errors": [
{
"key": "url",
"value": "",
"message": "URL cannot be blank"
}
],
"object": {
"id": 1,
}
}
Properties
name | description |
---|---|
errors |
object type: default value: `` list of error objects returned during the method execution. It is empty when no errors are reported. The object format is:
|
message |
object type: default value: Method execution result in human readable form. Often provided to the end-user as a feedback |
object |
object type: default value: The object returned by the method. |
success |
object type: default value: Whether the method execution is successfully completed |
timestamp |
object type: default value: `` when the method was executed in ISO 8601 date string and UTC time zone |