---
title: "Lists ports for a vm."
method: GET
path: "/vm/{vm_id}/ports"
tags: ["vms"]
---

# Lists ports for a vm.

`GET /vm/{vm_id}/ports`

Required RBAC Policy: kots/vm/[:vmid]/port/list

## Path parameters

- `vm_id` string, required

## Response `200`

ListVMPortsResponse contains the response to a list vm [prts] request

- object
  - `addons` VMAddon[]
    - `created_at` string, date-time
    - `guid` string
    - `id` string
    - `port` VMAddonPort
      - `name` string
      - `protocol_http` boolean
      - `protocol_https` boolean
      - `protocol_ws` boolean
      - `protocol_wss` boolean
      - `upstream_port` integer
    - `ready_at` string, date-time
    - `status` string
    - `terminated_at` string, date-time
    - `total_credits` integer
    - `vm_guid` string
    - `vm_id` string
  - `ports` VMPort[]
    - `addon_guid` string
    - `addon_id` string
    - `created_at` string, date-time
    - `exposed_ports` VMExposedPort[]
      - `exposed_port` integer
      - `protocol` string
    - `hostname` string
    - `port_name` string
    - `state` string
    - `upstream_port` integer
    - `vm_guid` string
    - `vm_id` string

## Other responses

- `400` — Returned on bad input
- `401` — Return if the caller is not authorized
- `403` — Returned if the caller does not have the needed permission
- `404` — Returned on resource not found

---

[API](https://skmtc.net/replicated/apis/vendor-api-v3-2.md) · [All operations](https://skmtc.net/replicated/apis/vendor-api-v3-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/replicated/vendor-api-v3-2/versions/6fcf9e54aba4/schema)
