404 Error When Using record_cursor in ZOHO.CREATOR.DATA.getRecords (js api)

404 Error When Using record_cursor in ZOHO.CREATOR.DATA.getRecords (js api)

Iam working on fetching all records from a Zoho Creator report using the Get Records API (V2.1) with the following recursive function:

js
CopyEdit
// Recursive function to fetch records using record_cursor from the response function fetchAllRecords(recordCursor = null) { // Build the configuration for the API call const config = { app_name: "", report_name: "", max_records: maxRecordsPerCall, ...(recordCursor && { record_cursor: recordCursor }) }; ZOHO.CREATOR.DATA.getRecords(config) .then(function (response) { console.log("Fetched Records:", response.data); // Append the current batch of records allRecords = allRecords.concat(response.data); // ... (additional code) }) .catch(function (error) { console.error("Error fetching records:", error); // ... (error handling) }); }

I’m receiving a 404 error when a record_cursor is included in the config for subsequent API calls. According to the documentation, I should be able to include record_cursor in the configuration object to fetch the next batch of up to 1000 records, but it seems like something isn’t working as expected.

Details:

  • I'm using the documented API call for Get Records (REST API V2.1).

  • The initial call (without record_cursor) works fine.

  • Once there are more than 1000 records, a record cursor is returned, and including it in the config causes a 404 error.

Questions:

  • Has anyone experienced a similar issue when using record_cursor in the config?

  • Is there a known issue or a specific way to pass the record_cursor (e.g., as a header vs. in the POST body) that I'm overlooking?

  • Could the issue be related to the API version or any other configuration details?

Any insights or suggestions would be greatly appreciated. Thanks in advance for your help!