Sorry, you need to enable JavaScript to visit this website.

Delete alert rule

 

Service version: 1
Last edit: 2020.09.30

On this page

Purpose

This endpoint is used to delete an Alert Rule.

Request data

HTTPS method: DELETE

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/rules/ruleId?key=Your_API_Key&adminKey=Your_Admin_Key

curl command

curl -XDELETE 'https://baseURL/geofencing/versionNumber/alerts/rules/ruleId?key=Your_API_Key&adminKey=Your_Admin_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.
  • 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
ruleId
string
The UUID of the alert rule.
key
string
An API Key valid for the requested service.
Value: Your valid API Key.
adminKey
string
An Admin Key valid for the provided API Key.
Value: Your valid Admin Key.
Optional parameters
Note: There are no optional parameters in this endpoint.

▲ Return to top

Response data

Response body

{
  "id": "The id of the alert rule",
  "name": "The name of the alert rule",
  "object": "The id of the object",
  "project": "The id of the project",
  "fence": "The id of the fence",
  "alertType": "Type of the alert",
  "alertRuleConstraints": {
    "key": "value"
  },
  "notificationGroup": "The id of the notification group",
  "enabled": true
}

Response fields

The following table describes all of the fields that can appear in a Response.

Primary fields
Field Description
id
string
The UUID of the Alert Rule.
name
string
The name of the Alert Rule.
object
string
The UUID of the Object or * for any Object in Configuration.
project
string
The UUID of the Project or * for any Project in Configuration.
fence
string
The UUID of the Fence or * for any Fence in Configuration.
alertType
string
The type of the Alert Rule.
Possible values:
  • "TRANSITION": When an Object entered or exited Fence.
  • "DWELL": When an Object stays too long inside a Fence.
  • "OBJECT_COUNT": When the maximum number of Objects in a Fence is exceeded.
alertRuleConstraints{}
object
Contains information specific to this Alert Rule.
notificationGroup
string
The UUID of the owned group in the Notification Service to send the Alert Rule.
enabled
boolean
The Boolean value that says if an Alert Rule is enabled or not.
Values:
  • true - Alert is enabled
  • false - Alert is disabled
alertRuleConstraints{} object
Field Description
transitionType
string
The type of the Transition to trigger an Alert.
Possible values:
  • "ENTER": When an Object just entered the Fence.
  • "EXIT": When an Object just exited the Fence.
  • "ALL": When an Object just entered or exited the Fence.
This field exists for the "TRANSITION" Alert type.
maxDwellTime
integer
Maximum time (in seconds) an Object can stay inside a Fence before an Alert is raised.
This field exists for the "DWELL" Alert type.
maxObjectCount
integer
Maximum number of objects that can be present in a Fence at one time before an Alert is raised.
This field exists for the "OBJECT_COUNT" Alert type.

HTTP Response codes

Code Meaning and possible causes
200 Deleted
403 Forbidden:
  • The provided Admin Key is invalid.
  • The Admin Key is missing.
404 Not found: Alert Rule with the provided id does not exist.

▲ Return to top

Examples

Example: Delete specific Transition Alert Rule.

Request format

https://api.tomtom.com/geofencing/1/alerts/rules/bf40406b-1d8d-4218-bcf2-e67b83063d02?key=PJD7y0G5AFj9Jiok6F0tIK16NiWYotb3&adminKey=FTZYUH7KxeNQohCuRvK8

Response body

{
    "id": "bf40406b-1d8d-4218-bcf2-e67b83063d02",
    "name": "Airport transition alert",
    "project": "47b10143-0b43-4803-a931-98cb1e595520",
    "fence": "*",
    "object": "fc94720b-23cd-4ddf-a560-00f8518e43c9",
    "alertType": "TRANSITION",
    "alertRuleConstraints": {
      "transitionType": "ALL"
    },
    "notificationGroup": "358a3348-26d6-4d9d-8d5a-c3de41b26f63",
    "enabled": true
  }

▲ Return to top