Skip to content

Upload a metric image for an incident

POST
/api/v4/projects/{id}/issues/{issue_iid}/metric_images

Uploads a screenshot of metric charts for an incident. Available only for incidents.

id
required
One of:
string

The ID or URL-encoded path of the project

issue_iid
required
integer

The internal ID of an issuable

Media type multipart/form-data
object
file
required

The image file to be uploaded

string format: binary
nullable
url

The url to view more metric info

string
nullable
url_text

A description of the image or URL

string
nullable

Created

Media type application/json
object
id
integer format: int64
created_at
string format: date-time
filename
string
file_path
string
url
string
url_text
string
Example
{
"id": 1,
"created_at": "2022-01-31T15:10:45.080Z",
"filename": "image.png",
"file_path": "/uploads/-/system/issuable_metric_image/file/1/image.png",
"url": "https://gitlab.example.com/example",
"url_text": "Example URL"
}

Bad Request

Not Found