Upload a metric image for an alert
Upload a metric image for an alert
Path parameters
-
The ID or URL-encoded path of the project.
-
The IID of the Alert
POST
/projects/{id}/alert_management_alerts/{alert_iid}/metric_images
curl \
--request POST 'https://www.gitlab.com/api/v4/projects/gitlab-org/gitlab/alert_management_alerts/{alert_iid}/metric_images' \
--header "Private-Token: $API_KEY" \
--header "Content-Type: multipart/form-data" \
--form "file=@file" \
--form "url=string" \
--form "url_text=string"
Response examples (200)
{
"id": 23,
"created_at": "2020-11-13T00:06:18Z",
"filename": "file.png",
"file_path": "/uploads/-/system/alert_metric_image/file/23/file.png",
"url": "https://example.com/metric",
"url_text": "An example metric"
}