Repository navigation
microvms: document port_forward WebSocket endpoint - #1343
Merged
Merged
Conversation
Add GET /v2/microvms/{microvm_id}/port_forward?port=N. The endpoint
upgrades to a WebSocket that carries one TCP connection to 127.0.0.1:N
inside the MicroVM.
- New operation, 101 upgrade response, port query parameter and a
websocat code sample.
- Options model lists the port_forward feature gate.
- bad_request has an Invalid Port example.
- The MicroVMs tag description mentions port forwarding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SSharma-10
reviewed
Nov 20, 2026
Comment on lines
+109
to
+117
| required: true | ||
| description: >- | ||
| The TCP port to connect to inside the MicroVM. Port 50051 is reserved and | ||
| cannot be forwarded. | ||
| schema: | ||
| type: integer | ||
| minimum: 1 | ||
| maximum: 65535 | ||
| example: 8080 |
Contributor
There was a problem hiding this comment.
Description says 50051 is reserved, but the schema still allows it. Should we include this case in the Invalid Port 400 example?
Contributor
Author
There was a problem hiding this comment.
Good point added a fix
The port schema allows 1..65535, and the server rejects 50051 with INVALID_ARGUMENT "port 50051 is reserved". Show that response as its own example instead of narrowing the schema, because OpenAPI 3.0 needs `not` for the exclusion and generated SDKs handle `not` poorly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add GET /v2/microvms/{microvm_id}/port_forward?port=N. The endpoint upgrades to a WebSocket that carries one TCP connection to 127.0.0.1:N inside the MicroVM.