---
title: "Get app-compose.json"
method: GET
path: "/api/v1/cvms/{cvm_id}/app-compose.json"
tags: ["CVMs"]
---

# Get app-compose.json

`GET /api/v1/cvms/{cvm_id}/app-compose.json`

## Request

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

Returns the full AppComposeV2 model (including port_policy and all other fields). Served from teepod when the CVM is live; falls back to the latest stored revision (marked via X-Compose-Source) when teepod is unreachable. Returns 404 if only the legacy raw docker-compose YAML is available.

## Path parameters

- `cvm_id` string, required

## Response `200`

AppComposeV2 JSON model

- AppComposeV2Output
  - `allowed_envs` string[]
  - `bash_script` string, nullable
  - `default_gateway_domain` string, nullable
  - `docker_compose_file` string, nullable
  - `init_script` string[]
  - `key_provider` 'none' | 'kms' | 'local' | 'tpm', nullable
  - `key_provider_id` string, nullable
  - `kms_enabled` boolean
  - `local_key_provider_enabled` boolean
  - `manifest_version` union
    - integer
    - string
  - `name` string, required
  - `no_instance_id` boolean
  - `port_policy` PortPolicy: Per-instance port policy declared in app-compose. >= v0.5.9. ``restrict_mode=True`` with an empty ``ports`` list is a valid lockdown. Field order is alphabetical for compose_hash stability.
    - `ports` PortAttrs[]
      - `port` integer, required
      - `pp` boolean
    - `restrict_mode` boolean
  - `pre_launch_script` string, nullable
  - `public_logs` boolean
  - `public_sysinfo` boolean
  - `public_tcbinfo` boolean
  - `runner` string
  - `requirements` object, nullable
  - `storage_discard` boolean, nullable
  - `event_log_version` 1 | 2, nullable
  - `snapshotter` 'overlayfs' | 'stargz', nullable
  - `verity_volumes` VerityVolume[], nullable
    - `source` string, required
    - `target` string, required
    - `verity_root` string, required
  - `gateway_enabled` boolean
  - `features` string[]
  - `salt` string, nullable
  - `secure_time` boolean
  - `storage_fs` union
    - 'ext4'
    - 'zfs'
  - `swap_size` string, nullable
  - `tproxy_enabled` boolean

## Other responses

- `401`: Authentication required
- `404`: CVM not found or full app-compose snapshot not available
- `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/app-compose.json/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)
