Get alert rule
Purpose
This endpoint shows details about the Alert Rule.
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 request format
https://{baseURL}/geofencing/{versionNumber}/alerts/rules/{ruleId}?key={Your_API_Key}
curl command request format
curl 'https://{baseURL}/geofencing/{versionNumber}/alerts/rules/{ruleId}?key={Your_API_Key}'
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.
Note: There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| The base URL for calling the API. |
| Service version. |
| The |
| An API Key valid for the requested service. |
Response data
Response body
1{2 "id": "The id of the alert rule",3 "name": "The name of the alert rule",4 "object": "The id of the object",5 "project": "The id of the project",6 "fence": "The id of the fence",7 "alertType": "Type of the alert",8 "alertRuleConstraints": {9 "key": "value"10 },11 "notificationGroup": "The id of the notification group",12 "enabled": true13}
Response fields
The following table describes all of the fields that can appear in a response.
Primary fields | |
---|---|
Field | Description |
| The UUID of the Alert Rule. |
| The name of the Alert Rule. |
| The UUID of the Object or |
| The UUID of the Project or |
| The UUID of the Fence or |
| The type of the Alert Rule.
|
| Contains information specific to this Alert Rule. |
| The UUID of the owned group in the Notification Service to send the Alert Rule. |
| The Boolean value that says if an Alert Rule is enabled or not.
|
alertRuleConstraints object | |
Field | Description |
| The type of the Transition to Alert.
This field exists for the |
| Maximum time (in seconds) an Object can stay inside a Fence before an
Alert is raised. |
| Maximum number of Objects that can be present in a Fence at one time
before an Alert is raised. |
| Distance from the fence within which the alarm will be triggered. The
value is expressed in meters. |
| Side of the fence in which the proximity will be measured.
This field exists for the |
Response codes
Code | Meaning & possible causes |
---|---|
| OK |
| Not found: Alert with the provided id does not exist. |
Examples
Get details of the specific Transition Alert Rule.
URL request example
https://api.tomtom.com/geofencing/1/alerts/rules/bf40406b-1d8d-4218-bcf2-e67b83063d02?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3
Response body example
1{2 "id": "bf40406b-1d8d-4218-bcf2-e67b83063d02",3 "name": "Airport transition alert",4 "project": "47b10143-0b43-4803-a931-98cb1e595520",5 "fence": "*",6 "object": "fc94720b-23cd-4ddf-a560-00f8518e43c9",7 "alertType": "TRANSITION",8 "alertRuleConstraints": {9 "transitionType": "ALL"10 },11 "notificationGroup": "358a3348-26d6-4d9d-8d5a-c3de41b26f63",12 "enabled": true13}
Get details of the specific Dwell Time Alert Rule
URL request example
https://api.tomtom.com/geofencing/1/alerts/rules/a5e0e694-851e-4b6e-9c35-0dee908165c1?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3
Response body example
1{2 "id": "a5e0e694-851e-4b6e-9c35-0dee908165c1",3 "name": "24-hour parking #5 alert",4 "project": "47b10143-0b43-4803-a931-98cb1e595520",5 "fence": "0b16633b-7b2b-4fd6-a834-f36c2250ab66",6 "object": "*",7 "alertType": "DWELL",8 "alertRuleConstraints": {9 "maxDwellTime": 60010 },11 "notificationGroup": "8e34613a-2324-4749-ac9d-25bf7a91d218",12 "enabled": true13}
Get details of the specific Object Count Alert Rule
URL request example
https://api.tomtom.com/geofencing/1/alerts/rules/f19df201-09f1-4ac2-84ce-913658c32c2e?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3
Response body example
1<pre class="prettyprint linenums"><code>{2 "id": "f19df201-09f1-4ac2-84ce-913658c32c2e",3 "name": "City parking #7 with a capacity of 20 cars",4 "project": "47b10143-0b43-4803-a931-98cb1e595520",5 "fence": "0b16633b-7b2b-4fd6-a834-f36c2250ab66",6 "alertType": "OBJECT_COUNT",7 "alertRuleConstraints": {8 "maxObjectCount": 209 },10 "notificationGroup": "8e34613a-2324-4749-ac9d-25bf7a91d218",11 "enabled": true12}
Get details of the specific Proximity Alert Rule
URL request example
https://api.tomtom.com/geofencing/1/alerts/rules/274c7ff0-8030-4b67-a239-aa9f62cefef0?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3
Response body example
1{2 "id": "274c7ff0-8030-4b67-a239-aa9f62cefef0",3 "name": "Driver is approaching the end of the safety zone",4 "project": "47b10143-0b43-4803-a931-98cb1e595520",5 "fence": "0b16633b-7b2b-4fd6-a834-f36c2250ab66",6 "object": "*",7 "alertType": "PROXIMITY",8 "alertRuleConstraints": {9 "proximityDistance": 1000,10 "proximitySide": "OUTSIDE"11 },12 "notificationGroup": "8e34613a-2324-4749-ac9d-25bf7a91d218",13 "enabled": true14}