Everstack
API ReferenceSandboxList Ports

List Exposed Ports

GET/v1/sandbox/{sessionId}/ports
GET/v1/sandbox/{'{sessionId}'}/ports

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Parameters

NameInTypeRequiredDescription
sessionIdpathstringYes
tenantIdquerystringNo

Responses

200 List exposed ports for a sandbox

PropertyTypeDescription
portsobject[]

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X GET "https://{instance}.{region}.everstack.ai/v1/sandbox/{sessionId}/ports" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
const response = await fetch("https://{instance}.{region}.everstack.ai/v1/sandbox/{sessionId}/ports", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
});
const data = await response.json();
import requests

response = requests.get(
    "https://{instance}.{region}.everstack.ai/v1/sandbox/{sessionId}/ports",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
)
data = response.json()

Response

{
  "ports": [
    {
      "id": "string",
      "sandboxId": "string",
      "port": 0,
      "protocol": "string",
      "subdomain": "string",
      "url": "string",
      "status": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}