intentic
Create your workspace
The workspace

Ports

What is listening inside the sandbox, and forwarding one out

On this page(3 sections)

The ports something is answering on, and giving one an address on the outside or taking that away.

GET/portsWhat is listening inside the sandbox

Every port something is answering on, and whether each one is reachable from outside.

What you send

Nothing. Call it as it is.

What comes back

FieldType
portsEverything listening inside the sandbox right…object[]
portThe port numbernumber
hostWhich loopback address it actually answers…"127.0.0.1" | "::1"
forwardableWhether it can be exposed at…boolean
kindWhether somebody's own work put it…"workspace" | "system"
titleWhat a person would call itstring
purposeOne sentence about what it is…string
originWho put it there, which is…"terminal" | "agent" | "panel" | "extension" … (7)
pidThe process holding itnumber
commandThe command behind it, as it…string
cwdWhere it is running from, which…string
sessionThe terminal it came from, to…string
forwardedWhether it is currently reachable from…boolean
previewUrlWhere to open itstring
Try itanswered in this tab
curl
curl "$SANDBOX/ports" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.ports.list();
POST/ports/forwardMake a port reachable

Gives one port an address on the outside. Asking twice is harmless: the second call hands back the address the first one made.

What you send

FieldTypeWhere
portrequiredWhich portintegerbody

What comes back

FieldType
previewUrlWhere it can now be reachedstring
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/ports/forward" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"port":5173}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.ports.forward({
  "port": 5173
});
POST/ports/unforwardStop exposing a port

Frees the slot at once. The address keeps resolving; it simply stops leading anywhere.

What you send

FieldTypeWhere
portrequiredWhich portintegerbody

What comes back

FieldType
okAlways truetrue
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/ports/unforward" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"port":5173}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.ports.unforward({
  "port": 5173
});
More in The workspace

Type to search every page, in the docs and the API reference.