XML RPC API - Delete Records
- The XML RPC APIs are part of Zoho Creator's v1 APIs, which 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
https://creator.zoho.com/api/xml/write
HTTP Method
POST
Parameters
Parameter Name | Usage | Description |
authtoken | Required. | A valid API authtoken. Refer to this page to generate the authtoken. |
scope | Required | Specify the value as creatorapi |
zc_ownername | Required | The application owner's name |
<application name> | Required | The name of the application that contains the form. Multiple applications can be added to at a time. |
<form name> | Required | The name of the form to add records to. Multiple forms in an application can be added to at a time. |
<field name> | Required | The link name of the field. This parameter's value specifies the value to be set for that field. |
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. |
Refer to this page for the link names used in your applications.
Prerequisites
- A valid AuthToken
- Please ensure that you've enabled the API accesspermission for the required users. It's enabled by default. It determines if the user is allowed to use your Creator application's APIs.
Notes
- Anyone with a valid authtoken can add a record to a public Form
- Only the owner of the application can add a record to a private Form
- Any user with a valid authtoken and share permission can add a record to a shared Form
- The app owner can delete records from multiple forms, which may be present in different apps, through the same request
- Multiple picklist values must be specified within the <options> tag and each value must be specified in <option> tag
Sample Request
<form method="POST" action="https://creator.zoho.com/api/xml/write">
<input type="hidden" name ="authtoken" value="************">
<input type="hidden" name ="scope" id="scope" value="creatorapi">
<input type="text" name="process_until_limit" value="true">
<textarea name="XMLString">
<ZohoCreator>
<applicationlist>
<application name='sample'>
<viewlist>
<view name='Employee_Report'>
<delete>
<criteria>
<![CDATA[Name == "Gary" && DOB == "12-Jun-1980"]]>
</criteria>
</delete>
</view>
</viewlist>
</application>
</applicationlist>
</ZohoCreator>
</textarea>
<input type="hidden" name="zc_ownername" value="sampleapps">
<input type="submit" value="Delete Record">
</form>
Sample Response
Below is an example of how this API's 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.<?xml version="1.0" encoding="UTF-8" ?>
<response>
<result>
<form name="Employee">
<delete>
<criteria>
<![CDATA[Name == "Gary" && DOB == "12-Jun-1980"]]>
</criteria>
<status>Success</status>
</delete>
<more_records>false</more_records>
</form>
</result>
</response>
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 learn about them.
Limits
For performance reasons, the Delete Records XML RPC API supports deleting up to 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:
|