Use this API to interact with metric images for alerts.

Additional endpoints are available with the GraphQL API.

List all metric images

GET /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images

Lists all metric images for a specified alert.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 17
alert_iid
Path, required
IntegerThe IID of the Alert
Example: 23

Responses

CodeDescriptionSchema
200OKAPIEntitiesMetricImage
400Bad Request—
404Not found—

Upload a metric image

POST /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images

Uploads a metric image for a specified alert.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 17
alert_iid
Path, required
IntegerThe IID of the Alert
Example: 23

Request body (multipart/form-data)

PropertyTypeDescription
file
Required
String (binary)The image file to be uploaded
urlStringThe url to view more metric info
Example: https://example.com/metric
url_textStringA description of the image or URL
Example: An example metric

Responses

CodeDescriptionSchema
200OKAPIEntitiesMetricImage
400Bad Request—
403Forbidden—
404Not Found—

Workhorse authorize metric image file upload

POST /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 17
alert_iid
Path, required
IntegerThe IID of the Alert
Example: 23

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
403Forbidden—
404Not Found—

Update a metric image

PUT /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}

Updates a specified metric image for an alert.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 17
alert_iid
Path, required
IntegerThe IID of the Alert
Example: 23
metric_image_id
Path, required
IntegerThe ID of metric image
Example: 42

Request body (multipart/form-data)

PropertyTypeDescription
urlStringThe url to view more metric info
Example: https://example.com/metric
url_textStringA description of the image or URL
Example: An example metric

Responses

CodeDescriptionSchema
200OKAPIEntitiesMetricImage
400Bad Request—
403Forbidden—
404Not Found—
422Unprocessable entity—

Delete a metric image

DELETE /api/v4/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}

Deletes a specified metric image for an alert.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
Example: 17
alert_iid
Path, required
IntegerThe IID of the Alert
Example: 23
metric_image_id
Path, required
IntegerThe ID of metric image
Example: 42

Responses

CodeDescriptionSchema
204No ContentAPIEntitiesMetricImage
400Bad Request—
403Forbidden—
404Not Found—
422Unprocessable entity—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesMetricImage

PropertyTypeDescription
created_atString (date-time)Example: 2020-11-13T00:06:18.084Z
file_pathStringExample: /uploads/-/system/alert_metric_image/file/23/file.png
filenameStringExample: file.png
idInteger (int64)Example: 23
urlStringExample: https://example.com/metric
url_textStringExample: An example metric