Ports
The port rules of an SVM and the presigned links of authenticated ports
Resource, request and plan limits are listed on Limits.
Download OpenAPI specification · Version 0.1.0
List the open ports of an SVM
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe 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
The open ports of the SVM, by port; a port that is not listed is closed.
[index: integer]?One open port of an SVM.
curl -X GET 'https://api.slashinfra.com/svms/build-1/ports'[ { "access": "authenticated", "port": 3000, "url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..." }]Close a port of an SVM
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthport*stringThe port of the SVM, from 1 to 65535.
Query Parameters
project?stringThe 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?stringtext/plainThe port is closed, and every link of the port stops working at once.
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/ports/3000'"string"Open or change a port of an SVM
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthport*stringThe port of the SVM, from 1 to 65535.
Query Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
- body
access*stringThe 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
One open port of an SVM.
access*stringauthenticated accepts members and holders of the link; public accepts anyone.
"authenticated""public"port*integerThe port of the SVM, from 1 to 65535.
url*|A presigned link of the port.
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=..."}Rotate the links of a port
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthport*stringThe port of the SVM, from 1 to 65535.
Query Parameters
project?stringThe 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
One open port of an SVM.
access*stringauthenticated accepts members and holders of the link; public accepts anyone.
"authenticated""public"port*integerThe port of the SVM, from 1 to 65535.
url*|A presigned link of the port.
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=..."}Make a presigned link of a port
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthport*stringThe port of the SVM, from 1 to 65535.
Query Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
- body
ttl_s?numberThe 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
A presigned link of one port and its expiry.
expires_at*integerThe expiry of the link in milliseconds since the Unix epoch.
url*stringThe 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.
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=..."}curl -X GET 'https://api.slashinfra.com/svms/build-1/ports'[
{
"access": "authenticated",
"port": 3000,
"url": "https://3000-6f1c0f0e8a.slashinfra.dev/?si_access=..."
}
]curl -X DELETE 'https://api.slashinfra.com/svms/build-1/ports/3000'"string"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=..."
}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=..."
}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=..."
}