Skip to main content

Use cursor to get records by index

Adding "returnCursor": true to any getRecords action is the fastest and most efficient way to paginate data, see Get records from cursor.

To return a cursor, add the property "returnCursor": true to a getRecords action, the response contains a cursorId property that you use in the "getRecordsFromCursor" action to retrieve records from the cursor.

This procedure returns a cursor that can retrieve records from the "athlete" table in sorted order.

  1. Paste this code into the API Request editor.

    {
        "action": "getRecordsByIndex",
        "params": {
            "tableName": "athlete",
            "indexName": "admin_athlete_name",
            "returnCursor": true
        },
        "authToken": "clickApplyDefaultsToReplaceThisWithValidAuthToken"
    }
    
  2. Click Apply defaults to JSON request (Apply) to set the "authToken" to a valid value.

  3. Click Send request (Run Icon).

  4. Verify the action completed successfully.

    Note

    "errorCode" with a value of 0 indicates success. "errorCode" with a non-zero value indicates a failure. See Errors and contact FairCom for more information about an error.

  5. Copy and save the "cursorId" from the API Response to use in subsequent calls to "getRecordsFromCursor".