Pagination

Talent Protocol API will have pagination on endpoints that return sets of data.

How it works

In order to paginate requests API consumers will need to check the pagination field inside each response.

Check the following response example:

{
    passports: [...],
    pagination: {
        total: 100,
        current_page: 1,
        last_page: 10
    }
}

In order to fetch the next page a new request will need to be performed with the page query param being passed as the current_page + 1.

https://api.talentprotocol.com/api/v1/passports?id=<id>&page=<current_page + 1>

You will reach the last page when the current_page is equal to the last_page.

{
    passports: [...],
    pagination: {
        total: 1000,
        current_page: 10,
        last_page: 10,
    }
}

You can learn more about this in the next chapter.

Last updated