Skip to content

Retrieving Geo Categories

This API retrieves a list of all the application's geo categories.

Method

GET

URL

https://api.backendless.com/<application-id>/<REST-api-key>/geo/categories

where:

Argument                Description
<application id> ID of the application which can be obtained from the Manage > App Settings screen of the Backendless Console
<REST-api-key> REST API key of your application. You can get the value from the Manage > App Settings section of the Backendless Console.

Request headers

Content-Type: application/json  
user-token: optional value obtained as a result of the login operation.

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 user object which is 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.

Response Body

A collection of JSON objects. Each object represents a geo category and contains the objectId, name and size properties. The size  property is the number of geopoints the geo category contains. Below is a sample response:

[  
  {  
    "objectId": "2590AA6B-017D-15AE-FF84-2A13BE19C700",  
    "name": "restaurants",  
    "size": 2  
  },  
  {  
    "objectId": "6354457C-E82B-5F1F-FF6C-5AB31CA25D00",  
    "name": "taxis",  
    "size": 2  
  },  
  {  
    "objectId": "BB3428CA-37EE-6EBF-FF3A-67A3F4505900",  
    "name": "Default",  
    "size": 1  
  }  
]

If an error occurs, the response is formatted as described in the Error Handling section.

Example

curl -X GET   
-v http://api.backendless.com/XXXX-XXXX-XXXX/ZZZZ-ZZZZ-ZZZZ/geo/categories