Image Tags collection

Registered by Jay Pipes

OpenStack Images API 2.0

Given the dynamic image fields added to the 2.0 API, the use of custom key/value properties should be removed and replaced with the simpler, more common, use of a tags collection tied to the image.

Image Tags Subcollection
Each image in an Image Registry may have zero or more text tags associated with it. These tags are simple string values.
Get Image Tags
To retrieve a list of an image’s tags, use the following call:

GET /images/<IMAGE_ID>/tags

The request body is ignored.

A successful response will return a 200 OK. The response will be a JSON-encoded list of string tags attached to the image with an identifier <IMAGE_ID>, like so:

[
 <STRING>, ...
]

If an image with image ID <IMAGE_ID> is not found in the registry, a 404 Not Found shall be returned.
Add a Tag to an Image
To add a tag to an image, use the following call:

PUT /v2/images/<IMAGE_ID>/tags/<TAG>

The request body is ignored.

The <TAG> value shall be a URL-encoded string no more than 64 characters long.

A successful response will return a 204 No Content. The tags added to the image will have their owner attribute set to the currently-authenticated account, or None if authentication is not enabled.

If an image with image ID <IMAGE_ID> does not exist, a 404 Not Found shall be returned.

If a tag <TAG> already exists for an image with image ID <IMAGE_ID>, a 204 No Content will be returned.
Replace an Image's Tags
If you want to entirely replace an image’s set of tags, use the following call:

PUT /v2/images/<IMAGE_ID>/tags

The request body shall be a JSON-encoded mapping that lists the tags to attach to the image with image ID <IMAGE_ID>:

[
 <STRING>, ...
]

A successful response will return a 204 No Content. The image with image ID <IMAGE_ID> will have its set of tags replaced with the set of <STRING> values in the request body.

If an image with image ID <IMAGE_ID> does not exist, a 404 Not Found shall be returned.
Delete All Tags from an Image
To remove all of the tags associated with an image, use the following call:

DELETE /v2/images/<IMAGE_ID>/tags

The request body is ignored.

A successful response will return a 204 No Content. All of the image’s will be deleted.

If an image with image ID <IMAGE_ID> does not exist, a 404 Not Found shall be returned.

If authentication is enabled and the authenticated account does not have permission to remove all of an image’s tags, a 403 Forbidden will be returned.
Delete a Tag from an Image
To remove a single property from an image, us the following call:

DELETE /v2/images/<IMAGE_ID>/tags/<TAG>

The request body is ignored.

A successful response will return a 204 No Content. The image tag <TAG> for image with image ID <IMAGE_ID> will be deleted.

If an image with image ID <IMAGE_ID> does not exist, a 404 Not Found shall be returned.
If a tag <TAG> does not exist for image with image ID <IMAGE_ID>, a 404 Not Found shall be returned.

If authentication is enabled and the authenticated account does not have permission to remove all of an image’s tags, a 403 Forbidden will be returned.

Blueprint information

Status:
Complete
Approver:
Jay Pipes
Priority:
High
Drafter:
Jay Pipes
Direction:
Approved
Assignee:
Jay Pipes
Definition:
Superseded
Series goal:
None
Implementation:
Not started
Milestone target:
None
Completed by
Brian Waldon

Related branches

Sprints

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.