Paging via API

Paging via API



Paging via API.



Introduction


Welcome, this is a tutorial to help understand how to count, offset, sort via API.



As of version, some of the endpoints support query parameters, and . However, the defaults are different by server due to configuration settings.  offset  count  sort.



Query Parameter Information:


Parameter
Example
Description
Format
offset
50
Number of items to "skip" in the query, that is, item return requests, skipping the first items. count offset.
Positive integer.
count
50


How many items to return.

Integer.
sort

{"value": -1, "_id": 1}



List of fields to sort and in which direction.

JSON object, with properties listed in the desired order, with values from ascending or descending 1 ou  -1.
Definições

  • These are the REST API settings related to offset and count. If you need to change them, go to  Administration -> General -> REST API 

    • API_Default_Count (Standard count) Sets the default for when the parameter is not provided count

    • API_Upper_Count_Limit (Maximum registration amount) (Maximum registration amount) - Sets the ceiling for the count and this value will be set if the count is greater. count count

    • API_Allow_Infinite_Count (Allow get everything) determines whether it can be passed to to allow all records to be retrieved..  0 count

    Example

   To limit the results to 5 items and get the third "page", you would provide and . count=5 offset=10

  https://<myoffice>.myhive.global/api/v1/channels.list?count=5&offset=10

  To sort by descending name and ascending status, you must provide sort={"name":-1,"status":1}

  https://<myoffice>.myhive.global/api/v1/users.list?sort={"name":-1,"status":1}


    • Related Articles

    • Disable users via API.

      Disable users via API. Introduction Welcome, this is a tutorial to disable user via API. Note: Disable inactive users. Permission required:    edit-other-user-active-status. Parameters URL Require Authentication Method HTTP ...
    • Set status via API

      Set status via API. Introduction Welcome, this is a tutorial to help set status via API. Defines a user status when status message and status are provided. Arguments: URL Require Authentication Method HTTP /api/v1/users.setAvatar yes POST  Payloads ...
    • Translate message via API

      Translate message via API. Introduction Welcome, this is a tutorial to translate a message via API. Translate the message provided. Arguments URL Require Authentication Método HTTP /api/v1/autotranslate.translateMessage yes POST  Payloads Argument ...
    • Creating user via API.

      Creating user via API. Introduction Welcome, this is a tutorial to login via API Parameters URL Require Authentication Method HTTP /api/v1/users.create yes POST Variables Note: To save customFields, you must first define customFields in the admin ...
    • Set Avatar Image via API

      Set Avatar Image via API. Introduction Welcome, this is a tutorial to set avatar image via API. Uploading a file. Arguments: URL Require Authentication Method HTTP /api/v1/users.setAvatar yes POST Payloads Arguments Example Required Description image ...