Pagination Handling for API Responses
    • Dark
      Light

    Pagination Handling for API Responses

    • Dark
      Light

    Article summary

    • If no additional records are available, the response has an empty or null value for the sort key, meaning you reached the end of the data.

    • If the sort key has a value, use it in the searchAfter key in the next request to fetch the next set of records.

    Note:

    searchAfter key is an array of values.

    The following example explains how to paginate through records until all data is retrieved using the searchAfter key.

    {
        "limit": 1,
        "objectType":"interaction",
        "searchAfter": ["001f6384-013d-4c4a-ba0d-94a6b2692a76"],
        "condition": {
            "type": "booleanCondition",
            "parameterValues": {
                "operator": "and",
                "subConditions": [
                    {
                        "type": "profilePropertyCondition",
                        "parameterValues": {
                            "propertyName": "properties.CampaignID.keyword",
                            "comparisonOperator": "equals",
                            "propertyValue": "Collection"
                        }
                    }
                ]
            }
        }
    }

    To learn more about how Data Cloud handles phone numbers, dates, and date-times, refer to the topic Handling Phone Numbers and Date Formats in the Administrator Guide.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.