openapi: 3.0.3
info:
  title: OpenStack Image Service API v2
  version: "2.0"
  description: >
    The OpenStack Image Service API v2 enables you to store and retrieve disk
    and server images.

    This specification covers the core image management operations including
    Images, Image Tags, Image Data, and Image Service Info endpoints.
  contact:
    name: OpenStack
    url: https://docs.openstack.org/api-ref/image/v2/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-gitbook-description-document:
    object: document
    data:
      schemaVersion: 8
    nodes:
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: >-
                  The OpenStack Image Service API v2 enables you to store and
                  retrieve disk and server images. This specification covers the
                  core image management operations including Images, Image Tags,
                  Image Data, and Image Service Info endpoints.
                marks: []
  x-gitbook-description-html: >-
    <p>The OpenStack Image Service API v2 enables you to store and retrieve disk
    and server images. This specification covers the core image management
    operations including Images, Image Tags, Image Data, and Image Service Info
    endpoints.</p>
servers:
  - url: https://{host}/glance/v2
    description: PCD Image API v2
    variables:
      host:
        default: example.platform9.com
        description: The PCD controlplane hostname
        x-gitbook-description-html: <p>The PCD controlplane hostname</p>
    x-gitbook-description-html: <p>PCD Image API v2</p>
paths:
  /images:
    get:
      tags:
        - Images
      parameters:
        - name: limit
          description: Requests a page size of items
          schema:
            type: integer
          in: query
          x-gitbook-description-html: <p>Requests a page size of items</p>
        - name: marker
          description: The ID of the last-seen item
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>The ID of the last-seen item</p>
        - name: name
          description: Filters the response by a name
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by a name</p>
        - name: owner
          description: Filters the response by a project ID
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by a project ID</p>
        - name: protected
          description: Filters the response by the 'protected' image property
          schema:
            type: boolean
          in: query
          x-gitbook-description-html: <p>Filters the response by the 'protected' image property</p>
        - 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
          x-gitbook-description-html: <p>Filters the response by an image status</p>
        - name: tag
          description: Filters the response by the specified tag value
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by the specified tag value</p>
        - name: visibility
          description: Filters the response by an image visibility value
          schema:
            enum:
              - public
              - private
              - community
              - shared
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by an image visibility value</p>
        - name: os_hidden
          description: When true, filters the response to include only hidden images
          schema:
            type: boolean
          in: query
          x-gitbook-description-html: <p>When true, filters the response to include only hidden images</p>
        - name: member_status
          description: Filters the response by a member status
          schema:
            enum:
              - pending
              - accepted
              - rejected
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by a member status</p>
        - name: size_max
          description: Filters the response by a maximum image size, in bytes
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by a maximum image size, in bytes</p>
        - name: size_min
          description: Filters the response by a minimum image size, in bytes
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Filters the response by a minimum image size, in bytes</p>
        - name: created_at
          description: >-
            Specify a comparison filter based on the date and time when the
            resource was created
          schema:
            type: string
          in: query
          x-gitbook-description-html: >-
            <p>Specify a comparison filter based on the date and time when the
            resource was created</p>
        - 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
          x-gitbook-description-html: >-
            <p>Specify a comparison filter based on the date and time when the
            resource was most recently modified</p>
        - name: sort_dir
          description: Sorts the response by direction
          schema:
            enum:
              - asc
              - desc
            type: string
          in: query
          x-gitbook-description-html: <p>Sorts the response by direction</p>
        - name: sort_key
          description: Sorts the response by an attribute
          schema:
            type: string
          in: query
          x-gitbook-description-html: <p>Sorts the response by an attribute</p>
        - name: sort
          description: >-
            Sorts the response by one or more attribute and sort direction
            combinations
          schema:
            type: string
          in: query
          x-gitbook-description-html: >-
            <p>Sorts the response by one or more attribute and sort direction
            combinations</p>
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageList"
          description: Images retrieved successfully
          x-gitbook-description-html: <p>Images retrieved successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Lists public virtual machine (VM) images with pagination
                      and filtering support
                    marks: []
      x-gitbook-description-html: >-
        <p>Lists public virtual machine (VM) images with pagination and
        filtering support</p>
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImageCreate"
            example:
              container_format: bare
              disk_format: raw
              name: Ubuntu
              id: b2173dd3-7ad6-4362-baa6-a68bce3565cb
        required: true
      tags:
        - Images
      responses:
        "201":
          headers:
            Location:
              schema:
                type: string
              description: The URL to access the image file from the external store
              x-gitbook-description-html: <p>The URL to access the image file from the external store</p>
            OpenStack-image-import-methods:
              schema:
                type: string
              description: A comma separated list of import method identifiers
              x-gitbook-description-html: <p>A comma separated list of import method identifiers</p>
            OpenStack-image-store-ids:
              schema:
                type: string
              description: A comma separated list of available store identifiers
              x-gitbook-description-html: <p>A comma separated list of available store identifiers</p>
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Image"
          description: Image created successfully
          x-gitbook-description-html: <p>Image created successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Creates a catalog record for an operating system disk
                      image
                    marks: []
      x-gitbook-description-html: <p>Creates a catalog record for an operating system disk image</p>
  /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
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Image"
          description: Image details retrieved successfully
          x-gitbook-description-html: <p>Image details retrieved successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows details for an image
                    marks: []
      x-gitbook-description-html: <p>Shows details for an image</p>
    delete:
      tags:
        - Images
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "204":
          description: Image deleted successfully
          x-gitbook-description-html: <p>Image deleted successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes an image
                    marks: []
      x-gitbook-description-html: <p>Deletes an image</p>
    patch:
      requestBody:
        content:
          application/openstack-images-v2.1-json-patch:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/JsonPatchOperation"
            example:
              - op: replace
                path: /name
                value: Fedora 17
              - op: replace
                path: /tags
                value:
                  - fedora
                  - beefy
        required: true
      tags:
        - Images
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Image"
          description: Image updated successfully
          x-gitbook-description-html: <p>Image updated successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Updates an image using JSON Patch operations
                    marks: []
      x-gitbook-description-html: <p>Updates an image using JSON Patch operations</p>
  /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
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "204":
          description: Image deactivated successfully
          x-gitbook-description-html: <p>Image deactivated successfully</p>
        "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)
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deactivates an image (admin only)
                    marks: []
      x-gitbook-description-html: <p>Deactivates an image (admin only)</p>
  /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
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "204":
          description: Image reactivated successfully
          x-gitbook-description-html: <p>Image reactivated successfully</p>
        "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)
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Reactivates an image (admin only)
                    marks: []
      x-gitbook-description-html: <p>Reactivates an image (admin only)</p>
  /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
          x-gitbook-description-html: <p>The UUID of the image</p>
        - name: tag
          description: The tag to add (max 255 characters)
          schema:
            maxLength: 255
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The tag to add (max 255 characters)</p>
      responses:
        "204":
          description: Tag added successfully
          x-gitbook-description-html: <p>Tag added successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Adds a tag to an image
                    marks: []
      x-gitbook-description-html: <p>Adds a tag to an image</p>
    delete:
      tags:
        - Image Tags
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
        - name: tag
          description: The tag to delete
          schema:
            maxLength: 255
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The tag to delete</p>
      responses:
        "204":
          description: Tag deleted successfully
          x-gitbook-description-html: <p>Tag deleted successfully</p>
        "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
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Deletes a tag from an image
                    marks: []
      x-gitbook-description-html: <p>Deletes a tag from an image</p>
  /images/{image_id}/file:
    get:
      tags:
        - Image Data
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
        - name: Range
          description: The range of image data requested
          schema:
            type: string
          in: header
          required: false
          x-gitbook-description-html: <p>The range of image data requested</p>
      responses:
        "200":
          headers:
            Content-Type:
              schema:
                default: application/octet-stream
                type: string
              description: The media type descriptor of the response body
              x-gitbook-description-html: <p>The media type descriptor of the response body</p>
            Content-MD5:
              schema:
                type: string
              description: The MD5 checksum of the body
              x-gitbook-description-html: <p>The MD5 checksum of the body</p>
            Content-Length:
              schema:
                type: string
              description: The length of the body in octets
              x-gitbook-description-html: <p>The length of the body in octets</p>
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: Image data downloaded successfully
          x-gitbook-description-html: <p>Image data downloaded successfully</p>
        "204":
          description: No image data exists
          x-gitbook-description-html: <p>No image data exists</p>
        "206":
          headers:
            Content-Range:
              schema:
                type: string
              description: The content range of image data
              x-gitbook-description-html: <p>The content range of image data</p>
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: Partial content returned
          x-gitbook-description-html: <p>Partial content returned</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "416":
          description: Range Not Satisfiable
          x-gitbook-description-html: <p>Range Not Satisfiable</p>
      operationId: downloadImageData
      summary: Download image data
      description: Downloads binary image data
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Downloads binary image data
                    marks: []
      x-gitbook-description-html: <p>Downloads binary image data</p>
    put:
      requestBody:
        content:
          application/octet-stream:
            schema:
              format: binary
              type: string
        required: true
      tags:
        - Image Data
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
        - name: X-Image-Meta-Store
          description: A store identifier to upload image data
          schema:
            type: string
          in: header
          required: false
          x-gitbook-description-html: <p>A store identifier to upload image data</p>
      responses:
        "204":
          description: Image data uploaded successfully
          x-gitbook-description-html: <p>Image data uploaded successfully</p>
        "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"
        "410":
          $ref: "#/components/responses/Gone"
        "413":
          $ref: "#/components/responses/PayloadTooLarge"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      operationId: uploadImageData
      summary: Upload image data
      description: Uploads binary image data
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Uploads binary image data
                    marks: []
      x-gitbook-description-html: <p>Uploads binary image data</p>
  /images/{image_id}/stage:
    put:
      requestBody:
        content:
          application/octet-stream:
            schema:
              format: binary
              type: string
        required: true
      tags:
        - Image Data
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
      responses:
        "204":
          description: Image data staged successfully
          x-gitbook-description-html: <p>Image data staged successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "405":
          description: Method Not Allowed
          x-gitbook-description-html: <p>Method Not Allowed</p>
        "409":
          $ref: "#/components/responses/Conflict"
        "410":
          $ref: "#/components/responses/Gone"
        "413":
          $ref: "#/components/responses/PayloadTooLarge"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      operationId: stageImageData
      summary: Stage image data
      description: >-
        Places the binary image data in a staging area for interoperable image
        import
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Places the binary image data in a staging area for
                      interoperable image import
                    marks: []
      x-gitbook-description-html: >-
        <p>Places the binary image data in a staging area for interoperable
        image import</p>
  /images/{image_id}/import:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImageImport"
        required: true
      tags:
        - Image Data
      parameters:
        - name: image_id
          description: The UUID of the image
          schema:
            format: uuid
            type: string
          in: path
          required: true
          x-gitbook-description-html: <p>The UUID of the image</p>
        - name: X-Image-Meta-Store
          description: A store identifier to import image data
          schema:
            type: string
          in: header
          required: false
          x-gitbook-description-html: <p>A store identifier to import image data</p>
      responses:
        "202":
          description: Image import initiated successfully
          x-gitbook-description-html: <p>Image import initiated successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "405":
          description: Method Not Allowed
          x-gitbook-description-html: <p>Method Not Allowed</p>
        "409":
          $ref: "#/components/responses/Conflict"
        "410":
          $ref: "#/components/responses/Gone"
        "413":
          $ref: "#/components/responses/PayloadTooLarge"
        "415":
          $ref: "#/components/responses/UnsupportedMediaType"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      operationId: importImage
      summary: Import image
      description: Signals the Image Service to complete the image import workflow
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Signals the Image Service to complete the image import
                      workflow
                    marks: []
      x-gitbook-description-html: <p>Signals the Image Service to complete the image import workflow</p>
  /info/import:
    get:
      tags:
        - Image Service Info
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImportInfo"
          description: Import information retrieved successfully
          x-gitbook-description-html: <p>Import information retrieved successfully</p>
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
      operationId: showImportInfo
      summary: Show import information
      description: Returns information concerning the constraints around image import
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      Returns information concerning the constraints around
                      image import
                    marks: []
      x-gitbook-description-html: >-
        <p>Returns information concerning the constraints around image
        import</p>
  /info/stores:
    get:
      tags:
        - Image Service Info
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StoreInfo"
          description: Store information retrieved successfully
          x-gitbook-description-html: <p>Store information retrieved successfully</p>
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: showStores
      summary: Show available stores
      description: Returns information about available stores
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Returns information about available stores
                    marks: []
      x-gitbook-description-html: <p>Returns information about available stores</p>
  /info/usage:
    get:
      tags:
        - Image Service Info
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsageInfo"
          description: Usage information retrieved successfully
          x-gitbook-description-html: <p>Usage information retrieved successfully</p>
      operationId: showUsageInfo
      summary: Show usage information
      description: Shows the user's quota and current usage
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 8
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: Shows the user's quota and current usage
                    marks: []
      x-gitbook-description-html: <p>Shows the user's quota and current usage</p>
components:
  schemas:
    ImageCreate:
      type: object
      properties:
        id:
          format: uuid
          description: A unique, user-defined image UUID
          type: string
          x-gitbook-description-html: <p>A unique, user-defined image UUID</p>
        name:
          description: The name of the image
          type: string
          x-gitbook-description-html: <p>The name of the image</p>
        container_format:
          description: Format of the image container
          enum:
            - ami
            - ari
            - aki
            - bare
            - ovf
            - ova
            - docker
            - compressed
          type: string
          x-gitbook-description-html: <p>Format of the image container</p>
        disk_format:
          description: The format of the disk
          enum:
            - ami
            - ari
            - aki
            - vhd
            - vhdx
            - vmdk
            - raw
            - qcow2
            - vdi
            - iso
            - ploop
          type: string
          x-gitbook-description-html: <p>The format of the disk</p>
        min_disk:
          description: Amount of disk space in GB that is required to boot the image
          type: integer
          x-gitbook-description-html: <p>Amount of disk space in GB that is required to boot the image</p>
        min_ram:
          description: Amount of RAM in MB that is required to boot the image
          type: integer
          x-gitbook-description-html: <p>Amount of RAM in MB that is required to boot the image</p>
        protected:
          description: Image protection for deletion
          type: boolean
          x-gitbook-description-html: <p>Image protection for deletion</p>
        tags:
          description: List of tags for this image
          type: array
          items:
            maxLength: 255
            type: string
          x-gitbook-description-html: <p>List of tags for this image</p>
        visibility:
          description: Visibility for this image
          enum:
            - public
            - private
            - community
            - shared
          type: string
          x-gitbook-description-html: <p>Visibility for this image</p>
      additionalProperties:
        description: Additional custom properties
        type: string
        x-gitbook-description-html: <p>Additional custom properties</p>
    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
          x-gitbook-description-html: <p>A unique identifier for the image</p>
        name:
          nullable: true
          description: The name of the image
          type: string
          x-gitbook-description-html: <p>The name of the image</p>
        status:
          description: The image status
          enum:
            - queued
            - saving
            - active
            - killed
            - deleted
            - pending_delete
            - deactivated
            - uploading
            - importing
          type: string
          readOnly: true
          x-gitbook-description-html: <p>The image status</p>
        visibility:
          description: Image visibility
          enum:
            - public
            - private
            - community
            - shared
          type: string
          x-gitbook-description-html: <p>Image visibility</p>
        protected:
          description: Image protection for deletion
          type: boolean
          x-gitbook-description-html: <p>Image protection for deletion</p>
        tags:
          description: List of tags for this image
          type: array
          items:
            maxLength: 255
            type: string
          x-gitbook-description-html: <p>List of tags for this image</p>
        container_format:
          nullable: true
          description: Format of the image container
          enum:
            - ami
            - ari
            - aki
            - bare
            - ovf
            - ova
            - docker
            - compressed
          type: string
          x-gitbook-description-html: <p>Format of the image container</p>
        disk_format:
          nullable: true
          description: The format of the disk
          enum:
            - ami
            - ari
            - aki
            - vhd
            - vhdx
            - vmdk
            - raw
            - qcow2
            - vdi
            - iso
            - ploop
          type: string
          x-gitbook-description-html: <p>The format of the disk</p>
        min_disk:
          description: Amount of disk space in GB required to boot the image
          type: integer
          x-gitbook-description-html: <p>Amount of disk space in GB required to boot the image</p>
        min_ram:
          description: Amount of RAM in MB required to boot the image
          type: integer
          x-gitbook-description-html: <p>Amount of RAM in MB required to boot the image</p>
        size:
          nullable: true
          description: The size of the image data, in bytes
          type: integer
          readOnly: true
          x-gitbook-description-html: <p>The size of the image data, in bytes</p>
        virtual_size:
          nullable: true
          description: The virtual size of the image
          type: integer
          readOnly: true
          x-gitbook-description-html: <p>The virtual size of the image</p>
        checksum:
          nullable: true
          description: MD5 hash of image contents
          type: string
          readOnly: true
          x-gitbook-description-html: <p>MD5 hash of image contents</p>
        os_hash_algo:
          nullable: true
          description: Algorithm used to compute secure hash
          type: string
          readOnly: true
          x-gitbook-description-html: <p>Algorithm used to compute secure hash</p>
        os_hash_value:
          nullable: true
          description: Hexdigest of the secure hash
          type: string
          readOnly: true
          x-gitbook-description-html: <p>Hexdigest of the secure hash</p>
        os_hidden:
          description: Controls whether image is displayed in default image list
          type: boolean
          x-gitbook-description-html: <p>Controls whether image is displayed in default image list</p>
        owner:
          nullable: true
          description: An identifier for the owner of the image
          type: string
          readOnly: true
          x-gitbook-description-html: <p>An identifier for the owner of the image</p>
        created_at:
          format: date-time
          description: Date and time when the image was created
          type: string
          readOnly: true
          x-gitbook-description-html: <p>Date and time when the image was created</p>
        updated_at:
          format: date-time
          description: Date and time when the image was last updated
          type: string
          readOnly: true
          x-gitbook-description-html: <p>Date and time when the image was last updated</p>
        self:
          format: uri
          description: URL for the image
          type: string
          readOnly: true
          x-gitbook-description-html: <p>URL for the image</p>
        file:
          format: uri
          description: URL for the image file
          type: string
          readOnly: true
          x-gitbook-description-html: <p>URL for the image file</p>
        schema:
          format: uri
          description: URL for the schema describing the image
          type: string
          readOnly: true
          x-gitbook-description-html: <p>URL for the schema describing the image</p>
        direct_url:
          format: uri
          description: URL to access the image file kept in external store
          type: string
          readOnly: true
          x-gitbook-description-html: <p>URL to access the image file kept in external store</p>
        locations:
          description: List of image locations
          type: array
          items:
            type: object
            properties:
              url:
                format: uri
                type: string
              metadata:
                type: object
          readOnly: true
          x-gitbook-description-html: <p>List of image locations</p>
      additionalProperties:
        description: Additional custom properties
        type: string
        x-gitbook-description-html: <p>Additional custom properties</p>
    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
          x-gitbook-description-html: <p>URI for the first page of response</p>
        next:
          format: uri
          description: URI for the next page of response
          type: string
          x-gitbook-description-html: <p>URI for the next page of response</p>
        schema:
          format: uri
          description: URL for the schema describing a list of images
          type: string
          x-gitbook-description-html: <p>URL for the schema describing a list of images</p>
    JsonPatchOperation:
      required:
        - op
        - path
      type: object
      properties:
        op:
          description: The operation to perform
          enum:
            - add
            - remove
            - replace
          type: string
          x-gitbook-description-html: <p>The operation to perform</p>
        path:
          description: JSON pointer to the location in the target document
          type: string
          x-gitbook-description-html: <p>JSON pointer to the location in the target document</p>
        value:
          description: The value to use for the operation
          x-gitbook-description-html: <p>The value to use for the operation</p>
      additionalProperties: false
    ImageImport:
      required:
        - method
      type: object
      properties:
        method:
          required:
            - name
          type: object
          properties:
            name:
              description: Import method name
              enum:
                - glance-direct
                - web-download
                - copy-image
                - glance-download
              type: string
              x-gitbook-description-html: <p>Import method name</p>
            uri:
              format: uri
              description: URI for web-download method
              type: string
              x-gitbook-description-html: <p>URI for web-download method</p>
            glance_image_id:
              format: uuid
              description: Image ID for glance-download method
              type: string
              x-gitbook-description-html: <p>Image ID for glance-download method</p>
            glance_region:
              description: Region for glance-download method
              type: string
              x-gitbook-description-html: <p>Region for glance-download method</p>
            glance_service_interface:
              description: Service interface for glance-download method
              type: string
              x-gitbook-description-html: <p>Service interface for glance-download method</p>
        stores:
          description: List of store identifiers to import to
          type: array
          items:
            type: string
          x-gitbook-description-html: <p>List of store identifiers to import to</p>
        all_stores:
          description: Import to all available stores
          type: boolean
          x-gitbook-description-html: <p>Import to all available stores</p>
        all_stores_must_succeed:
          description: Whether all stores must succeed for the operation to succeed
          type: boolean
          x-gitbook-description-html: <p>Whether all stores must succeed for the operation to succeed</p>
    ImportInfo:
      type: object
      properties:
        import-methods:
          type: object
          properties:
            description:
              type: string
            type:
              type: string
            value:
              type: array
              items:
                type: string
    StoreInfo:
      type: object
      properties:
        stores:
          type: array
          items:
            type: object
            properties:
              id:
                description: Store identifier
                type: string
                x-gitbook-description-html: <p>Store identifier</p>
              description:
                description: Store description
                type: string
                x-gitbook-description-html: <p>Store description</p>
              default:
                description: Whether this is the default store
                type: boolean
                x-gitbook-description-html: <p>Whether this is the default store</p>
              read-only:
                description: Whether this store is read-only
                type: boolean
                x-gitbook-description-html: <p>Whether this store is read-only</p>
    UsageInfo:
      type: object
      properties:
        usage:
          type: object
          properties:
            image_size_total:
              type: object
              properties:
                limit:
                  type: integer
                usage:
                  type: integer
            image_count_total:
              type: object
              properties:
                limit:
                  type: integer
                usage:
                  type: integer
            image_stage_total:
              type: object
              properties:
                limit:
                  type: integer
                usage:
                  type: integer
            image_count_uploading:
              type: object
              properties:
                limit:
                  type: integer
                usage:
                  type: integer
    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
      x-gitbook-description-html: <p>Bad Request</p>
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Unauthorized
      x-gitbook-description-html: <p>Unauthorized</p>
    Forbidden:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Forbidden
      x-gitbook-description-html: <p>Forbidden</p>
    NotFound:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Not Found
      x-gitbook-description-html: <p>Not Found</p>
    Conflict:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Conflict
      x-gitbook-description-html: <p>Conflict</p>
    Gone:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Gone
      x-gitbook-description-html: <p>Gone</p>
    PayloadTooLarge:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Payload Too Large
      x-gitbook-description-html: <p>Payload Too Large</p>
    UnsupportedMediaType:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Unsupported Media Type
      x-gitbook-description-html: <p>Unsupported Media Type</p>
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
      description: Service Unavailable
      x-gitbook-description-html: <p>Service Unavailable</p>
  securitySchemes:
    pcdAuth:
      name: X-Auth-Token
      type: apiKey
      in: header
      description: PCD Identity Service token authentication
      x-gitbook-description-html: <p>PCD Identity Service token authentication</p>
security:
  - pcdAuth: []
tags:
  - name: Images
    description: >-
      Creates, lists, shows, updates, deletes, and performs other operations on
      images
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: >-
                    Creates, lists, shows, updates, deletes, and performs other
                    operations on images
                  marks: []
    x-gitbook-description-html: >-
      <p>Creates, lists, shows, updates, deletes, and performs other operations
      on images</p>
  - name: Image Tags
    description: Adds and deletes image tags
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Adds and deletes image tags
                  marks: []
    x-gitbook-description-html: <p>Adds and deletes image tags</p>
  - name: Image Data
    description: Uploads and downloads raw image data
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Uploads and downloads raw image data
                  marks: []
    x-gitbook-description-html: <p>Uploads and downloads raw image data</p>
  - name: Image Service Info
    description: Service discovery and information endpoints
    x-gitbook-description-document:
      object: document
      data:
        schemaVersion: 8
      nodes:
        - object: block
          type: paragraph
          isVoid: false
          data: {}
          nodes:
            - object: text
              leaves:
                - object: leaf
                  text: Service discovery and information endpoints
                  marks: []
    x-gitbook-description-html: <p>Service discovery and information endpoints</p>
