List transition alert rules
Deprecation notice
November 6, 2020
- The "List transition alert rules" endpoint has been deprecated.
- This endpoint has been replaced with the generic endpoint to handle all types of Alert Rules: List Alert Rules.
- This endpoint will be withdrawn following a 12 month deprecation period.
- The planned withdrawal date is December 1, 2021.
- Following withdrawal, requests to this endpoint may receive an HTTP 404 error in response.
- More details are available at the TomTom deprecation policy page.
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
GET
URL request example
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
GET
Request curl command example
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 |
---|---|
baseURL string | The base URL for calling the API. Value: api.tomtom.com |
versionNumber string | Service version. Value: 1 |
key string | An API Key valid for the requested service. Value: Your valid API Key . |
Optional parameters | Description |
---|---|
project string | UUID of a project to filter by the specified UUID. Default value: No value. |
fence string | UUID of a fence to filter by the specified UUID. Default value: No value. |
object string | UUID of a object to filter by the specified UUID. Default value: No value. |
transitionType string | Type of the Transition to filter by. Value: ENTER, EXIT, or ALL Default value: No value. |
enabled string | Select Rules by enabled or disabled. Value: TRUE or FALSE Default value: No value. |
notificationGroup string | UUID of a Notification Group to filter by the specified UUID. Default value: No value. |
maxResults integer | Maximum number of items returned in the response. Value: Greater than zero, less than or equal to 100. Default value: 100 |
pageNumber integer | 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. Value: Greater than zero. Default value: 1 |
Response data
Response body
Response body - JSON
1{2 "alertsRules": [3 {4 "id": "The id of the alert rule",5 "name": "The name of the alert rule"6 }7 ],8 "resultInfo": {9 "maxResults": max_number_of_results,10 "pageNumber": page_number,11 "itemsCount": number_of_results12 }13}
Response fields
The following table describes all of the fields that can appear in a response.
Primary fields | |
---|---|
Field | Description |
alertsRules array (alert) | Array of configured alerts for fences with objects. |
resultInfo object | Contains information about response paging. |
alertsRules array | |
Field | Description |
id string | The UUID of the alert rule. |
name string | The name of the alert rule. |
resultInfo object | |
Field | Description |
maxResults integer | Maximum number of items returned in the response. |
pageNumber integer | Number of the items page to be returned in the response. Maximum number of elements on the page is equal to the maxResults value. |
itemsCount integer | Number of returned items on the page. |
Response codes
Code | Meaning & possible causes |
---|---|
200 | OK |
400 | 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
GET
URL request example
https://api.tomtom.com/geofencing/1/alerts/transitions?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3&project=ea06d8ab-762c-4f54-bb92-bde5cf35b9ff&transitionType=ALL&enabled=true&maxResults=3&pageNumber=1
Response body
Response body - JSON
1{2 "alertsRules": [3 {4 "id": "2ce7d968-ddc5-4d16-97bd-ab0a72491c38",5 "name": "Airport transition alert"6 },7 {8 "id": "2169e8ea-a03d-43fb-9d2e-f0f5529b983f",9 "name": "Train station transition alert"10 },11 {12 "id": "821bd614-fbf1-4d66-8569-9ff34e92784f",13 "name": "Bus station transition alert"14 }15 ],16 "resultInfo": {17 "maxResults": 3,18 "pageNumber": 1,19 "itemsCount": 520 }21}