---
title: "Returns a collection of Ports for a SandboxEngine."
method: GET
path: "/v1/{parent}/ports"
tags: ["PortService"]
---

# Returns a collection of Ports for a SandboxEngine.

`GET /v1/{parent}/ports`

## Request

- Base URL: `https://docs.h2o.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.h2o.ai/v1/{parent}/ports`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:parent/ports/get.ts> (a function with typed inputs; its response is checked against the schema)

Authorization: Only the creator of the parent SandboxEngine is allowed to call this method.

## Path parameters

- `parent` string, required

## Query parameters

- `pageSize` integer
- `pageToken` string

## Response `200`

A successful response.

- V1ListPortsResponse: Response message for PortService.ListPorts.
  - `ports` V1Port[]: Collection of Ports.
    - `name` string: Identifier. Resource name of the Port.
    - `displayName` string: Optional. Human-readable display name for this port.
    - `public` boolean: Optional. Whether this port should be publicly accessible. If false, the port is only accessible within the cluster.
    - `internalUrl` string: Output only. URL for accessing this port from within the Kubernetes cluster.
    - `publicUrl` string: Output only. URL for accessing this port from outside the cluster. Only set when public is true.
    - `createTime` string, date-time: Output only. Time when this port was created.
    - `creator` string: Output only. Name of an entity that created this port.
    - `creatorDisplayName` string: Output only. Display name of the entity that created this port.
    - `updateTime` string, date-time, nullable: Output only. Time when this port was last updated.
    - `updater` string: Output only. Name of an entity that last updated this port.
    - `updaterDisplayName` string: Output only. Display name of the entity that last updated this port.
    - `state` 'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_READY' | 'STATE_FAILED' | 'STATE_DELETING': The state of the port. - STATE_UNSPECIFIED: The state is not specified. - STATE_PENDING: The port infrastructure is being created. - STATE_READY: The port is ready and accessible. - STATE_FAILED: The port creation has failed. - STATE_DELETING: The port is being deleted.
    - `failureReason` string: Output only. Failure reason during the port creation. Only set when state is STATE_FAILED.
  - `nextPageToken` string: Used to retrieve the next page of results. When unset, no further items are available (this response was the last page).

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto.md) - [All operations](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/revisions/57d1a2e93fcf?raw)
