Move a cursor and get records
Complete the tutorial setup.
Paste this code into the API Request editor.
{ "api": "db", "action": "getRecordsFromCursor", "params": { "cursorId": "clickApplyDefaultsToReplaceThisWithTheLastCreatedCursor", "startFrom": "beforeFirstRecord", "skipRecords": 1, "fetchRecords": 1 }, "authToken": "clickApplyDefaultsToReplaceThisWithValidAuthToken" }
Click Apply defaults to JSON request () to set the
"authToken"
to a valid value.Note
Clicking the Apply defaults to JSON request icon populates the
"cursorId"
with the most recent value returns bygetRecords
action.Click Send request ().
Continue to click Send request to move through the records.
Note
The same code fetches different records each time it is run because each call moves the cursor position.
To fetch records from different locations in the recordset, change the values of
"startFrom"
,"skipRecords"
, and"fetchRecords"
.Verify the action completed successfully.
Note
"errorCode"
with a value of0
indicates success."errorCode"
with a non-zero value indicates a failure. See Errors and contact FairCom for more information about an error.The API Explorer automatically recognizes the
"cursorId"
in a response and remembers it so when you select the"getRecordsFromCursor"
from the JSON Actions dropdown menu, API Explorer automatically populates the action with the latest"cursorId"
value to simply using cursors.The
"cursorId"
property is secure because it is a very large crypto-random number — for example,"cursorId": "w0gs3RZz8eD5Qtf0VuQ9V86tsd85IdlvMwUocQwK0U548ew5RlXpNIP0tyaVVX0w"
.