List transition alert rules
Decommission notice
Deprecation notice
Purpose
This endpoint lists Transition Alert Rules.
Request data
HTTPS method: GET
- Constants and parameters enclosed in curly brackets { } 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 format
https://{baseURL}/geofencing/{versionNumber}/alerts/transitions?key={Your_API_Key}&project={uuid}&fence={uuid}&object={uuid}&transitionType={string}&enabled={boolean}¬ificationGroup={uuid}&maxResults={integer}&pageNumber={integer}curl command format
curl 'https://{baseURL}/geofencing/{versionNumber}/alerts/transitions?key={Your_API_Key}&project={uuid}&fence={uuid}&object={uuid}&transitionType={string}&enabled={boolean}¬ificationGroup={uuid}&maxResults={integer}&pageNumber={integer}'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 |
|---|---|
| The base URL for calling the API. |
| Service version. |
| An API Key valid for the requested service. |
Optional parameters | Description |
|---|---|
| UUID of a project to filter by the specified UUID. |
| UUID of a fence to filter by the specified UUID. |
| UUID of a object to filter by the specified UUID. |
| Type of the Transition to filter by. |
| Select Rules by enabled or disabled. |
| UUID of a Notification Group to filter by the specified UUID. |
| Maximum number of items returned in the response. |
| The number of the items page to be returned in the response. The maximum
number of elements on the page is equal to the maxResults value. |
Response data
Response body
{ "alertsRules": [ { "id": "The id of the alert rule", "name": "The name of the alert rule" } ], "resultInfo": { "maxResults": max_number_of_results, "pageNumber": page_number, "itemsCount": number_of_results }}Response fields
The following table describes all of the fields that can appear in a response.
Primary fields | |
|---|---|
| Field | Description |
| Array of configured alerts for fences with objects. |
| Contains information about response paging. |
alertsRules array | |
| Field | Description |
| The UUID of the alert rule. |
| The name of the alert rule. |
resultInfo object | |
| Field | Description |
| Maximum number of items returned in the response. |
| Number of the items page to be returned in the response. Maximum number of elements on the page is equal to the maxResults value. |
| Number of returned items on the page. |
Response codes
| Code | Meaning & possible causes |
|---|---|
| OK |
| Bad Request: The value of the parameter is not a positive decimal number. |
Example
List all enabled alert rules for the specific project and transition type.
Request format
https://api.tomtom.com/geofencing/1/alerts/transitions?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3&project=ea06d8ab-762c-4f54-bb92-bde5cf35b9ff&transitionType=ALL&enabled=true&maxResults=3&pageNumber=1Response body
{ "alertsRules": [ { "id": "2ce7d968-ddc5-4d16-97bd-ab0a72491c38", "name": "Airport transition alert" }, { "id": "2169e8ea-a03d-43fb-9d2e-f0f5529b983f", "name": "Train station transition alert" }, { "id": "821bd614-fbf1-4d66-8569-9ff34e92784f", "name": "Bus station transition alert" } ], "resultInfo": { "maxResults": 3, "pageNumber": 1, "itemsCount": 5 }}