Skip to content

Update Alert Metadata

Update the specified alert metadata. Only key and value can be updated.

Note

Alert metadata cannot be moved to a different alert on update; its alertId is fixed. The alertId field is still required in the request body, but any value other than the metadata's current alert is ignored rather than rejected.

Verb PATCH
Endpoint {base-url}/alerts/metadata
Max Page Size N/A

Request Body

{
  "body": [
    {
      "id": 7,
      "alertId": 1,
      "key": "foo",
      "value": "bar"
    }
  ]
}

Note

All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.

Returns

On Success

The updated alert metadata.

Response Body

[
  {
    "id": 7,
    "alertId": 1,
    "key": "foo",
    "value": "bar"
  }
]

On Error

HTTP Code Error Code Definition
400 DESERIALIZATION_ERROR Request body was empty or missing.
422 VALIDATION_ERROR alertId, key, or value is missing; or key exceeds 200 characters.
403 DATA_ACCESS_VIOLATION One or more of the specified alert metadata records belong to an organization the requester does not have access to.
404 MISSING_RECORD One or more of the specified alert metadata id values does not exist.