---
title: "Create VM snapshot"
method: POST
path: "/vm_snapshots"
tags: ["vm_snapshot"]
---

# Create VM snapshot

`POST /vm_snapshots`

Given an intentful spec, creates a snapshot with associated metadata

## Request body

- VmSnapshotIntentInput — An intentful representation of a vm_snapshot
  - `spec` VmSnapshot, required — The input object that defines a VM snapshot
    - `expiration_time_msecs` integer — The time when this snapshot expires and will be garbage collected. If not set, then the snapshot never expires.
    - `resources` object
      - `entity_uuid` string, UUID — UUID of the base entity for which snapshot need to be taken
    - `snapshot_type` string — Crash consistent or Application Consistent snapshot
    - `replication_target_list` object[] — This describes a list replication targets where this snapshot exists or needs to be replicated to. This is to support the replication and retrieve of the snapshot.
      - `cluster_reference` ClusterReference — The reference to a cluster
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
      - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
    - `name` string — Name of the snapshot
  - `api_version` string
  - `metadata` VmSnapshotMetadata, required — The vm_snapshot kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when vm_snapshot was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — vm_snapshot uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when vm_snapshot 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 vm_snapshot
    - `name` string — vm_snapshot name

## Response `202`

Request Accepted

- VmSnapshotIntentResponse — Response object for intentful operations on a vm_snapshot
  - `status` VmSnapshotDefStatus — The output object that defines a VM snapshot
    - `consistency_group_uuid` string — This field is same for all the entities (irrespective of kind) that were snapshotted together.
    - `location_agnostic_uuid` string — If a snapshot is replicated to a different clusters, then all the instances of same snapshot will share this UUID.
    - `name` string — Name of the snapshot
    - `replication_target_list` object[] — This describes a list replication targets where this snapshot exists or needs to be replicated to. This is to support the replication and retrieve of the snapshot.
      - `cluster_reference` ClusterReference — The reference to a cluster
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
      - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
    - `state` string — The state of the VM snapshot.
    - `snapshot_type` string — Crash consistent or Application Consistent snapshot
    - `snapshot_file_list` object[], required — Describes the files that are included in the snapshot.
      - `file_path` string — Pathname of the file that participated in the snapshot.
      - `snapshot_file_path` string — Pathname of the snapshot of the file.
    - `expiration_time_msecs` integer — The time when this snapshot expires and will be garbage collected. If not set, then the snapshot never expires.
    - `message_list` MessageResource[] — Any error messages for the {kind}}, 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.
    - `resources` object
      - `entity_uuid` string, UUID — UUID of the base entity for which snapshot need to be taken
  - `spec` VmSnapshot — The input object that defines a VM snapshot
    - `expiration_time_msecs` integer — The time when this snapshot expires and will be garbage collected. If not set, then the snapshot never expires.
    - `resources` object
      - `entity_uuid` string, UUID — UUID of the base entity for which snapshot need to be taken
    - `snapshot_type` string — Crash consistent or Application Consistent snapshot
    - `replication_target_list` object[] — This describes a list replication targets where this snapshot exists or needs to be replicated to. This is to support the replication and retrieve of the snapshot.
      - `cluster_reference` ClusterReference — The reference to a cluster
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
      - `availability_zone_reference` AvailabilityZoneReference — The reference to a availability_zone
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
    - `name` string — Name of the snapshot
  - `api_version` string, required
  - `metadata` VmSnapshotMetadata, required — The vm_snapshot kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when vm_snapshot was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — vm_snapshot uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when vm_snapshot 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 vm_snapshot
    - `name` string — vm_snapshot 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)
