> ## 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 CVM attestation

> Returns TEE attestation data including TCB info and app certificates.



## OpenAPI

````yaml /openapi.json get /api/v1/cvms/{cvm_id}/attestation
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/cvms/{cvm_id}/attestation:
    get:
      tags:
        - CVMs
      summary: Get CVM attestation
      description: Returns TEE attestation data including TCB info and app certificates.
      operationId: handle_get_cvm_attestation_api_v1_cvms__cvm_id__attestation_get
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      responses:
        '200':
          description: Attestation report (may have error if CVM offline)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CvmAttestation'
        '401':
          description: Authentication required
        '403':
          description: CVM not in workspace
        '404':
          description: CVM not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CvmAttestation:
      properties:
        is_online:
          type: boolean
          title: Is Online
        is_public:
          type: boolean
          title: Is Public
          default: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        app_certificates:
          anyOf:
            - items:
                $ref: '#/components/schemas/Certificate'
              type: array
            - type: 'null'
          title: App Certificates
        tcb_info:
          anyOf:
            - $ref: '#/components/schemas/TcbInfo'
            - type: 'null'
        compose_file:
          anyOf:
            - type: string
            - type: 'null'
          title: Compose File
      type: object
      required:
        - is_online
      title: CvmAttestation
      description: Model representing CVM attestation information
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Certificate:
      properties:
        subject:
          $ref: '#/components/schemas/CertificateSubject'
        issuer:
          $ref: '#/components/schemas/CertificateIssuer'
        serial_number:
          type: string
          title: Serial Number
        not_before:
          type: string
          format: date-time
          title: Not Before
        not_after:
          type: string
          format: date-time
          title: Not After
        version:
          type: string
          title: Version
        fingerprint:
          type: string
          title: Fingerprint
        signature_algorithm:
          type: string
          title: Signature Algorithm
        sans:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sans
        is_ca:
          type: boolean
          title: Is Ca
          default: false
        position_in_chain:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position In Chain
        quote:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
        cert_usage:
          anyOf:
            - type: string
            - type: 'null'
          title: Cert Usage
      type: object
      required:
        - subject
        - issuer
        - serial_number
        - not_before
        - not_after
        - version
        - fingerprint
        - signature_algorithm
      title: Certificate
    TcbInfo:
      properties:
        mrtd:
          type: string
          title: Mrtd
        rootfs_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Rootfs Hash
        rtmr0:
          type: string
          title: Rtmr0
        rtmr1:
          type: string
          title: Rtmr1
        rtmr2:
          type: string
          title: Rtmr2
        rtmr3:
          type: string
          title: Rtmr3
        event_log:
          items:
            $ref: '#/components/schemas/EventLog'
          type: array
          title: Event Log
        app_compose:
          type: string
          title: App Compose
      type: object
      required:
        - mrtd
        - rtmr0
        - rtmr1
        - rtmr2
        - rtmr3
        - event_log
        - app_compose
      title: TcbInfo
    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
    CertificateSubject:
      properties:
        common_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Common Name
          description: Certificate subject common name
        organization:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization
          description: Organization name
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country code
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State or province
        locality:
          anyOf:
            - type: string
            - type: 'null'
          title: Locality
          description: Locality name
      type: object
      title: CertificateSubject
    CertificateIssuer:
      properties:
        common_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Common Name
          description: Issuer common name
        organization:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization
          description: Issuer organization
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Issuer country code
      type: object
      title: CertificateIssuer
    EventLog:
      properties:
        imr:
          type: integer
          title: Imr
        event_type:
          type: integer
          title: Event Type
        digest:
          type: string
          title: Digest
        event:
          type: string
          title: Event
        event_payload:
          type: string
          title: Event Payload
      type: object
      required:
        - imr
        - event_type
        - digest
        - event
        - event_payload
      title: EventLog

````