Create an alert rule
POST /v1/projects/{id}/alerts
Creates a new performance alert rule for the project. The rule monitors
a specific metric on a map and triggers notifications when the failure
percentage exceeds the threshold.
Requires the resources:write scope (API key or OAuth Bearer token).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project UUID.
Request Body required
Section titled “Request Body required ”Provide the threshold profile as either thresholdProfileId (a single
profile) or thresholdProfileIds (a bundle of up to 10 profiles that
fire independently). At least one is required; when both are sent,
thresholdProfileIds takes precedence and its first element becomes the
primary profile.
object
Single threshold profile ID (the primary profile). Backward-compatible
single-profile form; use thresholdProfileIds for a multi-profile bundle.
Threshold profile bundle (1 to 10 profiles). Each profile is evaluated
and fires independently. The first element becomes the primary profile
(thresholdProfileId). Supersedes thresholdProfileId when both are sent.
Evaluation window in days. Note this differs from the analytics
days values (7, 14, 30, 90): alert evaluation also allows
1 and does not allow 90.
Notification channel IDs. Optional; defaults to an empty list.
Provide the threshold profile as either thresholdProfileId (a single
profile) or thresholdProfileIds (a bundle of up to 10 profiles that
fire independently). At least one is required; when both are sent,
thresholdProfileIds takes precedence and its first element becomes the
primary profile.
object
Single threshold profile ID (the primary profile). Backward-compatible
single-profile form; use thresholdProfileIds for a multi-profile bundle.
Threshold profile bundle (1 to 10 profiles). Each profile is evaluated
and fires independently. The first element becomes the primary profile
(thresholdProfileId). Supersedes thresholdProfileId when both are sent.
Evaluation window in days. Note this differs from the analytics
days values (7, 14, 30, 90): alert evaluation also allows
1 and does not allow 90.
Notification channel IDs. Optional; defaults to an empty list.
Responses
Section titled “ Responses ”Alert rule created.
object
Full alert rule including timestamps and channel IDs.
object
Primary threshold profile ID (the first element of thresholdProfileIds).
The rule’s effective threshold profile bundle (1 to 10 profiles), each evaluated independently. The first element is the primary profile.
Invalid request parameters or body.
RFC 9457 Problem Details. Served with the application/problem+json
media type. error_category, retryable, and retry_after are
Framedash extension members. type always defaults to about:blank,
so it is always present; detail and the extension members are present
only when applicable.
object
Problem type URI; about:blank when no specific type applies.
Short, human-readable summary of the problem type.
HTTP status code.
Human-readable explanation specific to this occurrence.
Extension member categorizing the error.
Extension member; true when retrying may succeed (e.g. 429, 503).
Extension member; suggested retry delay in seconds, when applicable.
Missing or invalid API key.
RFC 9457 Problem Details. Served with the application/problem+json
media type. error_category, retryable, and retry_after are
Framedash extension members. type always defaults to about:blank,
so it is always present; detail and the extension members are present
only when applicable.
object
Problem type URI; about:blank when no specific type applies.
Short, human-readable summary of the problem type.
HTTP status code.
Human-readable explanation specific to this occurrence.
Extension member categorizing the error.
Extension member; true when retrying may succeed (e.g. 429, 503).
Extension member; suggested retry delay in seconds, when applicable.
Missing resources:write scope (API key or OAuth Bearer token), plan limit reached, or feature not available.
RFC 9457 Problem Details. Served with the application/problem+json
media type. error_category, retryable, and retry_after are
Framedash extension members. type always defaults to about:blank,
so it is always present; detail and the extension members are present
only when applicable.
object
Problem type URI; about:blank when no specific type applies.
Short, human-readable summary of the problem type.
HTTP status code.
Human-readable explanation specific to this occurrence.
Extension member categorizing the error.
Extension member; true when retrying may succeed (e.g. 429, 503).
Extension member; suggested retry delay in seconds, when applicable.
Resource not found.
RFC 9457 Problem Details. Served with the application/problem+json
media type. error_category, retryable, and retry_after are
Framedash extension members. type always defaults to about:blank,
so it is always present; detail and the extension members are present
only when applicable.
object
Problem type URI; about:blank when no specific type applies.
Short, human-readable summary of the problem type.
HTTP status code.
Human-readable explanation specific to this occurrence.
Extension member categorizing the error.
Extension member; true when retrying may succeed (e.g. 429, 503).
Extension member; suggested retry delay in seconds, when applicable.
Rate limit exceeded.
RFC 9457 Problem Details. Served with the application/problem+json
media type. error_category, retryable, and retry_after are
Framedash extension members. type always defaults to about:blank,
so it is always present; detail and the extension members are present
only when applicable.
object
Problem type URI; about:blank when no specific type applies.
Short, human-readable summary of the problem type.
HTTP status code.
Human-readable explanation specific to this occurrence.
Extension member categorizing the error.
Extension member; true when retrying may succeed (e.g. 429, 503).
Extension member; suggested retry delay in seconds, when applicable.
Headers
Section titled “Headers ”Maximum number of requests allowed per hour.
Number of requests remaining in the current window.
Unix timestamp when the rate limit window resets.
Number of seconds to wait before retrying. Present only on 429
responses. Because the limit uses a sliding window, honor this value
per response rather than scheduling a retry for the reset time.