> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
