Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/issues.md')
-rw-r--r--doc/api/issues.md39
1 files changed, 37 insertions, 2 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md
index 40ae6a3cd8c..5801f072062 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -2428,10 +2428,11 @@ POST /projects/:id/issues/:issue_iid/metric_images
| `issue_iid` | integer | yes | The internal ID of a project's issue |
| `file` | file | yes | The image file to be uploaded |
| `url` | string | no | The URL to view more metric information |
+| `url_text` | string | no | A description of the image or URL |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" --form 'file=@/path/to/file.png' \
---form 'url=http://example.com' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images"
+--form 'url=http://example.com' --form 'url_text=Example website' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images"
```
Example response:
@@ -2442,7 +2443,8 @@ Example response:
"created_at": "2020-11-13T00:06:18.084Z",
"filename": "file.png",
"file_path": "/uploads/-/system/issuable_metric_image/file/23/file.png",
- "url": "http://example.com"
+ "url": "http://example.com",
+ "url_text": "Example website"
}
```
@@ -2484,6 +2486,39 @@ Example response:
]
```
+## Update metric image
+
+Available only for Incident issues.
+
+```plaintext
+PUT /projects/:id/issues/:issue_iid/metric_images/:image_id
+```
+
+| Attribute | Type | Required | Description |
+|-------------|---------|----------|--------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
+| `issue_iid` | integer | yes | The internal ID of a project's issue |
+| `image_id` | integer | yes | The ID of the image |
+| `url` | string | no | The URL to view more metric information |
+| `url_text` | string | no | A description of the image or URL |
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" --request PUT --form 'url=http://example.com' --form 'url_text=Example website' "https://gitlab.example.com/api/v4/projects/5/issues/93/metric_images/1"
+```
+
+Example response:
+
+```json
+{
+ "id": 23,
+ "created_at": "2020-11-13T00:06:18.084Z",
+ "filename": "file.png",
+ "file_path": "/uploads/-/system/issuable_metric_image/file/23/file.png",
+ "url": "http://example.com",
+ "url_text": "Example website"
+}
+```
+
## Delete metric image
Available only for Incident issues.