---
title: "Create a file_item"
method: POST
path: "/file_store"
tags: ["file_store"]
---

# Create a file_item

`POST /file_store`

File items are binaries and unlike images are not limited by the file type (e.g ISOs, or disk images).

## Request body

- FileItemIntentInput — An intentful representation of a file_item
  - `spec` FileItem, required — An intentful representation of a file_item spec
    - `description` string — A description for file_item.
    - `resources` FileItemResources, required — File item spec object
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — URI that points at the file to create the file_item from.
      - `source_auth` SourceAuth — File item source authentication object.
        - `aws_auth` AwsCredentials — Credentials to access AWS
          - `access_key` string, required
          - `secret_key` string, required
        - `basic_auth` Credentials — Credentials to login server
          - `username` string, required
          - `password` string
    - `cluster_reference` ClusterReference — The reference to a cluster
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `name` string, required — file_item Name.
    - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
  - `api_version` string
  - `metadata` FileItemMetadata, required — The file_item kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when file_item was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — file_item uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when file_item 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 file_item
    - `name` string — file_item name

## Response `202`

Request Accepted

- FileItemIntentResponse — Response object for intentful operations on a file_item
  - `status` FileItemDefStatus — An intentful representation of a file_item status
    - `state` string — The state of the file_item.
    - `name` string, required — file_item 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 file_item, 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` FileItemResourcesDefStatus, required — File item object
      - `retrieval_uri_list` string[] — List of URIs where the raw file_item data can be accessed.
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — URI that points at the file to create the file_item from.
      - `source_auth` SourceAuth — File item source authentication object.
        - `aws_auth` AwsCredentials — Credentials to access AWS
          - `access_key` string, required
          - `secret_key` string, required
        - `basic_auth` Credentials — Credentials to login server
          - `username` string, required
          - `password` string
      - `size_bytes` integer
    - `description` string — A description for file_item.
  - `spec` FileItem — An intentful representation of a file_item spec
    - `description` string — A description for file_item.
    - `resources` FileItemResources, required — File item spec object
      - `checksum` Checksum — Image checksum
        - `checksum_algorithm` string, required — The type of checksum calculated for the image
        - `checksum_value` string, bytes, required
      - `source_uri` string — URI that points at the file to create the file_item from.
      - `source_auth` SourceAuth — File item source authentication object.
        - `aws_auth` AwsCredentials — Credentials to access AWS
          - `access_key` string, required
          - `secret_key` string, required
        - `basic_auth` Credentials — Credentials to login server
          - `username` string, required
          - `password` string
    - `cluster_reference` ClusterReference — The reference to a cluster
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `name` string, required — file_item Name.
    - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
  - `api_version` string, required
  - `metadata` FileItemMetadata, required — The file_item kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when file_item was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — file_item uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when file_item 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 file_item
    - `name` string — file_item 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/revisions/40395083ab31/schema)
