---
title: "Port-forward to a VM using WebSocket protocol"
method: GET
path: "/vms/{name}/port-forward"
tags: ["vms"]
---

# Port-forward to a VM using WebSocket protocol

`GET /vms/{name}/port-forward`

## Query parameters

- `port` integer, required
- `wait` integer

## Headers

- `Connection` string, required
- `Upgrade` string, required

## Other responses

- `400` — Invalid port specified
- `404` — VM resource with the given name doesn't exist
- `503` — Failed to establish connection with the worker responsible for the specified VM

## Changes

- **2025-02-06** `0e915eea7aec` — 1 breaking
  - for the `query` request parameter `wait`, default value `10` was added
- **2023-03-27** `cdbab610e872` — 1 info
  - added the new optional `query` request parameter `wait`
- **2023-03-14** `2ad125bdbe8c` — 1 info
  - endpoint added
- **2023-01-26** `4b9547159dde` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openai/apis/orchard/changes/vms/:name/port-forward/get.md)

---

[API](https://skmtc.dev/openai/apis/orchard.md) · [All operations](https://skmtc.dev/openai/apis/orchard/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openai/orchard/revisions/e3d343d89278/schema)
