Skip to content

Pagination


For requests that return a list of objects, pagination is available. To use it, add the following parameters to your request:

Parameter Type Description
page int Page number
size int Number of objects displayed per page

If you do not specify the number of objects per page, the default is 10.

The pagination object contains two main objects: _embedded and page.

Structure and description of the JSON object _embedded:

The _embedded object has a single field containing an array. The field name may differ depending on the object type:

For users

Field Type Description
userList array Array of user objects

For projects

Field Type Description
projectList array Array of project objects

For teams

Field Type Description
teamList array Array of team objects

For companies

Field Type Description
companyList array Array of company objects

Structure and description of the JSON object page:

Field Type Description
size number Maximum number of items displayed per page
totalElements number Total number of items
totalPages number Total number of pages
number number Current page

Example request parameters

Request: /user?page=2&size=2

Returned JSON:

        
{
    "_embedded": {
        "userList": [
            {
                "id": "61e8fd05-aaaa-aaaa-aaaa-db72c2c33326",
                "username": "user1",
                "name": "name",
                "surname": "surname",
                "fullName": "name surname",
                "avatar": "https://gitflic.ru/upload/img/6ea2b7e0-aaaa-aaaa-aaaa-7120f2ce03c1.jpg"
            },
            {
                "id": "25a7e267-aaaa-aaaa-aaaa-b9842af9804d",
                "username": "user2",
                "name": "name",
                "surname": "surname",
                "fullName": "name surname",
                "avatar": "https://gitflic.ru/upload/img/6ea2b7e0-aaaa-aaaa-aaaa-7120f2ce03c1.jpg"
            }
        ]
    },
    "page": {
        "size": 2,
        "totalElements": 12,
        "totalPages": 6,
        "number": 2
    }
}
        
    

Automated translation!

This page was translated using automatic translation tools. The text may contain inaccuracies.