Specialized APIsSensor InsightsAPI Reference

Overwrite a rule

POST /dm/v1/rules

Use this endpoint to overwrite an existing rule record used for a Smart Alert on an individual device.

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.

Parameter NameData TypeDescription
Authorization (required)stringHTTP Authorization request header containing a valid Bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token returned by a Connectivity Management POST /session/login request.
Content-Type (required)stringMust be application/json.

HTTP Request

POST https://thingspace.verizon.com/api/dm/v1/rules

Request Parameters

Note: All parameters are required unless marked (optional)

ParameterData TypeDescription
accountnamestringThe numeric name of the account and must include leading zeros.
resourceidentifierobjectAn object containing the resource ID.
idstringThe UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string.
ruleobjectAn object containing the details of the rule.
accountclientidstringFuture functionality. This value will be "null".
billingaccountidstringThe numeric name of the account and must include leading zeros. This value matches the accountname.
createdonstring ($date-time)The timestamp of when the record was created.
descriptionstringA description of the record.
deviceidstringThe UUID of the device. This value is assigned when the device is onboarded.
disabledbooleanA flag indicating if the rule is disabled ( true ) or not ( false ).
foreignidstringThe UUID value of the user's Enterprise Customer Profile Database (ECPD) account. A UUID is a 32 to 36-bit alphanumeric string.
idstringThe UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string.
lastupdatedstring ($date-time)The timestamp of when the last update to the record was made.
namestringThe user defined name of the record.
rulechainobjectThe sequence of events triggering an alert.
rulesyntaxstringThe syntax of the rule and can support camel and json style syntaxes.
versionstringThe resource version.
versionidstringThe UUID of the resource version. A UUID is a 32 to 36-bit alphanumeric string.

Request Body

Example Request:

{
  "accountname": "0000123456-00001",
  "resourceidentifier": {
    "id": "7f5f610a-eeee-ffff-gggg-4d20cf3dcfbc"
  },
  "rule": {
    "accountclientid": "null",
    "billingaccountid": "The billing account ID",
    "createdon": "2023-10-02T15:46:34.562Z",
    "description": "a short description",
    "deviceid": "The UUID of the device",
    "disabled": false,
    "foreignid": "c1f178d3-eeee-ffff-gggg-0d6b7ae6022a",
    "id": "bc5b5b5a-eeee-ffff-gggg-cb2cb2533d47",
    "lastupdated": "2023-10-02T15:46:34.562Z",
    "name": "User defined name of the record",
    "rulechain": {},
    "rulesyntax": "KfwCBqIex7GSJQZLmJaYKAQOzfyBeShPy54e9EjF0D1XB1O2v",
    "version": "1.0",
    "versionid": "337bd2e8-eeee-ffff-gggg-5207992fd395"
  }
}

Success Response

Status 200 This is a synchronous response, so the updated rule record will be returned. Example Response:

{
  "accountclientid": "null",
  "billingaccountid": "The billing account ID",
  "createdon": "2023-10-02T15:46:34.562Z",
  "description": "a short description",
  "deviceid": "The UUID of the device",
  "disabled": false,
  "foreignid": "c1f178d3-eeee-ffff-gggg-0d6b7ae6022a",
  "id": "a resource record UUID",
  "lastupdated": "2023-10-02T15:46:34.562Z",
  "name": "User defined name of the record",
  "rulechain": {},
  "rulesyntax": "The rule syntax",
  "version": "1.0",
  "versionid": "337bd2e8-eeee-ffff-gggg-5207992fd395"
}

Success Parameters

ParameterData TypeDescription
accountclientidstringFuture functionality. This value will be "null".
billingaccountidstringThe numeric name of the account and must include leading zeros. This value matches the accountname.
createdonstring ($date-time)The timestamp of when the record was created.
descriptionstringA description of the record.
deviceidstringThe UUID of the device. This value is assigned when the device is onboarded.
disabledbooleanA flag indicating if the rule is disabled ( true ) or not ( false ).
foreignidstringThe UUID value of the user's Enterprise Customer Profile Database (ECPD) account. A UUID is a 32 to 36-bit alphanumeric string.
idstringThe UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string.
lastupdatedstring ($date-time)The timestamp of when the last update to the record was made.
namestringThe user defined name of the record.
rulechainobjectThe sequence of events triggering an alert.
rulesyntaxstringThe syntax of the rule and can support camel and json style syntaxes.
versionstringThe resource version.
versionidstringThe UUID of the resource version. A UUID is a 32 to 36-bit alphanumeric string.

Failure Responses

Example Response:

{
  "error": "Error name or code",
  "error_description": "A longer error description.",
  "cause": "A cause for the error"
}

On this page