2.3.Response format

2.3.Response format

All endpoints except the attachment download endpoint return JSON:API 1.0 documents. A single-resource response wraps the resource data in a top-level data object; a collection response wraps it in a data array. The resource attributes documented in this chapter are found inside the attributes sub-object of each resource object.

A typical single-resource response skeleton looks like this:

{  "jsonapi": { "version": "1.0" },  "data": {    "type": "tickets",    "id": "42",    "attributes": {      "id": 42,      "title": "Example ticket",      ...    },    "relationships": {      "category": { "data": { "type": "categories", "id": "13" } },      "created_by": { "data": { "type": "users", "id": "851" } }    }  },  "links": {    "self": "https://example.com/api/index.php/v1/ats/tickets/42"  }}

A collection response skeleton looks like this:

{  "jsonapi": { "version": "1.0" },  "data": [    {      "type": "tickets",      "id": "42",      "attributes": { ... },      "relationships": { ... }    }  ],  "links": {    "self": "...",    "first": "...",    "next": "...",    "last": "..."  },  "meta": { "total-records": 100 }}

DELETE requests return HTTP 204 No Content with an empty body on success.