Skip to main content
All CVM query functions accept a CVM identifier. The SDK auto-detects the format:

getCvmInfo

GET /cvms/{cvmId} Returns full CVM details including configuration, status, and metadata. Parameters: Returns: CvmInfo — version-aware response with CVM details. Example:

getCvmList

GET /cvms/paginated Returns a paginated list of CVMs. Parameters: Returns: Paginated list of CVM objects. Example:

getCvmState

GET /cvms/{cvmId}/state Returns the current state of a CVM (non-streaming, immediate response). Parameters: Returns: CvmState Example:

getCvmStats

GET /cvms/{cvmId}/stats Returns system information and resource usage for a CVM. Parameters: Returns: CvmSystemInfo Example:

getCvmNetwork

GET /cvms/{cvmId}/network Returns network information including public URLs and internal IP. Parameters: Returns: CvmNetwork Example:

getCvmContainersStats

GET /cvms/{cvmId}/composition Returns container-level information including running state and log endpoints. Parameters: Returns: CvmContainersStats Example:

getCvmAttestation

GET /cvms/{cvmId}/attestation Returns TEE attestation details including certificates and TCB info. Parameters: Returns: CvmAttestation Example:

getCvmDockerCompose

GET /cvms/{cvmId}/docker-compose Returns the raw docker-compose configuration as a string. Parameters: Returns: string — raw docker-compose YAML content. Example:

getCvmComposeFile

GET /cvms/{cvmId}/compose_file Returns the full compose file object with utility methods for hashing. Parameters: Returns: LooseAppCompose — compose file object with getHash() and toString() methods. Example:

getCvmPreLaunchScript

GET /cvms/{cvmId}/pre-launch-script Returns the pre-launch script content. Parameters: Returns: string — pre-launch script content.

getCvmStatusBatch

GET /cvms/status/batch Returns the status of multiple CVMs in a single request. Parameters: Returns: GetCvmStatusBatchResponse Example:

getCvmUserConfig

GET /cvms/{cvmId}/user-config Returns the user-level configuration for a CVM. Parameters: Returns: CvmUserConfig — user configuration details.

checkCvmIsAllowed

POST /cvms/{cvmId}/is-allowed Checks whether a CVM’s current deployment is allowed by its on-chain dstack App contract. This queries the blockchain to verify that the compose hash and device ID are registered. Useful for diagnosing on-chain KMS permission issues. Parameters: Returns: IsAllowedResult Example: