Add image tag¶
Overview¶
Adds a specified tag to a specified image.
Classification¶
- Create
API Operation Object¶
- tags
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- PUT
HTTP Request Path¶
{api_endpoint}/v2/images/{image_id}/tags/{tag}
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response_code> <message> (ex. 204 No Content)
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Code¶
response code | condition |
---|---|
204 | normal end |
* | Follow a Common Error Code |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/images/{image_id}/tags/{tag}
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
Request Body¶
- none
Sample API Response¶
Response Header¶
HTTP/1.1 204 No Content
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Body¶
- none
Execution Example¶
HTTP Request¶
PUT /v2/images/82c96579-ba53-4a84-a69a-716382fe0293/tags/tag1-1 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
Accept: */*
X-Auth-Token: 0c3a50a694f44b748abd8e0660ecbd45
HTTP Response¶
HTTP/1.1 204 No Content
Content-Type: text/html; charset=UTF-8
Content-Length: 0
X-Openstack-Request-Id: req-a6121808-f098-4a3d-9d93-8ba063305817
Date: Thu, 15 Oct 2015 16:09:37 GMT
Error Execution Example¶
HTTP Request¶
PUT /v2/images/82c96579-ba53-4a84-a69a-716382fe0293/tags/ HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
Accept: */*
X-Auth-Token: 0c3a50a694f44b748abd8e0660ecbd45
HTTP Response¶
HTTP/1.1 404 Not Found
Content-Length: 154
Content-Type: text/html; charset=UTF-8
X-Openstack-Request-Id: req-a6356911-a968-4da6-b01d-739e6a395620
Date: Thu, 15 Oct 2015 16:11:39 GMT
404 Not Found
The resource could not be found.