> ## 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 network configuration

> Returns real-time KMS URLs, Gateway URLs, and port mappings from VMM.



## OpenAPI

````yaml /openapi.json get /api/v1/cvms/{cvm_id}/network-config
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}/network-config:
    get:
      tags:
        - CVMs
        - cvms-network-config
      summary: Get network configuration
      description: Returns real-time KMS URLs, Gateway URLs, and port mappings from VMM.
      operationId: handle_get_network_config_api_v1_cvms__cvm_id__network_config_get
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      responses:
        '200':
          description: Network configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkConfigResponse'
        '404':
          description: CVM not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Failed to query VMM
components:
  schemas:
    NetworkConfigResponse:
      properties:
        kms_urls:
          items:
            type: string
          type: array
          title: Kms Urls
        gateway_urls:
          items:
            type: string
          type: array
          title: Gateway Urls
        ports:
          items:
            $ref: '#/components/schemas/NetworkConfigPortMappingEntry'
          type: array
          title: Ports
      type: object
      title: NetworkConfigResponse
      description: Real-time network configuration from VMM.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NetworkConfigPortMappingEntry:
      properties:
        host_port:
          type: integer
          maximum: 65535
          minimum: 1
          title: Host Port
        vm_port:
          type: integer
          maximum: 65535
          minimum: 1
          title: Vm Port
        protocol:
          type: string
          pattern: ^(tcp|udp)$
          title: Protocol
          default: tcp
        host_address:
          type: string
          title: Host Address
          default: ''
      type: object
      required:
        - host_port
        - vm_port
      title: NetworkConfigPortMappingEntry
      description: Single port mapping rule returned from VMM network config.
    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

````