# Ports

The port rules of an SVM and the presigned links of authenticated ports

Source: https://slashinfra.com/docs/api-reference/control/ports
Last modified: 2026-11-30T16:36:19.000Z

The port rules of an SVM and the presigned links of authenticated ports

Resource, request and plan limits are listed on [Limits](https://slashinfra.com/docs/reference/limits).

[Download OpenAPI specification](https://slashinfra.com/docs/control.openapi.json) · Version 0.1.0

[GETList the open ports of an SVM](https://slashinfra.com/docs/api-reference/control/ports#getSvmsByRefPorts)[DELETEClose a port of an SVM](https://slashinfra.com/docs/api-reference/control/ports#deleteSvmsByRefPortsByPort)[PUTOpen or change a port of an SVM](https://slashinfra.com/docs/api-reference/control/ports#putSvmsByRefPortsByPort)[POSTRotate the links of a port](https://slashinfra.com/docs/api-reference/control/ports#postSvmsByRefPortsByPortRotate)[POSTMake a presigned link of a port](https://slashinfra.com/docs/api-reference/control/ports#postSvmsByRefPortsByPortUrl)

### List the open ports of an SVM

GET

/svms/{ref}/ports

Returns the open ports of an SVM with a fresh presigned link for each `authenticated` port; a port that is not listed is closed.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

The open ports of the SVM, by port; a port that is not listed is closed.

`application/json`

- response

- response
- …

The open ports of the SVM, by port; a port that is not listed is closed.

`[index: integer]?`

One open port of an SVM.

Example Request

```
curl -X GET 'https://api.slashinfra.com/svms/build-1/ports'
```

Example ResponseSchema

```
[  {    "access": "authenticated",    "port": 3000,    "url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."  }]
```

### Close a port of an SVM

DELETE

/svms/{ref}/ports/{port}

Closes a port so only members of the organization reach it, and every presigned link of the port stops working, even after the port is opened again. Closing an already closed port changes nothing.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

`port*`string

The port of the SVM, from 1 to 65535.

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

The port is closed, and every link of the port stops working at once.

`response?`string`text/plain`

The port is closed, and every link of the port stops working at once.

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/ports/3000'
```

Example ResponseSchema

```
"string"
```

### Open or change a port of an SVM

PUT

/svms/{ref}/ports/{port}

Opens a port or changes its access; a port that is not open is closed and only members reach it. The first open, an access change, a close or a rotate each make a new generation, and every link minted before it stops working.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

`port*`string

The port of the SVM, from 1 to 65535.

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Request Body

- body

- body
- …

`access*`string

The access to open the port with: `authenticated` accepts members and holders of the link, `public` accepts anyone, and any other value answers 400 `invalid_access`.

#### Response Body

One open port of an SVM.

`application/json`

- response

- response
- …

One open port of an SVM.

`access*`string

`authenticated` accepts members and holders of the link; `public` accepts anyone.

Value in`"authenticated"``"public"`

`port*`integer

The port of the SVM, from 1 to 65535.

`url*`|

A presigned link of the port.

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/ports/3000' \  -H 'Content-Type: application/json' \  -d '{  "access": "authenticated"}'
```

Example ResponseSchema

```
{  "access": "authenticated",  "port": 3000,  "url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."}
```

### Rotate the links of a port

POST

/svms/{ref}/ports/{port}/rotate

Makes a new generation of an open port, so every link minted before it answers 401 `unauthorized`; the port keeps its access and returns a fresh link when `authenticated`.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

`port*`string

The port of the SVM, from 1 to 65535.

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

One open port of an SVM.

`application/json`

- response

- response
- …

One open port of an SVM.

`access*`string

`authenticated` accepts members and holders of the link; `public` accepts anyone.

Value in`"authenticated"``"public"`

`port*`integer

The port of the SVM, from 1 to 65535.

`url*`|

A presigned link of the port.

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/ports/3000/rotate'
```

Example ResponseSchema

```
{  "access": "authenticated",  "port": 3000,  "url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."}
```

### Make a presigned link of a port

POST

/svms/{ref}/ports/{port}/url

Mints a stateless link for one SVM, one port and the current generation of an `authenticated` or `public` port, valid for `ttl_s`. Closing or rotating the port invalidates it.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

`port*`string

The port of the SVM, from 1 to 65535.

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Request Body

- body

- body
- …

`ttl_s?`number

The life of the link in seconds, 3600 by default; the longest is the `max_url_ttl_s` of the plan, 30 days on both plans.

#### Response Body

A presigned link of one port and its expiry.

`application/json`

- response

- response
- …

A presigned link of one port and its expiry.

`expires_at*`integer

The expiry of the link in milliseconds since the Unix epoch.

`url*`string

The presigned URL of the port: `https://<port>-<id>.<SVM domain>/?si_access=<token>`; the first `GET` answers a 303 without the token and sets the access cookie.

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/ports/3000/url' \  -H 'Content-Type: application/json' \  -d '{}'
```

Example ResponseSchema

```
{  "expires_at": 1767229200000,  "url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."}
```

GET

/svms/{ref}/ports

Example Request

```
curl -X GET 'https://api.slashinfra.com/svms/build-1/ports'
```

```
[
{
"access": "authenticated",
"port": 3000,
"url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."
}
]
```

DELETE

/svms/{ref}/ports/{port}

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/ports/3000'
```

```
"string"
```

PUT

/svms/{ref}/ports/{port}

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/ports/3000' \
-H 'Content-Type: application/json' \
-d '{
"access": "authenticated"
}'
```

```
{
"access": "authenticated",
"port": 3000,
"url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."
}
```

POST

/svms/{ref}/ports/{port}/rotate

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/ports/3000/rotate'
```

```
{
"access": "authenticated",
"port": 3000,
"url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."
}
```

POST

/svms/{ref}/ports/{port}/url

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/ports/3000/url' \
-H 'Content-Type: application/json' \
-d '{}'
```

```
{
"expires_at": 1767229200000,
"url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."
}
```
