Skip to content

Saving Single Object

Saving Data Object

Method

POST

URL

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

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 saved. If the table does not exist and Dynamic Schema Definition is enabled (it is turned on by default), Backendless creates the table and configures its schema to match the object structure (properties).

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-token is set in the request, the currently logged in user will be assigned to the ownerId property of the objects which are being saved.  Additionally, the operation will be executed with the security policy associated currently logged in user. This means all permissions associated with the user and the roles assigned to the user will be enforced by Backendless

Example

curl \  
-H Content-Type:application/json \  
-X POST  \  
-d "{\"name\":\"Bob\", \"age\":20}" \  
-v https://api.backendless.com/application-id/REST-api-key/data/Person