Get project details
Service version: 1
Last edit: 2019.09.18
On this page
- ▸ Purpose
- ▸ Request data
Purpose
This endpoint gets all the fences and other details for a project. This can include objects for which the project is a default.
Request data
HTTPS method: GET
URL format
For ease of viewing and identification:
- Required constants and parameters are shown in bold text.
- Optional parameters are shown in plain text.
https://baseURL/geofencing/versionNumber/projects/projectId?&key=Your_API_Key&defaultObjects=true/false
curl command
curl 'https://baseURL/geofencing/versionNumber/projects/projectId?&key=Your_API_Key&defaultObjects=true/false'
Request parameters
The following table describes the parameters that can be used in a Request.
- Required parameters must be used or the call will fail.
- Optional parameters may be used.
- If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
- The order of request parameters is not important.
Required parameters | |
---|---|
Parameter | Description |
baseURL string |
The base URL for calling the API. Value: api.tomtom.com |
versionNumber string |
Service version number. Value: 1 |
key string |
An API Key valid for the requested service. Value: Your valid API Key . |
projectId string |
The project unique id to gather details for. Value: UUID |
Optional parameters | |
Parameter | Description |
defaultObjects boolean |
If set to true (default = false) the output contains a list of all objects that have the selected project set as their default project. Default value: false Other value: true |
Response data
Response body
The following JSON code block demonstrates a successful Response from the API server.
{
"name": "project_name",
"id": "project_id",
"fences": [
{
"id": "fence_id",
"name": "fence_name",
...
}
],
"defaultObjects": [
{
"id": "object_id",
"name": "object_name",
...
}
]
}
Response fields
The following data tables describe all of the fields that can appear in a Response.
Primary fields | |
---|---|
Field | Description |
name string |
The name of the project. |
id string |
The UUID of the project. |
fences[] array |
A list of UUIDs and names of fences linked to the project. |
defaultObjects[] array |
(Optional) A list of object UUIDs and names of objects that have the project linked as default project. |
fences[] array |
|
Field | Description |
id string |
The UUID of a fence linked to the project. |
name string |
The name of a fence linked to the project. |
defaultObjects[] array |
|
Field | Description |
id string |
The UUID of an object that has the project linked as a default project. |
name string |
The name of an object that has the project linked as a default project. |
HTTP Response codes
Code | Meaning & possible causes |
---|---|
200 |
OK |
404 |
Not found: Project with the specified ID does not exist. |
Examples
Example: Get details of the 'Cities in the Netherlands' (id: 44de824d-c368-46cf-a234-a6792682dfd6) project, including a list of objects that have this project set as their default project.
Request format
https://api.tomtom.com/geofencing/1/projects/44de824d-c368-46cf-a234-a6792682dfd6?key=Your_API_Key&defaultObjects=true