--- title: port full: true --- import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api"; ## port-create ### Authorization "} required={true}> In: `header` ### Request Body Default: `"tcp"` Value in: `"tcp" | "udp"` Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/port.create" \ -d '{ "publishedPort": 0, "targetPort": 0, "protocol": "tcp", "applicationId": "string" }' ``` ```js fetch("http://localhost:3000/api/port.create", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## port-one ### Authorization "} required={true}> In: `header` ### Query Parameters Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/port.one?portId=string" ``` ```js fetch("http://localhost:3000/api/port.one?portId=string", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## port-delete ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/port.delete" \ -d '{ "portId": "string" }' ``` ```js fetch("http://localhost:3000/api/port.delete", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## port-update ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` Default: `"tcp"` Value in: `"tcp" | "udp"` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/port.update" \ -d '{ "portId": "string", "publishedPort": 0, "targetPort": 0, "protocol": "tcp" }' ``` ```js fetch("http://localhost:3000/api/port.update", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ```