> ## 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.

# Inspect KMS instance

> Real-time inspection of a KMS instance. Queries KMS RPC, guest agent, associated Teepod VMMs, and on-chain contract data with cross-validation.



## OpenAPI

````yaml /openapi.json get /api/v1/kms/{kms_id}/info
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/kms/{kms_id}/info:
    get:
      tags:
        - KMS
      summary: Inspect KMS instance
      description: >-
        Real-time inspection of a KMS instance. Queries KMS RPC, guest agent,
        associated Teepod VMMs, and on-chain contract data with
        cross-validation.
      operationId: inspect_kms_api_v1_kms__kms_id__info_get
      parameters:
        - name: kms_id
          in: path
          required: true
          schema:
            type: string
            title: Kms Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KmsInspectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    KmsInspectResponse:
      properties:
        id:
          type: string
          title: Id
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        endpoint:
          type: string
          title: Endpoint
        kms_type:
          type: string
          title: Kms Type
        db_version:
          type: string
          title: Db Version
        rpc:
          anyOf:
            - $ref: '#/components/schemas/KmsRpcInfo'
            - type: 'null'
        rpc_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Rpc Error
        guest_agent:
          anyOf:
            - $ref: '#/components/schemas/GuestAgentInfo'
            - type: 'null'
        guest_agent_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Guest Agent Error
        teepods:
          items:
            $ref: '#/components/schemas/TeepodInfo'
          type: array
          title: Teepods
        on_chain:
          anyOf:
            - $ref: '#/components/schemas/OnChainInfo'
            - type: 'null'
      type: object
      required:
        - id
        - slug
        - endpoint
        - kms_type
        - db_version
      title: KmsInspectResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KmsRpcInfo:
      properties:
        version:
          type: string
          title: Version
          description: Real-time version from x-app-version header
        is_dev:
          type: boolean
          title: Is Dev
        chain_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chain Id
        kms_contract_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Kms Contract Address
        gateway_app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateway App Id
        bootstrap_info:
          $ref: '#/components/schemas/BootstrapInfoOut'
        version_synced:
          type: boolean
          title: Version Synced
          description: Whether DB version matches real version
      type: object
      required:
        - version
        - is_dev
        - bootstrap_info
        - version_synced
      title: KmsRpcInfo
    GuestAgentInfo:
      properties:
        device_id:
          type: string
          title: Device Id
        mr_aggregated:
          anyOf:
            - type: string
            - type: 'null'
          title: Mr Aggregated
        os_image_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Image Hash
        instance_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance Id
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
        mr_key_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Mr Key Provider
        compose_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Compose Hash
      type: object
      required:
        - device_id
      title: GuestAgentInfo
    TeepodInfo:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        teepod_version_db:
          anyOf:
            - type: string
            - type: 'null'
          title: Teepod Version Db
        teepod_version_real:
          anyOf:
            - type: string
            - type: 'null'
          title: Teepod Version Real
        kms_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Kms Url
          description: KMS URL configured in VMM
        kms_urls:
          items:
            type: string
          type: array
          title: Kms Urls
        available_os_images:
          items:
            $ref: '#/components/schemas/TeepodImageInfo'
          type: array
          title: Available Os Images
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - id
        - name
      title: TeepodInfo
    OnChainInfo:
      properties:
        kms_info:
          anyOf:
            - $ref: '#/components/schemas/OnChainKmsInfo'
            - type: 'null'
        gateway_app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateway App Id
        owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner
        verification:
          $ref: '#/components/schemas/OnChainVerification'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      title: OnChainInfo
    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
    BootstrapInfoOut:
      properties:
        k256_pubkey:
          type: string
          title: K256 Pubkey
          description: K256 public key hex
        ca_pubkey:
          type: string
          title: Ca Pubkey
          description: CA public key hex
        quote_length:
          type: integer
          title: Quote Length
          description: Quote byte length
        eventlog_length:
          type: integer
          title: Eventlog Length
          description: Eventlog byte length
      type: object
      required:
        - k256_pubkey
        - ca_pubkey
        - quote_length
        - eventlog_length
      title: BootstrapInfoOut
    TeepodImageInfo:
      properties:
        name:
          type: string
          title: Name
        version:
          type: string
          title: Version
        is_dev:
          type: boolean
          title: Is Dev
      type: object
      required:
        - name
        - version
        - is_dev
      title: TeepodImageInfo
    OnChainKmsInfo:
      properties:
        k256_pubkey:
          type: string
          title: K256 Pubkey
        ca_pubkey:
          type: string
          title: Ca Pubkey
        quote_length:
          type: integer
          title: Quote Length
        eventlog_length:
          type: integer
          title: Eventlog Length
      type: object
      required:
        - k256_pubkey
        - ca_pubkey
        - quote_length
        - eventlog_length
      title: OnChainKmsInfo
    OnChainVerification:
      properties:
        k256_pubkey_match:
          anyOf:
            - type: boolean
            - type: 'null'
          title: K256 Pubkey Match
          description: RPC vs chain k256_pubkey
        ca_pubkey_match:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ca Pubkey Match
          description: RPC vs chain ca_pubkey
        gateway_app_id_match:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Gateway App Id Match
          description: RPC vs chain gateway_app_id
        device_id_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Device Id Allowed
          description: Guest agent device_id in whitelist
        os_image_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Os Image Allowed
          description: Guest agent os_image_hash in whitelist
        mr_aggregated_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mr Aggregated Allowed
          description: Guest agent mr_aggregated in whitelist
      type: object
      title: OnChainVerification

````