Many API services return paginated lists of objects. We follow a consistent convention for all of our lists, which is compatible with the Mason format. Following is an example list output:

{
    "filters": {},
    "sort": {},
    "total": 42,
    "offset": 0,
    "limit": 3,
    "items": [
        {
            "id": 123,
            "name": "Human"
        },
        {
            "id": 456,
            "name": "Vulcan"
        },
        {
            "id": 789,
            "name": "Ferengi"
        }
    ]
}

Each property is defined below.

PropertyData TypeDescription
filtersObjectFilter options that were requested, if any. See List Inputs for details.
sortObjectSorting options that were requested, if any. See List Inputs for details.
totalIntegerGrand total of all items found
offsetIntegerNumber of items skipped. See List Inputs for details.
limitIntegerMaximum number of items shown in this page of results. See List Inputs for details.
itemsArrayList of objects included in this page of results