PUT /v2/cache/{image_id} returns HTTP 200 response code to user but as per
proposal it should be HTTP 202. This change returns HTTP 202 response to
user.
Closes-Bug: #1971521
Change-Id: I6a875a38bef5beafe352ab3320f3fd199db89aa1
(cherry picked from commit ecb040c177)
85 lines
1.1 KiB
ReStructuredText
85 lines
1.1 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Cache Manage
|
|
************
|
|
|
|
List and manage the cache.
|
|
|
|
|
|
Query cache status
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v2/cache/
|
|
|
|
Lists all images in cache or queue.
|
|
*(Since Image API v2.14)*
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: 400, 401, 403
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
No request parameters.
|
|
|
|
|
|
Queue image
|
|
~~~~~~~~~~~
|
|
|
|
.. rest_method:: PUT /v2/cache/{image_id}/
|
|
|
|
Queues image for caching.
|
|
*(Since Image API v2.14)*
|
|
|
|
Normal response codes: 202
|
|
|
|
Error response codes: 400, 401, 403, 404
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
- image_id: image_id-in-path
|
|
|
|
|
|
Delete image from cache
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: DELETE /v2/cache/{image_id}/
|
|
|
|
Deletes a image from cache.
|
|
*(Since Image API v2.14)*
|
|
|
|
Normal response codes: 204
|
|
|
|
Error response codes: 400, 401, 403, 404
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
- image_id: image_id-in-path
|
|
|
|
|
|
Clear images from cache
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: DELETE /v2/cache/
|
|
|
|
Clears the cache and its queue.
|
|
*(Since Image API v2.14)*
|
|
|
|
Normal response codes: 204
|
|
|
|
Error response codes: 400, 401, 403
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: images-parameters.yaml
|
|
|
|
- x-image-cache-clear-target: cache-clear-header
|