Skip to content

Basic Object Retrieval

Backendless supports multiple data search and retrieval operations. These include finding an object by its objectId, finding first or last object in the collection or retrieving the entire persisted collection.

Retrieving Data Objects

Method

GET

URL

Find by ID:

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

Find first:

https://api.backendless.com/<application-id>/<REST-api-key>/data/<table-name>/first?loadRelations=<relations>

Find last:

https://api.backendless.com/<application-id>/<REST-api-key>/data/<table-name>/last?loadRelations=<relations>

Basic Find (retrieving a collection):

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 to search for the object.
<object-id> ID of the object to retrieve. The ID assigned by Backendless in the create object operation.
<relations> a list of related columns to return the values of with the parent object. The values must be separated by comma and then URL-encoded. For example relationA,relationB must be specified in the request as relationA%2CrelationB

Request Headers

user-token:value-of-the-user-token-header-from-login

where:

Argument                Description
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 with the currently logged in user. This means all permissions associated with the user and roles assigned to the user will be enforced by Backendless.

Request Body:

None

Example

Find first object:

curl "https://api.backendless.com/application-id/REST-api-key/data/Person/first"

Find last object:

curl "https://api.backendless.com/application-id/REST-api-key/data/Person/last"

Find object by ID:

curl "https://api.backendless.com/application-id/REST-api-key/data/Person/XXXX-XXXX-XXXX-XXXX"

Load 'Person' objects:

curl "https://api.backendless.com/application-id/REST-api-key/data/Person"