Update dwell time alert rule partially
Decommission notice
Deprecation notice
Purpose
This endpoint is used to partially update a Dwell Time Alert Rule.
Request data
HTTPS method: PATCH
- 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/{ruleId}?key={Your_API_Key}&adminKey={Your_Admin_Key}curl command format
curl -XPATCH -d '{ "enabled": true}''https://{baseURL}/geofencing/{versionNumber}/alerts/dwell/{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.
- 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 UUID of the alert rule. |
| An API Key valid for the requested service. |
| An Admin Key valid for the provided API Key. |
PATCH request body
{ "enabled": true}Request fields
The following table describes the fields that can be used in a request body.
Primary fields | Description |
|---|---|
| The Boolean value that says if an alert rule is enabled or not.
Default value: |
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", "maxDwellTime": integer, "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 | 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 |
| Maximum time (in seconds) an Object can stay inside a Fence, before alert is risen. |
| 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.
|
Response codes
Code | Meaning & possible causes |
|---|---|
| OK |
| Bad request:
|
| Forbidden:
|
Example
Partially update the Dwell Time Alert Rule.
Request format
https://api.tomtom.com/geofencing/1/alerts/dwell/1f9e811f-867b-4d4d-aed9-7d8266fac0ae?key=nQRhDX5saL2KM0dIzEfeX2lcxWk9ktT2qXDZpwCr&adminKey=QekKaqqCHBpFLPCeViVSPATCH body format
{ "enabled": false}Response body
{ "id": "1f9e811f-867b-4d4d-aed9-7d8266fac0ae", "name": "Airport Kiss&Ride" policy", "object": "*", "project": "ab550513-7026-4c98-9ff7-a930d70b66f8", "fence": "0b16633b-7b2b-4fd6-a834-f36c2250ab6", "maxDwellTime": 600, "notificationGroup": "8e34613a-2324-4749-ac9d-25bf7a91d218", "enabled": false}