---
title: "Get staged CVM changes"
method: GET
path: "/api/v1/cvms/{cvm_id}/draft"
tags: ["CVMs", "cvms-draft"]
---

# Get staged CVM changes

`GET /api/v1/cvms/{cvm_id}/draft`

## Request

- Base URL: `https://cloud-api.phala.com`
- URL: `https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/draft`
- Auth: none declared
- TypeScript: <https://skmtc.dev/phala/apis/phala-cloud-api/docs/api/v1/cvms/:cvm_id/draft/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the CVM's staged changes, who staged each one, and the compose hash applying them produces.

## Path parameters

- `cvm_id` string, required

## Response `200`

Successful Response

- CvmDraftResponse: The CVM's staged changes and the compose hash applying them produces.
  - `base_compose_hash` string, nullable, required: The CVM's compose hash when the first change was staged
  - `current_compose_hash` string, nullable, required: The CVM's compose hash now; apply is rejected while it differs from the base
  - `preview_compose_hash` string, required: The compose hash the CVM runs after apply. For contract-owned KMS, register it on-chain before applying.
  - `patch` object, required: The one PATCH /cvms/{cvm_id} body the apply sends: the entries applied in order to the CVM's current compose
  - `entries` CvmDraftEntry[], required: The staged patches, oldest first
    - `user_id` string, hashid, required: A hashed identifier that maps to an internal database ID
    - `username` string, required
    - `staged_at` string, date-time, required
    - `patch` object, required

## Other responses

- `404`: ERR-03-052: the CVM has no staged changes
- `422`: Validation Error

## Changes

- **2026-11-07** `c71a8dc90391`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/phala/apis/phala-cloud-api/changes/api/v1/cvms/:cvm_id/draft/get.md)

---

[API](https://skmtc.dev/phala/apis/phala-cloud-api.md) - [All operations](https://skmtc.dev/phala/apis/phala-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phala/apis/phala-cloud-api/revisions/c71a8dc90391?raw)
