List dwell time alert rules
Deprecation notice
November 6, 2020
- The "List dwell time 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 Dwell Time 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/dwell?key={Your_API_Key}&project={uuid}&fence={uuid}&object={uuid}&enabled={boolean}¬ificationGroup={uuid}&maxResults={integer}&pageNumber={integer}
curl command format
curl 'https://{baseURL}/geofencing/{versionNumber}/alerts/dwell?key={Your_API_Key}&project={uuid}&fence={uuid}&object={uuid}&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. |
| 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
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 |
| 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 |
| 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.
Request format
https://api.tomtom.com/geofencing/1/alerts/dwell?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3&project=ea06d8ab-762c-4f54-bb92-bde5cf35b9ff&enabled=true&maxResults=3&pageNumber=1
Response body
1{2 "alertsRules": [3 {4 "id": "2ce7d968-ddc5-4d16-97bd-ab0a72491c38",5 "name": "Airport Kiss&Ride alert"6 },7 {8 "id": "2169e8ea-a03d-43fb-9d2e-f0f5529b983f",9 "name": "Train station Kiss&Ride alert"10 },11 {12 "id": "821bd614-fbf1-4d66-8569-9ff34e92784f",13 "name": "Bus station Kiss&Ride alert"14 }15 ],16 "resultInfo": {17 "maxResults": 3,18 "pageNumber": 1,19 "itemsCount": 520 }21}