Update Row

Description

This API enables you to update a particular row in a table in the 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 URL

https://api.catalyst.zoho.com/baas/v1/project/{project_id}/table/{tableIdentifier}/row

project_id - The unique ID of the project

tableIdentifier - The unique ID of the table or the table name

Request Headers

Authorization: Zoho-oauthtoken 1000.910***************************16.2f****************************57
Content-Type:application/json

Request Method

PUT

Scope

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, in a JSON format like this:

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

Request JSON Properties

AttributesData TypeMandatoryDescription
column_nameStringYesSpecifies the column name of the specified table
column_valueStringYesSpecifies the value for the column
ROWIDBigIntYesThe ROWID of the record to be updated

SDK documentation

Update Rows- Java SDK

Update Rows- Node.js SDK

Update Rows- Web SDK

Sample Request


				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


				{
    "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
        }
    ]
}			

Sample SDK code


				let database = Database()
mexRecord["cost_for_two"] = 30
database.save(mexRecord)  { (result) in
   switch result{
     case .success(let record):
          print("Record Saved \(record)")
      case .error(let error):
          print("Error in saving record \(error)")
     }
}