> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get revision detail

> Returns full revision data including compose file, encrypted env, and user config.



## OpenAPI

````yaml /openapi.json get /api/v1/apps/{app_id}/revisions/{revision_id}
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/apps/{app_id}/revisions/{revision_id}:
    get:
      tags:
        - Apps
      summary: Get revision detail
      description: >-
        Returns full revision data including compose file, encrypted env, and
        user config.
      operationId: get_app_revision_detail_api_v1_apps__app_id__revisions__revision_id__get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
            description: Hex app identifier
          description: Hex app identifier
        - name: revision_id
          in: path
          required: true
          schema:
            type: string
            title: Revision Id
        - name: raw_compose_file
          in: query
          required: false
          schema:
            type: boolean
            description: Return compose_file as string instead of dict
            default: false
            title: Raw Compose File
          description: Return compose_file as string instead of dict
      responses:
        '200':
          description: Revision detail with compose file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRevisionDetailResponse'
        '401':
          description: Not authenticated
        '403':
          description: No workspace access
        '404':
          description: App or revision not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AppRevisionDetailResponse:
      properties:
        revision_id:
          type: string
          title: Revision Id
          description: Revision record identifier (hashid of snowflake_id)
        app_id:
          type: string
          title: App Id
          description: Hex app identifier
        vm_uuid:
          type: string
          title: Vm Uuid
          description: CVM UUID
        compose_hash:
          type: string
          title: Compose Hash
          description: SHA-256 hash of compose file
        compose_file:
          anyOf:
            - additionalProperties: true
              type: object
            - type: string
            - type: 'null'
          title: Compose File
          description: Docker compose content (dict or raw string)
        encrypted_env:
          type: string
          title: Encrypted Env
          description: Hex-encoded encrypted environment variables
        user_config:
          type: string
          title: User Config
          description: JSON user configuration string
        created_at:
          type: string
          title: Created At
          description: Revision timestamp (ISO 8601)
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
          description: Request trace ID for debugging
        operation_type:
          type: string
          title: Operation Type
          description: 'Operation: deploy, update, restart, etc.'
        triggered_by:
          anyOf:
            - $ref: '#/components/schemas/UserRef'
            - type: 'null'
          description: User who triggered the operation
        cvm:
          anyOf:
            - $ref: '#/components/schemas/CvmRef'
            - type: 'null'
          description: CVM reference
        workspace:
          anyOf:
            - $ref: '#/components/schemas/WorkspaceRef'
            - type: 'null'
          description: Workspace reference
      type: object
      required:
        - revision_id
        - app_id
        - vm_uuid
        - compose_hash
        - compose_file
        - encrypted_env
        - user_config
        - created_at
        - trace_id
        - operation_type
      title: AppRevisionDetailResponse
      description: Full revision detail with configuration data.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserRef:
      properties:
        object_type:
          type: string
          const: user
          title: Object Type
          description: Fixed value 'user'
          default: user
        id:
          anyOf:
            - type: string
              pattern: ^usr_.+
              format: hashid
              title: HashedId[users]
              description: A hashed identifier that maps to an internal database ID
              examples:
                - usr_0123abcd
            - type: 'null'
          title: Id
          description: Hashed user ID
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
          description: Display username
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: Gravatar or OAuth provider avatar URL
      type: object
      title: UserRef
      description: Minimal user reference for embedding in responses.
    CvmRef:
      properties:
        object_type:
          type: string
          const: cvm
          title: Object Type
          description: Fixed value 'cvm'
          default: cvm
        vm_uuid:
          type: string
          title: Vm Uuid
          description: CVM instance UUID
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
          description: Deterministic app identifier from manifest
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: User-assigned CVM name
      type: object
      required:
        - vm_uuid
      title: CvmRef
      description: Minimal CVM reference for embedding in responses.
    WorkspaceRef:
      properties:
        object_type:
          type: string
          const: workspace
          title: Object Type
          description: Fixed value 'workspace'
          default: workspace
        id:
          type: string
          pattern: ^wks_.+
          format: hashid
          title: HashedId[teams]
          description: Hashed workspace ID
          examples:
            - wks_0123abcd
        name:
          type: string
          title: Name
          description: Workspace display name
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
          description: URL-safe workspace identifier
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: Workspace avatar URL from profile
      type: object
      required:
        - id
        - name
      title: WorkspaceRef
      description: Minimal workspace reference for embedding in responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````