Partiallty update a smart alert
# Partially Update a Smart Alert ### `PATCH /dm/v1/smartAlerts` Use this endpoint to update a smart alert without the need to create a new record. ## Header Parameters The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit [Getting Started](https://thingspace.verizon.com/documentation/api-documentation.html#/http/connectivity-management/guides/getting-started/introduction-to-the-connectivity-management-api). |Parameter Name|Data Type|Description| |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization request header containing a valid Bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by a Connectivity Management `POST /session/login` request. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## HTTP Request [PATCH https://thingspace.verizon.com/api/dm/v1/smartAlerts](/docs/specialized-apis/sensor-insights/api-endpoints/smart-alerts/sensorinsightspatchsmartalertrequest) ## Request Parameters **Note:** All parameters are required unless marked *(optional)* | Parameter | Data Type | Description | | ---------- | --------- | ------------ | | **accountname** | string | The numeric name of the account and must include leading zeros. | | **resourceidentifier** |object| An object containing the resource ID. | | **id** |string| The UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string. | | **smartalert** |object|An object containing the Smart Alert details.| | **accountclientid** |string| Future functionality. This value will be "null". | | **billingaccountid** |string| | | **category** |string| The category of the alert. This will be either `telemetry` or `infrastructure`. | | **condition** |integer| The condition or threshold for generating an alert. | | **createdon** |string ($date-time)|The timestamp of when the record was created. | | **description** |string| A description of the record. | | **deviceid** |string|The UUID of the device. This value is assigned when the device is onboarded.| | **foreignid** |string| The UUID value of the user's Enterprise Customer Profile Database (ECPD) account. A UUID is a 32 to 36-bit alphanumeric string. | | **id** |string| The UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string. | | **isacknowledged** |boolean|A flag indicating if the alert has been acknowledged.| | **iscleared** |boolean|A flag indicating if the alert has been cleared.| | **isdisabled** |boolean|A flag indicating if the alert has been disabled.| | **lastupdated** |string ($date-time)|The timestamp of when the last update to the record was made.| | **name** |string|The user defined name of the record.| | **ruleid** |string| The UUID of the rule. A UUID is a 32 to 36-bit alphanumeric string. | | **severity** |string| The severity of the alert and will be `minor` , `major` or `critical`. | | **state** |string|The status of the request made. This will be either `success` or `failed`.| | **template** |string| The UUID of the alert template. A UUID is a 32 to 36-bit alphanumeric string. | | **version** |string| The resource version. | | **versionid** |string| The UUID of the resource version. A UUID is a 32 to 36-bit alphanumeric string. | ## Request Body Example Request: ```json { "accountname": "0000123456-00001", "resourceidentifier": { "id": "0b37ab8b-eeee-ffff-gggg-e0149af43f43" }, "smartalert": { "accountclientid": "null", "billingaccountid": "The billing account ID", "category": "telemetry", "condition": "2592000", "createdon": "2023-10-02T15:46:34.562Z", "description": "a short description", "deviceid": "The UUID of the device", "foreignid": "c1f178d3-eeee-ffff-gggg-0d6b7ae6022a", "id": "fecbe450-eeee-ffff-gggg-aa166fd5f8e3", "isacknowledged": true, "iscleared": true, "isdisabled": false, "kind": "ts.event", "lastupdated": "2023-10-02T15:46:34.562Z", "name": "User defined name of the record", "ruleid": "The identifier of a rule for alarms", "severity": "minor", "state": "success", "template": "template ID for the rule", "version": "1.0", "versionid": "337bd2e8-eeee-ffff-gggg-5207992fd395" } } ``` ## Success Response **Status 200** This is a synchronous response, so the alert will be returned. Example Response: ```json { "accountclientid": "null", "billingaccountid": "The billing account ID", "category": "Telemetry", "condition": 2592000, "createdon": "2023-10-02T15:46:34.562Z", "description": "a short description", "deviceid": "The UUID of the device", "foreignid": "c1f178d3-eeee-ffff-gggg-0d6b7ae6022a", "id": "the UUID of the record", "isacknowledged": true, "iscleared": true, "isdisabled": false, "lastupdated": "2023-10-02T15:46:34.562Z", "name": "User defined name of the record", "ruleid": "The UUID of a rule", "severity": "minor", "state": "success", "template": "template ID for the rule", "version": "1.0", "versionid": "337bd2e8-eeee-ffff-gggg-5207992fd395" } ``` ## Success Parameters | Parameter | Data Type | Description | | ---------- | -------- | ----------- | | **accountclientid** |string| Future functionality. This value will be "null". | | **billingaccountid** |string| The numeric name of the account and must include leading zeros. This value matches the `accountname`. | | **category** |string| The category of the alert. This will be either `telemetry` or `infrastructure`. | | **condition** |integer| The condition or threshold for generating an alert. | | **createdon** |string ($date-time)|The timestamp of when the record was created. | | **description** |string| A description of the record. | | **deviceid** |string|The UUID of the device. This value is assigned when the device is onboarded.| | **foreignid** |string| The UUID value of the user's Enterprise Customer Profile Database (ECPD) account. A UUID is a 32 to 36-bit alphanumeric string. | | **id** |string| The UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string. | | **isacknowledged** |boolean|A flag indicating if the alert has been acknowledged.| | **iscleared** |boolean|A flag indicating if the alert has been cleared.| | **isdisabled** |boolean|A flag indicating if the alert has been disabled.| | **lastupdated** |string ($date-time)|The timestamp of when the last update to the record was made.| | **name** |string|The user defined name of the record.| | **ruleid** |string| The UUID of the rule. A UUID is a 32 to 36-bit alphanumeric string. | | **severity** |string| The severity of the alert and will be `minor` , `major` or `critical`. | | **state** |string|The status of the request made. This will be either `success` or `failed`.| | **template** |string| The UUID of the alert template. A UUID is a 32 to 36-bit alphanumeric string. | | **version** |string| The resource version. | | **versionid** |string| The UUID of the resource version. A UUID is a 32 to 36-bit alphanumeric string. | ## Failure Responses Example Response: ```json { "error": "Error name or code", "error_description": "A longer error description.", "cause": "A cause for the error" } ```