Set a usage threshold
POST/v1/projects/:project_id/usage/thresholds
Creates an alert on this project's windowed usage. Crossing it fires usage.threshold_crossed once per window — a calendar_month threshold fires at most once in a month, and a rolling_24h one re-arms when the windowed total falls back below 90% of the threshold, so a total hovering at the line does not alert repeatedly.
Requires the admin role: an alerting rule belongs to the account that pays, not to one member.
Request
Responses
- 201
- 400
- 401
- 403
- 404
The threshold was created.
An unknown metric or window, or a threshold that is not above zero.
Missing or invalid credentials.
The caller is a member; an alerting rule needs admin.
The resource does not exist (existence is not leaked).