REST API v1 - Delete Records
- Zoho Creator's v1 APIs will reach their end-of-life on February 3rd, 2021. We strongly recommend you to migrate to the new v2 APIs. Refer to this post to learn more.
- Accounts in Zoho's Australia data center (.com.au) can only use Creator's v2 APIs
- Corresponding v2 APIs: Delete Records and Delete Record by ID
Table of Contents
URL
When accessed by the application owner:
When accessed by a shared user:
where,
<ownername> | This is the admin username which can be obtained using zoho.adminuser or zoho.appuri variables (refer to this page). You can also view your app's URL in the URL bar of your web browser. |
<applicationName> , <formName> and <viewName> | These are the link names of your application, form and report (that is shared with the users), respectively. They can be found here. |
<format> | This is the format in which you want the API to respond - xml or json |
Formats
xml, json
HTTP Method
POST
Parameters
Parameter Name | Usage | Description |
authtoken | Required | A valid API authtoken. Refer to this page to generate authtoken |
scope | Required | Set its value to creatorapi |
criteria | Required | The criteria must be specified in the format <criteria column name> <operator> <value> Example : (Name == "Jean" && DOB == "20-Jul-1981") |
process_until_limit | Recommended | For performance reasons, this API supports deleting a maximum of 200 records per call. Refer to this section to learn how to process when more than 200 records match the given criteria. |
Prerequisites
Notes
- The owner of the application with a valid auth token can delete a record in a Form
- A user with a valid auth token and share permission can delete a record in a View with record deleting enabled
Sample Request
<form method="POST" action="https://creator.zoho.com/api/sampleapps/xml/sample/form/Employee/record/delete">
<input type="hidden" name ="authtoken" value="***********">
<input type="hidden" name ="scope" id="scope" value="creatorapi">
<input type="text" name="criteria" value="Name=Gary">
<input type="text" name="process_until_limit" value="true">
<input type="submit" value="Delete Record">
</form>
Sample Response
XML response
Below is an example of how this API's XML response will look when the API request includes process_until_limit=true and there are a maximum of 200 records that match the given criteria. Refer to this section for the response with regard to deleting more than 200 records.<response>
<result>
<form name="Employee">
<delete>
<criteria>Name=Gary</criteria>
<status>Success</status>
</delete>
<more_records>false</more_records>
</form>
</result>
</response>
JSON response
Below is an example of how this API's JSON response will look when the API request includes process_until_limit=true and there are a maximum of 200 records that match the given criteria. Refer to this section for the response with regard to deleting more than 200 records.Error Codes
- When the operation is successful, the response message will be displayed with status "Success"
- If there is an error in the request format, the corresponding error code with error message will be displayed. Please refer to the topic Error codes and descriptions to know about them.
Limits
For performance reasons, the Delete Records REST API supports deleting a maximum of 200 records per call. You'll have to include process_until_limit=true when hitting this API endpoint and loop your API requests till more_records is returned as false in the response. The following table lists all the relevant scenarios:
Does the API request include process_until_limit=true ? | Number of matching records | Result |
Yes | up to 200 | All matching records will be deleted. The more_records key in the response will have the value false. |
Yes | More than 200 | First 200 matching records will be deleted and the more_records key in the response will have the value true.
You'll have to hit this API endpoint till the more_records key's value is returned as false. |
No | up to 200 | All matching records will be deleted. Response will not contain the more_records key. |
No | More than 200 | This API will fail and the response will contain:
|