Zoho Creator - RPC APIs > CSV RPC Methods > CSV RPC - Delete Record

CSV RPC - Delete Record

Tags:  

Delete Record - CSV Format

 

Zoho Creator
CSV - RPC Web API allows client applications to delete records from a Zoho Creator form, using the HTTP POST method. The records that satisfy the given criteria will be deleted. You can specify multiple criteria using "AND"/ "OR" operator. In return, the user gets a formatted CSV response from the called method. 

Who can delete a record ?

- Application owner with valid API Key
- Shared users with valid API key and access permissions to edit the view

Delete record by application owner
Delete record by shared user


Delete Record by Application Owner

Request URL

The request url to delete a record in csv format is given below:

http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]


Request Parameters

The request parameters comprises of comma separated values to be specified in the following format:


<Application Name>,<Form Name>,<Operation Type>

<Criteria Column Name >,<operator>,<value>,<AND or OR>



where,

<Application Name> :Name of the application to which the record must be added.
<Form Name>: Name of the form to which the record must be added.
<Operation Type>: The operation type to delete a record is "Delete".
<Criteria Column Name >: The column name used to specify the delete criteria.
<operator>:The operator used in the criteria. The following operators are supported:
  • Equals
  • NotEqual
  • Before
  • After
  • LessThan
  • GreaterThan
  • LessThanOrEqual
  • GreaterThanOrEqual
  • Contains
  • NotContains
  • StartsWith
  • EndsWith
<value> : The criteria column value
<AND or OR> : To AND/OR operator to specify more than one criteria.

Note:
  1. Only Deluge Script names must be specified for form names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of applications created, the form names and field names used in each application and the deluge names.
  2. The criteria must end with a dot <.>
  3. Each line must end with a line seperator.
  4. Field values with special characters must be specified within double quotes.
  5. Multiple list values must be specified within double quotes with each value seperated by a comma.
  6. The following operators are supported for date fields:equals, not equal to, before, after

Sample Form (POST Method Format)


<formmethod="POST" action="http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]">

<input type="hidden" name="CSVString" value="CSV String in the format as specified in the Request format">

<input type="submit" value="Sumit CSV String">

</form>




Sample Request

The following is the sample request for the above method:

a. Request with single criteria: 


Sample,Employee_Form,Delete
Name,equals,"John",.



b. Request with multiple criteria using AND operator. 


Sample,Employee_Form,Delete
Name,equals,"John",AND
Joining_Date,equals,15-Aug-2007,.




Response Format

The request parameters comprises of comma separated values.  The line-wise parameters to be specified is given below: 


<Form Name>,<Operation>


<Name of the form>,<delete>


<Status><Criteria>


<Success/Failure><Criteria>




If there is an error in the request format, the corresponding error code with the error message will be displayed. Please refer the topic, Error codes and description, to learn about the list of error code displayed.


If the record is added to the database, the response message will be displayed with status as "Success".

Sample Response 

The following is the sample response for the above method:


Form Name, Operation
dateForm,delete
Status,Criteria
Success,[Name EQUAL jose]




Delete Record by Shared User

Request URL

The request url to delete a record in csv format is given below:

http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]


Request Parameters

The request parameters comprises of comma separated values to be specified in the following format:


<Application Name>,<View Name>,<Operation Type>

<Criteria Column Name >,<operator>,<value>,<AND or OR>



where,

<Application Name> :Name of the application to which the record must be added.
<View Name>: Name of the view to which the record must be added.
<Operation Type>: The operation type to delete a record is "Delete".
<Criteria Column Name >: The column name used to specify the delete criteria.
<operator>:The operator used in the criteria. The following operators are supported:
  • Equals
  • NotEqual
  • Before
  • After
  • LessThan
  • GreaterThan
  • LessThanOrEqual
  • GreaterThanOrEqual
  • Contains
  • NotContains
  • StartsWith
  • EndsWith
<value> : The criteria column value
<AND or OR> : To AND/OR operator to specify more than one criteria.

Note:
  1. Only Deluge Script names must be specified for view names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of applications created, the view names and field names used in each application and the deluge names.
  2. The criteria must end with a dot <.>
  3. Each line must end with a line separator.
  4. Field values with special characters must be specified within double quotes.
  5. Multiple list values must be specified within double quotes with each value seperated by a comma.
  6. The following operators are supported for date fields:equals, not equal to, before, after

Sample Form (POST Method Format)


<formmethod="POST"    action="http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]">

<input type="hidden" name="CSVString" value="CSV String in the format as specified in the Request format">

<input type="hidden" name="zc_ownername" value="name of the Application Owner">

<input type="submit" value="Sumit CSV String">

</form>






 RSS of this page