Rename Column

Tags:  

Rename Column


Introduction

The Rename Column API is used to rename the column in Zoho Reports Table. The account Administrator and the Database Owner alone can use this API to rename a column in the Zoho Reports table.

Getting Started

It is recommended to go through the Zoho Reports API Prerequisites before using Rename Column API.

Request

The following is the sample request URL to rename the column.

https://reportsapi.zoho.com/api/your_account@zoho.com/SalesDB/Sales?ZOHO_ACTION=RENAMECOLUMN
&OLDCOLUMNNAME=Region&NEWCOLUMNNAME=SalesRegion
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0

Note: In case of database owner renaming the column, they need to specify the login E-mail ID of the account Administrator only.

Query String Parameters

The following table shows the list of Query String parameters that has to be passed along with the request URL.

This parameters should be in the same case as given in this document.

Parameter Name Description
ZOHO_ACTION This parameter value should be RENAMECOLUMN.
 
OLDCOLUMNNAME The name of the column to be renamed in Zoho Reports Table.

Example:
OLDCOLUMNNAME=Region

NEWCOLUMNNAME The new name you wanted to give for the column.

Example:
NEWCOLUMNNAME=SalesRegion

 
authtoken
The authtoken parameter should hold the Auth Token of the Database Owner Account.

Response

The following sample response will be sent from the server after successfully renaming the column.

XML Format:

<response uri="/api/your_account@zoho.com/SalesDB/Sales" action="RENAMECOLUMN">
<result>
Column renamed successfully
</result>
</response>

JSON Format:

{
"response":
{
"uri":"\/api\/your_account@zoho.com\/SalesDB\/Sales",
"action":"RENAMECOLUMN",
"result": {"message":"Column renamed successfully"}
}
}

Error Handling


The following is a sample error response format in case of failure of Rename Column API.

XML Format:

<response uri="/api/your_account@zoho.com/SalesDB/Sales" action="RENAMECOLUMN">
<error>
<code>7107</code>
<message>
Column Region does not exists
</message>
</error>
</response>

JSON Format:

{
"response":{
"uri":"\/api\/your_account@zoho.com\/SalesDB\/Sales",
"action":"RENAMECOLUMN",
"error":{
"code":7107,
"message":"Column Region does not exists"
}
}
}

Error Codes:

The following table shows the list of error codes sent from server on failure of Rename Column API Request, along with the reason and the solution for the same.

Error Code Reason Solution
7107 The column does not exists in the specified Zoho Reports Table
Provide the correct name of the column to be renamed in the ZOHO_COLUMNNAME parameter
7161 The Zoho Reports Table specified in this API is a system table (created for Service Integration)
Renaming columns in a System Table is not allowed. You could only rename a column in a non-system table using this API.

In case of any error other than the above said, mail the API request URL parameters and error response details to support@zohoreports.com. Zoho Reports team will get back to you with the best possible solution.


    Post a comment

    Your Name or E-mail ID (mandatory)

    Note: Your comment will be published after approval of the owner.




     RSS of this page