Unexpose Sandbox Port
Drops a port from the sandbox's preview exposures. Metadata only: already-issued tokens stop working when they expire. A port that is not exposed is a no-op. Unimplemented when no preview domain is configured.
Access: namespace OPERATOR or above (write)
Authorization
BearerAuth A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC
token for humans. The key's namespace and role are pinned server-side.
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
1 <= length <= 64validate:skip any value accepted; a port that is not exposed is a no-op
Response Body
application/json
application/json
curl -X POST "https://containers.xeonr.io/containers.api.v1.SandboxService/UnexposePort" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"sandbox": {
"sandboxId": "string",
"namespace": "string",
"environmentId": "string",
"workspaceId": "string",
"state": "SANDBOX_STATE_UNSPECIFIED",
"ports": [
{
"port": 0,
"url": "string",
"accessToken": "string",
"auth": "AUTH_UNSPECIFIED"
}
],
"createdAtUnix": "string",
"resources": {
"cpuMillis": 0,
"memoryMb": 0,
"ephemeralMb": 0,
"pids": 0
},
"idleSuspendSec": 0,
"maxLifetimeSec": 0,
"workspaceCache": {
"policy": "POLICY_UNSPECIFIED",
"writebackSec": 0
},
"egressGrant": {
"mode": "MODE_UNSPECIFIED",
"expiresAtUnix": "string",
"reason": "string",
"policy": {
"mode": "MODE_UNSPECIFIED",
"allow": [
{
"hostPattern": "string",
"ports": [
0
],
"mode": "RULE_MODE_UNSPECIFIED",
"pathPrefixes": [
"string"
],
"methods": [
"string"
],
"maxResponseBytes": "string",
"allowPlainHttp": true
}
],
"presets": [
"string"
],
"allowPlainHttp": true
},
"id": "string"
},
"runtimeEgress": {
"mode": "MODE_UNSPECIFIED",
"allow": [
{
"hostPattern": "string",
"ports": [
0
],
"mode": "RULE_MODE_UNSPECIFIED",
"pathPrefixes": [
"string"
],
"methods": [
"string"
],
"maxResponseBytes": "string",
"allowPlainHttp": true
}
],
"presets": [
"string"
],
"allowPlainHttp": true
},
"label": "string",
"egressGrants": [
{
"mode": "MODE_UNSPECIFIED",
"expiresAtUnix": "string",
"reason": "string",
"policy": {
"mode": "MODE_UNSPECIFIED",
"allow": [
{
"hostPattern": "string",
"ports": [
0
],
"mode": "RULE_MODE_UNSPECIFIED",
"pathPrefixes": [
"string"
],
"methods": [
"string"
],
"maxResponseBytes": "string",
"allowPlainHttp": true
}
],
"presets": [
"string"
],
"allowPlainHttp": true
},
"id": "string"
}
],
"env": {
"property1": "string",
"property2": "string"
},
"workspaces": [
{
"snapshotId": "string",
"mountPath": "string",
"readOnly": true,
"workspaceId": "string",
"ephemeral": true,
"ephemeralFromSnapshotId": "string",
"volume": {
"sizeMb": "string",
"seedSnapshotId": "string",
"cacheKey": "string"
}
}
],
"workingDir": "string",
"argv": [
"string"
],
"restart": "SANDBOX_RESTART_UNSPECIFIED",
"onExit": "SANDBOX_ON_EXIT_UNSPECIFIED",
"runState": "RUN_STATE_UNSPECIFIED",
"run": 0,
"lastExitCode": 0
}
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}Tail Sandbox Logs POST
Streams the sandbox's retained run log (workload output plus typed lifecycle markers) across its whole life, including suspends. Starts after from_offset (0 = oldest retained), optionally restricted to one run. limit caps history replayed per read (0 = 2000). With follow, stays open and polls for new output about every 2 seconds. sandbox_id is required (InvalidArgument). **Access:** namespace VIEWER or above (read)
Watch Sandbox POST
Server stream of sandbox state changes, derived from the record and the live pod phase and polled about every 2 seconds. Emits only on change and ends once the sandbox is TERMINATED. Unimplemented without cluster access. **Access:** namespace VIEWER or above (read)