Get All Rows In a Table
API Description
This API enables you to fetch all the rows from a particular table in the Data Store. You can refer to the table by its ID or name. The API incorporates pagination for fetching all rows. Pagination allows you to retrieve the records in pages through an iteration of API calls.
For example, if you require the rows to be fetched in batches of 100 as individual pages, you must include a max_rows parameter in your request, that specifies the maximum rows to be fetched in each page as 100.
Additionally, every API response will contain a token that you can pass in the next API call, to fetch the next page of rows. This token authorizes the subsequent fetching of data. You must pass the token string obtained in the response of the previous API call through the next_token parameter in the request. You need not pass the next_token parameter for the first API call. You can execute an API call for each iteration in this manner and fetch all rows in pages.
Request Details
Request URL
https://api.catalyst.zoho.com/baas/v1/project/{project_id}/table/{tableIdentifier}/row?next_token={token_string}&max_rows={number_of_rows}
project_id - The unique ID of the project
tableIdentifier - The unique ID of the table or the table name
next_token (not required for the first API call) - The token value obtained from the previous API call to be passed for fetching the next set of rows through pagination
max_rows (optional)- The maximum number of rows that must be returned in a single page through pagination. The API will return 200 rows in a single page by default if this value is not specified.
Request Header
Authorization: Zoho-oauthtoken 1000.910***************************16.2f****************************57
Request Method
GET
Scope
scope=ZohoCatalyst.tables.rows.READ
Note: This operation can also be executed with Catalyst user authentication permissions using Catalyst SDKs. Refer to the Catalyst API Prerequisites section for details.
Response Details
The response will return the rows that are fetched through the API call in pages based on the max_rows value you specify. If there are rows available more than the requested count or the max_rows count, the response will also contain the token that you must pass to fetch the next set of rows as next_token. If there are no more records to be fetched, the response will not contain a token.
SDK documentation
Sample Request
curl -X GET \
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/table/CustomerDetails/row?max_rows=4&next_token=************* \
-H "Authorization: Zoho-oauthtoken 1000.910***************************16.2f****************************57" Sample Response (If more records available)
{
"status": "success",
"data": [
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:16:41",
"Department_ID": "IT148",
"Department_Name": "Admin",
"Employee_Name": "Eric Hyde",
"CREATEDTIME": "2019-03-06 10:16:41",
"ROWID": 56000000342025,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:18:56",
"Department_ID": "IT170",
"Department_Name": "Sales",
"Employee_Name": "Steven Kelso",
"CREATEDTIME": "2019-03-06 10:18:56",
"ROWID": 56000000342026,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:19:00",
"Department_ID": "IT190",
"Department_Name": "Marketing",
"Employee_Name": "Micheal Forman",
"CREATEDTIME": "2019-03-06 10:18:58",
"ROWID": 56000000342027,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:45:11",
"Department_ID": "IT111",
"Department_Name": "Support",
"Employee_Name": "Madeline Burkhart",
"CREATEDTIME": "2019-03-06 10:18:34",
"ROWID": 56000000342028,
"doubleDataType": null
},
],
"more_records" : true,
"next_token" : "{{token}}"
} Sample Response (If no more records available)
{
"status": "success",
"data": [
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:16:41",
"Department_ID": "IT148",
"Department_Name": "Admin",
"Employee_Name": "Eric Hyde",
"CREATEDTIME": "2019-03-06 10:16:41",
"ROWID": 56000000342025,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:18:56",
"Department_ID": "IT170",
"Department_Name": "Sales",
"Employee_Name": "Steven Kelso",
"CREATEDTIME": "2019-03-06 10:18:56",
"ROWID": 56000000342026,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:19:00",
"Department_ID": "IT190",
"Department_Name": "Marketing",
"Employee_Name": "Micheal Forman",
"CREATEDTIME": "2019-03-06 10:18:58",
"ROWID": 56000000342027,
"doubleDataType": null
},
{
"CREATORID": 56000000002003,
"MODIFIEDTIME": "2019-03-06 10:45:11",
"Department_ID": "IT111",
"Department_Name": "Support",
"Employee_Name": "Madeline Burkhart",
"CREATEDTIME": "2019-03-06 10:18:34",
"ROWID": 56000000342028,
"doubleDataType": null
},
],
"more_records" : false
}