Examples

GET /api/v2/messages
200
{
  "data": [
    {
      "id": "1",
      "type": "messages",
      "links": {
        "self": "http://test.host/api/v2/messages/1"
      },
      "attributes": {
        "content": "Test message.",
        "created-at": "2017-08-29T10:48:03.995+08:00",
        "is-read": true,
        "is-system-message": false
      },
      "relationships": {
        "attachment": {
          "links": {
            "self": "http://test.host/api/v2/messages/1/relationships/attachment",
            "related": "http://test.host/api/v2/messages/1/attachment"
          }
        },
        "message-group": {
          "links": {
            "self": "http://test.host/api/v2/messages/1/relationships/message-group",
            "related": "http://test.host/api/v2/messages/1/message-group"
          }
        },
        "sender": {
          "links": {
            "self": "http://test.host/api/v2/messages/1/relationships/sender",
            "related": "http://test.host/api/v2/messages/1/sender"
          }
        }
      }
    },
    {
      "id": "2",
      "type": "messages",
      "links": {
        "self": "http://test.host/api/v2/messages/2"
      },
      "attributes": {
        "content": "Test message.",
        "created-at": "2017-08-29T10:48:04.157+08:00",
        "is-read": false,
        "is-system-message": false
      },
      "relationships": {
        "attachment": {
          "links": {
            "self": "http://test.host/api/v2/messages/2/relationships/attachment",
            "related": "http://test.host/api/v2/messages/2/attachment"
          }
        },
        "message-group": {
          "links": {
            "self": "http://test.host/api/v2/messages/2/relationships/message-group",
            "related": "http://test.host/api/v2/messages/2/message-group"
          }
        },
        "sender": {
          "links": {
            "self": "http://test.host/api/v2/messages/2/relationships/sender",
            "related": "http://test.host/api/v2/messages/2/sender"
          }
        }
      }
    }
  ],
  "meta": {
    "total-pages": 1,
    "record-count": 2
  },
  "links": {
    "first": "http://test.host/api/v2/messages?page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "http://test.host/api/v2/messages?page%5Bnumber%5D=1&page%5Bsize%5D=10"
  }
}