Skip to content

Updating Single Object

Method

PUT

URL

https://api.backendless.com/<application-id>/<REST-api-key>/data/<table-name>/<object-id> 

where:

Argument                Description
<application-id> the ID of your application generated upon its creation. You can obtain the value in the Manage > App Settings section of the Backendless Console.
<REST-api-key> REST API key of your application. You can obtain the value in the Manage > App Settings section of the Backendless Console.
<table-name> name of the table where the object needs to be updated.
<object-id> ID of the object to update assigned by Backendless in the create object operation.

Request Headers

Content-Type:application/json  
user-token:value-of-the-user-token-header-from-login

where:

Argument                Description
Content-Type Must be set to application/json. This header is mandatory.
user-token Optional header. Contains a value returned by Backendless in a preceding user Login API call. If user-tokenis set in the request, the operation will be executed with the security policy associated currently logged in user. This means all permissions associated with the user and roles assigned to the user will be enforced by Backendless.

Example

curl \  
-H Content-Type:application/json \  
-X PUT  \  
-d "{\"name\":\"Bob\", \"age\":20 }" \  
-v https://api.backendless.com/application-id/REST-api-key/data/Person/6C77C11B-E9B3-EB14-FFA2-69F38CF48800

Notice the objectId value is put directly into the URL. The same value is optional in the JSON body of the request.