---
title: "Get port mappings"
method: GET
path: "/api/v1/cvms/{cvm_id}/ports"
tags: ["CVMs", "cvms-network-config"]
---

# Get port mappings

`GET /api/v1/cvms/{cvm_id}/ports`

Returns persisted port mappings for this CVM.

## Path parameters

- `cvm_id` string, required

## Response `200`

Port mappings

- PortMappingResponse[]
  - `id` string, hashid, required — A hashed identifier that maps to an internal database ID
  - `host_port` integer, required
  - `vm_port` integer, required
  - `protocol` string, required
  - `host_address` string, required

## Other responses

- `404` — CVM not found
- `422` — Validation Error

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/versions/83c6ae62e860/schema)
