New API version v6.13.17 has been released! 🎉
REST Documentation
Pagination

Pagination

As long as you query lists of data, our REST API always returns paginated responses. By default, the responses are limited to 15 results per page, but you can extend this to up to 100 results per page using the limit parameter.

Structure of the paginated response

In the responses, the objects are nested in a data attribute and the metadata in a meta attribute. There you will also find, among other things, information on how many pages last_page exist and on which page current_page you are currently located. In addition to the aforementioned attributes, there is a links attribute with the URLs to the previous and next pages.

The pagination is hidden in the documentation of our resources in the responses.

Example with limit parameter

In this example, we send a request to the endpoint /api/v1/projects and use the limit parameter to specify that the results should be limited to 20 entries per page.

Response with pagination
{
    "data":[
        {
            "id":"WAz8eIbvDR60rouK"
        },
        {
            "id":"hSIhXBhNe8X1d8Et"
        },
        {
            "id":"fbwYwpi9C2ybt6Yb"
        }
    ],
    "links":{
        "first":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=1",
        "last":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=2",
        "prev":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=1",
        "next":null
    },
    "meta":{
        "current_page":2,
        "from":21,
        "last_page":2,
        "links":[
            {
                "url":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=1",
                "label":"« Previous",
                "active":false
            },
            {
                "url":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=1",
                "label":"1",
                "active":false
            },
            {
                "url":"https://www.zep-online.de/zepinstanz/next/api/v1/projects?page=2",
                "label":"2",
                "active":false
            },
            {
                "url":null,
                "label":"Next »",
                "active":false
            }
        ],
        "path":"https://www.zep-online.de/zepinstanz/next/api/v1/projects",
        "per_page":20,
        "to":32,
        "total":32
    }
}