# Images

Creates, lists, shows, updates, deletes, and performs other operations on images

## List images

> Lists public virtual machine (VM) images with pagination and filtering support

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"}},"schemas":{"ImageList":{"type":"object","properties":{"images":{"type":"array","items":{"$ref":"#/components/schemas/Image"}},"first":{"format":"uri","description":"URI for the first page of response","type":"string"},"next":{"format":"uri","description":"URI for the next page of response","type":"string"},"schema":{"format":"uri","description":"URL for the schema describing a list of images","type":"string"}}},"Image":{"required":["id","status","visibility","protected","tags","created_at","updated_at","self","schema"],"type":"object","properties":{"id":{"format":"uuid","description":"A unique identifier for the image","type":"string","readOnly":true},"name":{"nullable":true,"description":"The name of the image","type":"string"},"status":{"description":"The image status","enum":["queued","saving","active","killed","deleted","pending_delete","deactivated","uploading","importing"],"type":"string","readOnly":true},"visibility":{"description":"Image visibility","enum":["public","private","community","shared"],"type":"string"},"protected":{"description":"Image protection for deletion","type":"boolean"},"tags":{"description":"List of tags for this image","type":"array","items":{"maxLength":255,"type":"string"}},"container_format":{"nullable":true,"description":"Format of the image container","enum":["ami","ari","aki","bare","ovf","ova","docker","compressed"],"type":"string"},"disk_format":{"nullable":true,"description":"The format of the disk","enum":["ami","ari","aki","vhd","vhdx","vmdk","raw","qcow2","vdi","iso","ploop"],"type":"string"},"min_disk":{"description":"Amount of disk space in GB required to boot the image","type":"integer"},"min_ram":{"description":"Amount of RAM in MB required to boot the image","type":"integer"},"size":{"nullable":true,"description":"The size of the image data, in bytes","type":"integer","readOnly":true},"virtual_size":{"nullable":true,"description":"The virtual size of the image","type":"integer","readOnly":true},"checksum":{"nullable":true,"description":"MD5 hash of image contents","type":"string","readOnly":true},"os_hash_algo":{"nullable":true,"description":"Algorithm used to compute secure hash","type":"string","readOnly":true},"os_hash_value":{"nullable":true,"description":"Hexdigest of the secure hash","type":"string","readOnly":true},"os_hidden":{"description":"Controls whether image is displayed in default image list","type":"boolean"},"owner":{"nullable":true,"description":"An identifier for the owner of the image","type":"string","readOnly":true},"created_at":{"format":"date-time","description":"Date and time when the image was created","type":"string","readOnly":true},"updated_at":{"format":"date-time","description":"Date and time when the image was last updated","type":"string","readOnly":true},"self":{"format":"uri","description":"URL for the image","type":"string","readOnly":true},"file":{"format":"uri","description":"URL for the image file","type":"string","readOnly":true},"schema":{"format":"uri","description":"URL for the schema describing the image","type":"string","readOnly":true},"direct_url":{"format":"uri","description":"URL to access the image file kept in external store","type":"string","readOnly":true},"locations":{"description":"List of image locations","type":"array","items":{"type":"object","properties":{"url":{"format":"uri","type":"string"},"metadata":{"type":"object"}}},"readOnly":true}},"additionalProperties":{"description":"Additional custom properties","type":"string"}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}},"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"}}},"paths":{"/images":{"get":{"tags":["Images"],"parameters":[{"name":"limit","description":"Requests a page size of items","schema":{"type":"integer"},"in":"query"},{"name":"marker","description":"The ID of the last-seen item","schema":{"type":"string"},"in":"query"},{"name":"name","description":"Filters the response by a name","schema":{"type":"string"},"in":"query"},{"name":"owner","description":"Filters the response by a project ID","schema":{"type":"string"},"in":"query"},{"name":"protected","description":"Filters the response by the 'protected' image property","schema":{"type":"boolean"},"in":"query"},{"name":"status","description":"Filters the response by an image status","schema":{"enum":["queued","saving","active","killed","deleted","pending_delete","deactivated","uploading","importing"],"type":"string"},"in":"query"},{"name":"tag","description":"Filters the response by the specified tag value","schema":{"type":"string"},"in":"query"},{"name":"visibility","description":"Filters the response by an image visibility value","schema":{"enum":["public","private","community","shared"],"type":"string"},"in":"query"},{"name":"os_hidden","description":"When true, filters the response to include only hidden images","schema":{"type":"boolean"},"in":"query"},{"name":"member_status","description":"Filters the response by a member status","schema":{"enum":["pending","accepted","rejected"],"type":"string"},"in":"query"},{"name":"size_max","description":"Filters the response by a maximum image size, in bytes","schema":{"type":"string"},"in":"query"},{"name":"size_min","description":"Filters the response by a minimum image size, in bytes","schema":{"type":"string"},"in":"query"},{"name":"created_at","description":"Specify a comparison filter based on the date and time when the resource was created","schema":{"type":"string"},"in":"query"},{"name":"updated_at","description":"Specify a comparison filter based on the date and time when the resource was most recently modified","schema":{"type":"string"},"in":"query"},{"name":"sort_dir","description":"Sorts the response by direction","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"},{"name":"sort_key","description":"Sorts the response by an attribute","schema":{"type":"string"},"in":"query"},{"name":"sort","description":"Sorts the response by one or more attribute and sort direction combinations","schema":{"type":"string"},"in":"query"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageList"}}},"description":"Images retrieved successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"operationId":"listImages","summary":"List images","description":"Lists public virtual machine (VM) images with pagination and filtering support"}}}}
```

## Create image

> Creates a catalog record for an operating system disk image

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"}},"schemas":{"ImageCreate":{"type":"object","properties":{"id":{"format":"uuid","description":"A unique, user-defined image UUID","type":"string"},"name":{"description":"The name of the image","type":"string"},"container_format":{"description":"Format of the image container","enum":["ami","ari","aki","bare","ovf","ova","docker","compressed"],"type":"string"},"disk_format":{"description":"The format of the disk","enum":["ami","ari","aki","vhd","vhdx","vmdk","raw","qcow2","vdi","iso","ploop"],"type":"string"},"min_disk":{"description":"Amount of disk space in GB that is required to boot the image","type":"integer"},"min_ram":{"description":"Amount of RAM in MB that is required to boot the image","type":"integer"},"protected":{"description":"Image protection for deletion","type":"boolean"},"tags":{"description":"List of tags for this image","type":"array","items":{"maxLength":255,"type":"string"}},"visibility":{"description":"Visibility for this image","enum":["public","private","community","shared"],"type":"string"}},"additionalProperties":{"description":"Additional custom properties","type":"string"}},"Image":{"required":["id","status","visibility","protected","tags","created_at","updated_at","self","schema"],"type":"object","properties":{"id":{"format":"uuid","description":"A unique identifier for the image","type":"string","readOnly":true},"name":{"nullable":true,"description":"The name of the image","type":"string"},"status":{"description":"The image status","enum":["queued","saving","active","killed","deleted","pending_delete","deactivated","uploading","importing"],"type":"string","readOnly":true},"visibility":{"description":"Image visibility","enum":["public","private","community","shared"],"type":"string"},"protected":{"description":"Image protection for deletion","type":"boolean"},"tags":{"description":"List of tags for this image","type":"array","items":{"maxLength":255,"type":"string"}},"container_format":{"nullable":true,"description":"Format of the image container","enum":["ami","ari","aki","bare","ovf","ova","docker","compressed"],"type":"string"},"disk_format":{"nullable":true,"description":"The format of the disk","enum":["ami","ari","aki","vhd","vhdx","vmdk","raw","qcow2","vdi","iso","ploop"],"type":"string"},"min_disk":{"description":"Amount of disk space in GB required to boot the image","type":"integer"},"min_ram":{"description":"Amount of RAM in MB required to boot the image","type":"integer"},"size":{"nullable":true,"description":"The size of the image data, in bytes","type":"integer","readOnly":true},"virtual_size":{"nullable":true,"description":"The virtual size of the image","type":"integer","readOnly":true},"checksum":{"nullable":true,"description":"MD5 hash of image contents","type":"string","readOnly":true},"os_hash_algo":{"nullable":true,"description":"Algorithm used to compute secure hash","type":"string","readOnly":true},"os_hash_value":{"nullable":true,"description":"Hexdigest of the secure hash","type":"string","readOnly":true},"os_hidden":{"description":"Controls whether image is displayed in default image list","type":"boolean"},"owner":{"nullable":true,"description":"An identifier for the owner of the image","type":"string","readOnly":true},"created_at":{"format":"date-time","description":"Date and time when the image was created","type":"string","readOnly":true},"updated_at":{"format":"date-time","description":"Date and time when the image was last updated","type":"string","readOnly":true},"self":{"format":"uri","description":"URL for the image","type":"string","readOnly":true},"file":{"format":"uri","description":"URL for the image file","type":"string","readOnly":true},"schema":{"format":"uri","description":"URL for the schema describing the image","type":"string","readOnly":true},"direct_url":{"format":"uri","description":"URL to access the image file kept in external store","type":"string","readOnly":true},"locations":{"description":"List of image locations","type":"array","items":{"type":"object","properties":{"url":{"format":"uri","type":"string"},"metadata":{"type":"object"}}},"readOnly":true}},"additionalProperties":{"description":"Additional custom properties","type":"string"}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}},"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"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"PayloadTooLarge":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payload Too Large"},"UnsupportedMediaType":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported Media Type"}}},"paths":{"/images":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageCreate"}}},"required":true},"tags":["Images"],"responses":{"201":{"headers":{"Location":{"schema":{"type":"string"},"description":"The URL to access the image file from the external store"},"OpenStack-image-import-methods":{"schema":{"type":"string"},"description":"A comma separated list of import method identifiers"},"OpenStack-image-store-ids":{"schema":{"type":"string"},"description":"A comma separated list of available store identifiers"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}},"description":"Image created successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"}},"operationId":"createImage","summary":"Create image","description":"Creates a catalog record for an operating system disk image"}}}}
```

## Show image details

> Shows details for an image

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"}},"schemas":{"Image":{"required":["id","status","visibility","protected","tags","created_at","updated_at","self","schema"],"type":"object","properties":{"id":{"format":"uuid","description":"A unique identifier for the image","type":"string","readOnly":true},"name":{"nullable":true,"description":"The name of the image","type":"string"},"status":{"description":"The image status","enum":["queued","saving","active","killed","deleted","pending_delete","deactivated","uploading","importing"],"type":"string","readOnly":true},"visibility":{"description":"Image visibility","enum":["public","private","community","shared"],"type":"string"},"protected":{"description":"Image protection for deletion","type":"boolean"},"tags":{"description":"List of tags for this image","type":"array","items":{"maxLength":255,"type":"string"}},"container_format":{"nullable":true,"description":"Format of the image container","enum":["ami","ari","aki","bare","ovf","ova","docker","compressed"],"type":"string"},"disk_format":{"nullable":true,"description":"The format of the disk","enum":["ami","ari","aki","vhd","vhdx","vmdk","raw","qcow2","vdi","iso","ploop"],"type":"string"},"min_disk":{"description":"Amount of disk space in GB required to boot the image","type":"integer"},"min_ram":{"description":"Amount of RAM in MB required to boot the image","type":"integer"},"size":{"nullable":true,"description":"The size of the image data, in bytes","type":"integer","readOnly":true},"virtual_size":{"nullable":true,"description":"The virtual size of the image","type":"integer","readOnly":true},"checksum":{"nullable":true,"description":"MD5 hash of image contents","type":"string","readOnly":true},"os_hash_algo":{"nullable":true,"description":"Algorithm used to compute secure hash","type":"string","readOnly":true},"os_hash_value":{"nullable":true,"description":"Hexdigest of the secure hash","type":"string","readOnly":true},"os_hidden":{"description":"Controls whether image is displayed in default image list","type":"boolean"},"owner":{"nullable":true,"description":"An identifier for the owner of the image","type":"string","readOnly":true},"created_at":{"format":"date-time","description":"Date and time when the image was created","type":"string","readOnly":true},"updated_at":{"format":"date-time","description":"Date and time when the image was last updated","type":"string","readOnly":true},"self":{"format":"uri","description":"URL for the image","type":"string","readOnly":true},"file":{"format":"uri","description":"URL for the image file","type":"string","readOnly":true},"schema":{"format":"uri","description":"URL for the schema describing the image","type":"string","readOnly":true},"direct_url":{"format":"uri","description":"URL to access the image file kept in external store","type":"string","readOnly":true},"locations":{"description":"List of image locations","type":"array","items":{"type":"object","properties":{"url":{"format":"uri","type":"string"},"metadata":{"type":"object"}}},"readOnly":true}},"additionalProperties":{"description":"Additional custom properties","type":"string"}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}},"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"}}},"paths":{"/images/{image_id}":{"get":{"tags":["Images"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}},"description":"Image details retrieved successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"showImage","summary":"Show image details","description":"Shows details for an image"}}}}
```

## Delete image

> Deletes an image

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}}},"paths":{"/images/{image_id}":{"delete":{"tags":["Images"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Image deleted successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}},"operationId":"deleteImage","summary":"Delete image","description":"Deletes an image"}}}}
```

## Update image

> Updates an image using JSON Patch operations

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"}},"schemas":{"JsonPatchOperation":{"required":["op","path"],"type":"object","properties":{"op":{"description":"The operation to perform","enum":["add","remove","replace"],"type":"string"},"path":{"description":"JSON pointer to the location in the target document","type":"string"},"value":{"description":"The value to use for the operation"}},"additionalProperties":false},"Image":{"required":["id","status","visibility","protected","tags","created_at","updated_at","self","schema"],"type":"object","properties":{"id":{"format":"uuid","description":"A unique identifier for the image","type":"string","readOnly":true},"name":{"nullable":true,"description":"The name of the image","type":"string"},"status":{"description":"The image status","enum":["queued","saving","active","killed","deleted","pending_delete","deactivated","uploading","importing"],"type":"string","readOnly":true},"visibility":{"description":"Image visibility","enum":["public","private","community","shared"],"type":"string"},"protected":{"description":"Image protection for deletion","type":"boolean"},"tags":{"description":"List of tags for this image","type":"array","items":{"maxLength":255,"type":"string"}},"container_format":{"nullable":true,"description":"Format of the image container","enum":["ami","ari","aki","bare","ovf","ova","docker","compressed"],"type":"string"},"disk_format":{"nullable":true,"description":"The format of the disk","enum":["ami","ari","aki","vhd","vhdx","vmdk","raw","qcow2","vdi","iso","ploop"],"type":"string"},"min_disk":{"description":"Amount of disk space in GB required to boot the image","type":"integer"},"min_ram":{"description":"Amount of RAM in MB required to boot the image","type":"integer"},"size":{"nullable":true,"description":"The size of the image data, in bytes","type":"integer","readOnly":true},"virtual_size":{"nullable":true,"description":"The virtual size of the image","type":"integer","readOnly":true},"checksum":{"nullable":true,"description":"MD5 hash of image contents","type":"string","readOnly":true},"os_hash_algo":{"nullable":true,"description":"Algorithm used to compute secure hash","type":"string","readOnly":true},"os_hash_value":{"nullable":true,"description":"Hexdigest of the secure hash","type":"string","readOnly":true},"os_hidden":{"description":"Controls whether image is displayed in default image list","type":"boolean"},"owner":{"nullable":true,"description":"An identifier for the owner of the image","type":"string","readOnly":true},"created_at":{"format":"date-time","description":"Date and time when the image was created","type":"string","readOnly":true},"updated_at":{"format":"date-time","description":"Date and time when the image was last updated","type":"string","readOnly":true},"self":{"format":"uri","description":"URL for the image","type":"string","readOnly":true},"file":{"format":"uri","description":"URL for the image file","type":"string","readOnly":true},"schema":{"format":"uri","description":"URL for the schema describing the image","type":"string","readOnly":true},"direct_url":{"format":"uri","description":"URL to access the image file kept in external store","type":"string","readOnly":true},"locations":{"description":"List of image locations","type":"array","items":{"type":"object","properties":{"url":{"format":"uri","type":"string"},"metadata":{"type":"object"}}},"readOnly":true}},"additionalProperties":{"description":"Additional custom properties","type":"string"}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"details":{"type":"string"}}}}}},"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"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"PayloadTooLarge":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payload Too Large"},"UnsupportedMediaType":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported Media Type"}}},"paths":{"/images/{image_id}":{"patch":{"requestBody":{"content":{"application/openstack-images-v2.1-json-patch":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JsonPatchOperation"}}}},"required":true},"tags":["Images"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}},"description":"Image updated successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"}},"operationId":"updateImage","summary":"Update image","description":"Updates an image using JSON Patch operations"}}}}
```

## Deactivate image

> Deactivates an image (admin only)

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"},"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}/actions/deactivate":{"post":{"tags":["Images"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Image deactivated successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"deactivateImage","summary":"Deactivate image","description":"Deactivates an image (admin only)"}}}}
```

## Reactivate image

> Reactivates an image (admin only)

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Image Service API v2","version":"2.0"},"tags":[{"name":"Images","description":"Creates, lists, shows, updates, deletes, and performs other operations on images"}],"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"},"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}/actions/reactivate":{"post":{"tags":["Images"],"parameters":[{"name":"image_id","description":"The UUID of the image","schema":{"format":"uuid","type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Image reactivated successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"reactivateImage","summary":"Reactivate image","description":"Reactivates an image (admin only)"}}}}
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
