Loading...

Update a Row in a Table

Description

This API enables you to update a particular row in a table in the Catalyst Data Store, by referring to its table ID or the table name. You must send the data to be updated in the record in the request JSON as described below.

Request Details

Request URL

PUT

{api-domain}/baas/v1/project/{project_id}/table/{tableIdentifier}/row

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

tableIdentifier
Numerical
The unique ID of the table or table name

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}
Content-Type: application/json

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.tables.rows.UPDATE

Note: This operation can also be executed with Catalyst user authentication permissions using Catalyst SDKs. Refer to the Catalyst API Prerequisites section for details.

Request JSON Format

You must send the names of the columns and their corresponding values to be updated in the request, along with the ROWID of the record, as a JSON Array like this:

copy

{ “column1_name”: “column1_value”, “column2_name”: “column2_value”, “column3_name”: “column3_value”, . . “ROWID”:{row_id of the record} }

Request JSON Properties

column_name string
mandatory
Specifies the column name of the specified table
column_value string
mandatory
Specifies the value for the column
ROWID bigint
mandatory
The ROWID of the record to be updated

Response Details

The response will contain the metadata of the row that was updated such as its ROWID and CREATEDTIME, and the updated column key names and values.

Sample Request
copy

curl -X PUT
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/table/EmpDetails/row
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type:application/json”
-d ‘[ { “Department_Name”:“Finance”, “Employee_Name”:“Morgan Jones”, “ROWID”:3376000000170191 } ]’

Sample Response
copy
{
    "status": "success",
    "data": [
        {
            "CREATORID": 3376000000002099,
            "MODIFIEDTIME": "2019-02-26 11:18:49",
            "Department_ID":"IT245",
            "Department_Name":"Finance",
            "Employee_Name": "Morgan Jones",
            "CREATEDTIME": "2019-02-26 11:18:49",
            "ROWID": 3376000000170191
        }
    ]
}