Update Org Alert Policy Rule

Update an alert policy rule. Only the provided fields change. To move the rule, provide at most one of position, rank, before_rule_id, or after_rule_id. Requires a token with org-wide repository access; repo-restricted tokens receive 403.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes:

  • alert-policy:update
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The slug of the organization

string
required

The ID of the alert policy: a UUID, or default for the default policy

string
required

The UUID of the rule to update

Body Params
string

The rule name (1-128 characters).

vigil_selector
object

Selector describing which alerts the rule applies to. Fields must all be under finding., location., or artifact.* (e.g. {"finding.alertType": "criticalCVE", "artifact.name": "lodash"}).

string

The action applied to matching alerts. One of: error, warn, monitor, ignore.

string | null

Operator-provided note (up to 256 characters).

string

Where to place the rule within the policy: first or last. Mutually exclusive with rank, before_rule_id, and after_rule_id; when no position is provided a created rule is placed first.

string

Explicit rank, as a fractional-indexing base62 order key (e.g. a0, a0V). Prefer position, before_rule_id, or after_rule_id; a rank that is not a valid order key is rejected.

string | null

Move the rule immediately before this rule UUID.

string | null

Move the rule immediately after this rule UUID.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json