Create Org Alert Policy Rule
Changed onCreate a rule on an alert policy. Rules are evaluated in ascending rank order and the first matching rule decides the alert action. Provide at most one of position, rank, before_rule_id, or after_rule_id; the rule is placed first when no position is provided. 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:create
Request
- Base URLhttps://api.socket.dev/v0
- URLhttps://api.socket.dev/v0/orgs/{org_slug}/alert-policies/{policy_id}/rules
- Auth
- HTTP bearer
- or HTTP basic
Path parameters
The slug of the organization
The ID of the alert policy: a UUID, or default for the default policy
Query parameters
Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts true, 1, or yes. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with dry_run: true, not 201.
Request body
Response
Dry-run: the write was not persisted.
Changes
- info
endpoint added
- info