Cirqll Core
HomeCirqll
HomeCirqll
  1. Query Parameters
  • Query Parameters
    • Eager Loading
    • Partial Data
    • Count Relations
    • Pagination
      • Filter
      • Order By
  • Authentication
    • OAuth2
      • Authorize
        • Authorize
      • User
        • Me
      • Client
        • Index
        • Create
        • Update
        • Delete
      • Token
        • Create
        • Refresh
        • Index
      • Scopes
  • User
    • Index
      GET
    • Show
      GET
    • Create
      POST
    • Update
      PATCH
    • Delete
      DELETE
  • Role
    • Index
      GET
    • Show
      GET
    • Create
      POST
    • Update
      PATCH
    • Delete
      DELETE
  • Customer
    • Index
      GET
    • Show
      GET
    • Create
      POST
    • Update
      PATCH
    • Delete
      DELETE
  • Contact
    • Index
      GET
    • Show
      GET
    • Create
      POST
    • Update
      PATCH
    • Delete
      DELETE
  • Appointment
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Task
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Financial
    • Chance
      • Index
      • Show
      • Create
      • Update
      • Delete
    • Assignment
      • Index
      • Show
      • Create
      • Update
      • Delete
    • Contract
      • Index
      • Show
      • Create
      • Update
      • Delete
  • Email
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Field
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Note
    • Index
    • Show
    • Create
    • Update
    • Delete
  • To-do
    • Index
    • Show
    • Create
    • Update
    • Delete
  • Template
    • Index
    • Show
    • Update
    • Create
    • Delete
  • Setting
    • Index
    • Update
  • Webhook
    • Index
    • Show
    • Create
    • Update
    • Delete
  1. Query Parameters

Pagination

Every index endpoint returns paginated data. This data can be mutated by using Eager Loading or Partial Data. Check out the documentation on how to use those to get only the needed fields.

Paginate#

An index request always returns the following structure:
Pagination
data
array [object] 
required
The items
limit
integer <uint>
required
The maximum amount of items that were fetched
The actual count of the data may be lower than this number
>= 1
Default:
100
total
integer <uint>
required
The total number of items that exist
filter is taken into account
>= 0
offset
integer <uint>
required
The item offset
If total is more than the limit, then the offset is used to fetch the other pages. pages=total/limit, to get page 3 use offset=total/limit*3
>= 0
Default:
0
With limit, total and offset you can create your own pagination system. If for example you want to show the amount of pages, you can use Math.ceil(total / limit). To go to a specific page; use limit * (page - 1). This will calculate the offset for the specified page. Page one would return zero; page two would return limit.
Offset pagination can result in data not being fetched or being fetched twice.
For example: Someone is adding a resource which should be showing up in page 1, but you are already fetching page 2. Page 1 just became bigger by one, so page 2 will see the last item of page 1 at the top of the list again.
Eventually we will add a Continuation Token to fix this problem.
Modified at 2025-01-26 14:07:40
Previous
Count Relations
Next
Filter
Built with