List what listens in a sandbox now

Every TCP and UDP port a program in the sandbox listens on, with its setting and, for TCP, its URL.

GET/v1/sandboxes/{sandbox_id}/ports/listening

Every TCP and UDP port a program in the sandbox listens on, with its setting and, for TCP, its URL. It wakes nothing: a sandbox that is not running answers conflict.

A key with the sandboxes:read scope.

Request

curl "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/ports/listening" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes

Answer

200. What listens now.

200
{
  "data": [
    {
      "port": 1,
      "protocol": "tcp",
      "address": "example",
      "visibility": "private",
      "name": null,
      "url": null
    }
  ],
  "next_cursor": null
}
FieldTypeAlwaysWhat it is
dataListeningPort[]Yes
next_cursorstring | nullYesAlways null.

Errors

The refusals this call is known for: conflict, guest_unavailable, not_found, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.ports.listening(sandboxId)
Pythonpod.ports.listening(sandbox_id)