Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Type

Description

Required Keys

Optional Keys

Success

All went well, and (usually) some data was returned.

status, data

Fail

There was a problem with the data submitted, or some pre-condition of the API call wasn't satisfied

status, data

Error

An error occurred in processing the request, i.e. an exception was thrown

status, data

code, data

Example response type

  • successSuccess

Paste code macro
languagejson
themeSunburst
{
    status : "success",
    data : {
        "tag_1" : [ .... ],
        "tag_2" : [ .... ]
    }
}

{
    status : "success",
    data : { "id" : 2, "title" : "Another blog post", "body" : "More content" }
}

{
    status : "success",
    data : null
}
  • fail Fail : When an API call is rejected due to invalid data or call conditions.

paste-code-macro
languagejson
themeSunburst
{
    "status" : "fail",
    "data" : { "title" : "A title is required" }
}
  • error Error : When an API call fails due to an error on the server.

paste-code-macro
languagejson
themeSunburst
{
    "status" : "error",
    "message" : "Unable to communicate with database"
}

...