---
title: "Create a IMAGE"
method: POST
path: "/images"
tags: ["images"]
---

# Create a IMAGE

`POST /images`

Images are raw ISO, QCOW2, or VMDK files that are uploaded by a user can be attached to a VM. An ISO image is attached as a virtual CD-ROM drive, and QCOW2 and VMDK files are attached as SCSI disks. An image has to be explicitly added to the self-service catalog before users can create VMs from it.

## Request body

- ImageIntentInput — An intentful representation of a image
  - `spec` Image, required — An intentful representation of a image spec
    - `name` string, required — image Name.
    - `resources` ImageResources, required — Describes the image spec resources object.
      - `version` ImageVersionResources — The image version, which is composed of a product name and product version.
        - `product_version` string, required — Version string for the disk image.
        - `product_name` string, required — Name of the producer/distribution of the image. For example windows or red hat.
      - `architecture` string — The supported CPU architecture for a disk image.
      - `image_type` string — The type of image.
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — The source URI points at the location of a the source image which is used to create/update image.
      - `data_source_reference` Reference — Reference to a kind
        - `kind` string, required
        - `uuid` string, UUID, required
        - `name` string
    - `description` string — A description for image.
  - `api_version` string
  - `metadata` ImageMetadata, required — The image kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when image was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — image uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when image was created
    - `spec_hash` string — Hash of the spec. This will be returned from server.
    - `should_force_translate` boolean — Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.
    - `owner_reference` UserReference — The reference to a user
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `categories` object — Categories for the image
    - `name` string — image name

## Response `202`

Request Accepted

- ImageIntentResponse — Response object for intentful operations on a image
  - `status` ImageDefStatus — An intentful representation of a image status
    - `state` string — The state of the image.
    - `name` string, required — image Name.
    - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `message_list` MessageResource[] — Any error messages for the image, if in an error state.
      - `message` string, required — If state is ERROR, a message describing the error.
      - `reason` string, required — If state is ERROR, a machine-readable snake-cased string.
      - `details` object — Custom key-value details relevant to the status.
    - `cluster_reference` ClusterReference — The reference to a cluster
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `resources` ImageResourcesDefStatus, required — Describes the image status resources object.
      - `retrieval_uri_list` string[] — List of URIs where the raw image data can be accessed.
      - `image_type` string — The type of image.
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — The source URI points at the location of a the source image which is used to create/update image.
      - `version` ImageVersionStatus — The image version, which is composed of a product name and product version.
        - `product_version` string, required — Version string for the disk image.
        - `product_name` string, required — Name of the producer/distribution of the image. For example windows or red hat.
      - `architecture` string — The supported CPU architecture for a disk image.
      - `size_bytes` integer — The size of the image in bytes.
      - `data_source_reference` Reference — Reference to a kind
        - `kind` string, required
        - `uuid` string, UUID, required
        - `name` string
    - `description` string — A description for image.
  - `spec` Image — An intentful representation of a image spec
    - `name` string, required — image Name.
    - `resources` ImageResources, required — Describes the image spec resources object.
      - `version` ImageVersionResources — The image version, which is composed of a product name and product version.
        - `product_version` string, required — Version string for the disk image.
        - `product_name` string, required — Name of the producer/distribution of the image. For example windows or red hat.
      - `architecture` string — The supported CPU architecture for a disk image.
      - `image_type` string — The type of image.
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — The source URI points at the location of a the source image which is used to create/update image.
      - `data_source_reference` Reference — Reference to a kind
        - `kind` string, required
        - `uuid` string, UUID, required
        - `name` string
    - `description` string — A description for image.
  - `api_version` string, required
  - `metadata` ImageMetadata, required — The image kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when image was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — image uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when image was created
    - `spec_hash` string — Hash of the spec. This will be returned from server.
    - `should_force_translate` boolean — Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.
    - `owner_reference` UserReference — The reference to a user
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `categories` object — Categories for the image
    - `name` string — image name

## Other responses

- `default` — Internal Error

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/versions/40395083ab31/schema)
