List dwell time alert rules
Service version: 1
Last edit: 2020.09.30
On this page
Purpose
This endpoint lists Dwell Time Alert Rules.
We highly recommend using the new, generic endpoint to handle all types of Alert Rules: List Alert Rules.
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 normal text.
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
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.
- 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. Value: 1
|
key string |
An API Key valid for the requested service. Value: Your valid API Key .
|
Optional parameters | |
[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. |
[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
{
"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 |
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. |
HTTP Response codes
Code | Meaning and possible causes |
---|---|
200 |
OK |
400 |
Bad Request: The value of the parameter is not a positive decimal number. |
Examples
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
{
"alertsRules": [
{
"id": "2ce7d968-ddc5-4d16-97bd-ab0a72491c38",
"name": "Airport Kiss&Ride alert"
},
{
"id": "2169e8ea-a03d-43fb-9d2e-f0f5529b983f",
"name": "Train station Kiss&Ride alert"
},
{
"id": "821bd614-fbf1-4d66-8569-9ff34e92784f",
"name": "Bus station Kiss&Ride alert"
}
],
"resultInfo": {
"maxResults": 3,
"pageNumber": 1,
"itemsCount": 5
}
}