API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsPatch an alert policy

Patch an alert policy

PATCH /api/alert/policies/{alert_policy_id}

PATCH /api/alert/policies/{alert_policy_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

alert_policy_id*string

Alert policy ID.

Request Body

application/json

JSON Patch payload as defined by RFC 6902. See JSON Patch for more information.

[index: integer]?|

Response Body

application/json

application/json

curl -X PATCH "$API_BASE_URL/api/alert/policies/string" \  -H "Content-Type: application/json" \  -d '[    {      "op": "add",      "path": "/name",      "value": "new-name"    }  ]'

Successful operation.

{
  "value": {}
}
Complete operation details and schema variants

PATCH /api/alert/policies/{alert_policy_id}

Patch an alert policy

Partially update an alert policy using JSON Patch (RFC 6902) operations. This is useful for targeted edits without resubmitting the full policy definition.

Required IAM Permission: Action gateway:UpdateAlertPolicy, Resource arn:api7:gateway:alert/%s

Parameters

  • alert_policy_id (path, string, required): Alert policy ID.

Request body

Content type: application/json

  • oneOf variant 1: add/replace
  • [].op (string, required): The operation to be performed.
  • [].path (string, required): Path to the field to be replaced or added. Path should follow the JSON Pointer format.
  • [].value (object, required): Value to be added or replaced.
  • oneOf variant 2: remove
  • [].op (string, required): The operation to be performed.
  • [].path (string, required): Path to the field to be removed. Path should follow the JSON Pointer format.

Responses

  • 200: Successful operation.
  • value (object, optional): The specific resource.
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X PATCH '$API_BASE_URL/api/alert/policies/{alert_policy_id}'