Skip to main content

Get records by index

Using the "getRecordsByIndex" action without a cursor is the best way to return all records in a table in index order.

Important

The query shown in this procedure returns all records in a table. If your table has more than 100,000 records, you should add the "returnCursor": true property to return a cursor, which allows you to paginate through the table quickly and efficiently, see getRecordsByIndex.

  1. Paste this code into the API Request editor.

    {
        "api": "db",
        "action": "getRecordsByIndex",
        "params": {
            "tableName": "athlete",
            "indexName": "admin_athlete_id_pk"
        },
        "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.