> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/api-docs/image-service/image-tags.md).

# Image Tags

Adds and deletes image tags

## Add image tag

> Adds a tag to an image

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Image Tags","description":"Adds and deletes image tags"}],"servers":[{"url":"https://{host}/glance/v2","description":"PCD Image API v2","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}}},"paths":{"/images/{image_id}/tags/{tag}":{"put":{"tags":["Image Tags"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true},{"name":"tag","description":"The tag to add (max 255 characters)","schema":{"maxLength":255,"type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Tag added successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"addImageTag","summary":"Add image tag","description":"Adds a tag to an image"}}}}
```

## Delete image tag

> Deletes a tag from an image

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Image Tags","description":"Adds and deletes image tags"}],"servers":[{"url":"https://{host}/glance/v2","description":"PCD Image API v2","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}}},"paths":{"/images/{image_id}/tags/{tag}":{"delete":{"tags":["Image Tags"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true},{"name":"tag","description":"The tag to delete","schema":{"maxLength":255,"type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Tag deleted successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"deleteImageTag","summary":"Delete image tag","description":"Deletes a tag from an image"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/api-docs/image-service/image-tags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
