---
title: "List workspaces by namespace"
method: GET
path: "/workspaces/{namespace}"
tags: ["workspaces"]
---

# List workspaces by namespace

`GET /workspaces/{namespace}`

Returns a list of workspaces in a specific namespace.

## Path parameters

- `namespace` string, required

## Response `200`

Successful operation. Returns a list of workspaces in the specified namespace.

- ApiWorkspaceListEnvelope
  - `data` WorkspacesWorkspaceListItem[], required
    - `activity` WorkspacesActivity, required
      - `lastActivity` integer, required — Unix Epoch time
      - `lastProbe` WorkspacesLastProbeInfo
        - `endTimeMs` integer, required — Unix Epoch time in milliseconds
        - `message` string, required
        - `result` 'Success' | 'Failure' | 'Timeout', required
        - `startTimeMs` integer, required — Unix Epoch time in milliseconds
      - `lastUpdate` integer, required — Unix Epoch time
    - `audit` CommonAudit, required
      - `createdAt` string, required
      - `createdBy` string, required
      - `deletedAt` string, required
      - `updatedAt` string, required
      - `updatedBy` string, required
    - `name` string, required
    - `namespace` string, required
    - `paused` boolean, required
    - `pausedTime` integer, required
    - `pendingRestart` boolean, required
    - `podTemplate` WorkspacesPodTemplate, required
      - `options` WorkspacesPodTemplateOptions, required
        - `imageConfig` WorkspacesImageConfig, required
          - `current` WorkspacesOptionInfo, required
            - `description` string, required
            - `displayName` string, required
            - `id` string, required
            - `labels` WorkspacesOptionLabel[], required
              - …
          - `redirectChain` WorkspacesRedirectStep[]
            - `message` WorkspacesRedirectMessage
              - …
            - `source` WorkspacesOptionInfo, required
              - …
            - `target` WorkspacesOptionInfo, required
              - …
        - `podConfig` WorkspacesPodConfig, required
          - `current` WorkspacesOptionInfo, required
            - `description` string, required
            - `displayName` string, required
            - `id` string, required
            - `labels` WorkspacesOptionLabel[], required
              - …
          - `redirectChain` WorkspacesRedirectStep[]
            - `message` WorkspacesRedirectMessage
              - …
            - `source` WorkspacesOptionInfo, required
              - …
            - `target` WorkspacesOptionInfo, required
              - …
      - `podMetadata` WorkspacesPodMetadata, required
        - `annotations` object, required
        - `labels` object, required
      - `volumes` WorkspacesPodVolumes, required
        - `data` WorkspacesPodVolumeInfo[], required
          - `mountPath` string, required
          - `pvcName` string, required
          - `readOnly` boolean, required
        - `home` WorkspacesPodVolumeInfo
          - `mountPath` string, required
          - `pvcName` string, required
          - `readOnly` boolean, required
        - `secrets` WorkspacesPodSecretInfo[]
          - `defaultMode` integer
          - `mountPath` string, required
          - `secretName` string, required
    - `services` WorkspacesService[], required
      - `httpService` WorkspacesHttpService
        - `displayName` string, required
        - `httpPath` string, required
    - `state` 'Running' | 'Terminating' | 'Paused' | 'Pending' | 'Error' | 'Unknown', required
    - `stateMessage` string, required
    - `workspaceKind` WorkspacesWorkspaceKindInfo, required
      - `icon` AssetsImageRef, required
        - `error` 'CONFIGMAP_MISSING' | 'CONFIGMAP_KEY_MISSING' | 'CONFIGMAP_OTHER' | 'CONFIGMAP_UNKNOWN'
        - `url` string, required
      - `logo` AssetsImageRef, required
        - `error` 'CONFIGMAP_MISSING' | 'CONFIGMAP_KEY_MISSING' | 'CONFIGMAP_OTHER' | 'CONFIGMAP_UNKNOWN'
        - `url` string, required
      - `missing` boolean, required
      - `name` string, required

## Other responses

- `401` — Unauthorized. Authentication is required.
- `403` — Forbidden. User does not have permission to list workspaces.
- `422` — Unprocessable Entity. Validation error.
- `500` — Internal server error. An unexpected error occurred on the server.

---

[API](https://skmtc.net/opendatahub-io/apis/kubeflow-notebooks-api.md) · [All operations](https://skmtc.net/opendatahub-io/apis/kubeflow-notebooks-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opendatahub-io/kubeflow-notebooks-api/versions/257ea068094f/schema)
