Get project details

Service version: 1
Last edit: 2022.09.01

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

  • Constants and parameters enclosed in curly brackets &#123 } must be replaced with their values.
  • Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.

URL request format

https://{baseURL}/geofencing/{versionNumber}/projects/{projectId}?&key={Your_API_Key}&defaultObjects={true/false}

curl command request format

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.
  • The order of request parameters is not important.

Required parameters

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

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.

1{
2 "name": "project_name",
3 "id": "project_id",
4 "fences": [
5 {
6 "id": "fence_id",
7 "name": "fence_name",
8 ...
9 }
10 ],
11 "defaultObjects": [
12 {
13 "id": "object_id",
14 "name": "object_name",
15 ...
16 }
17 ]
18}

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.

Response codes

Code

Meaning & possible causes

200OK
404

Not found: Project with the specified ID does not exist.

Example

Get project details

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.

URL request example

https://api.tomtom.com/geofencing/1/projects/44de824d-c368-46cf-a234-a6792682dfd6?key={Your_API_Key}&defaultObjects=true

Response body example

1{
2 "name": "project_name",
3 "id": "project_id",
4 "fences": [
5 {
6 "id": "fence_id",
7 "name": "fence_name",
8 ...
9 }
10 ],
11 "defaultObjects": [
12 {
13 "id": "object_id",
14 "name": "object_name",
15 ...
16 }
17 ]
18}