# List Deployments

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"List Deployments"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/workspaces/{workspace_name}/deployments"}
  context={"endpoint"}
>
  
</MethodEndpoint>

List deployments in the workspace, sorted by ``updated_at`` descending by default.

The runtime ``status`` of each deployment is reconciled from the operator before returning.
``total`` reflects any active filters.

Pagination supports offset (``page_number`` and ``limit``) and keyset cursor
(``before`` / ``after``) modes; use one at a time. Keyset cursor pagination
(``before`` / ``after``) is not supported together with ``field=pipeline_name``
and returns 422 if combined.

You can filter results using OData syntax via the ``filter`` query parameter. Supported fields:
- ``status``: Filter by persisted deployment status (``eq`` only), e.g.
  ``filter=status eq 'DEPLOYED'``
- ``pipeline_name``: Filter by pipeline name from the active-revision lineage (``eq`` only), e.g.
  ``filter=pipeline_name eq 'my-pipeline'``
- Combined filters: ``filter=status eq 'DEPLOYED' and pipeline_name eq 'my-pipeline'``

You can sort results via ``field`` and ``order`` query parameters. Supported sort fields:
- ``updated_at``, ``created_at``, ``name``, ``pipeline_name``
- Directions: ``ASC``, ``DESC``
- Sort applies to the full result set before pagination.

Status filter semantics — ``filter=status eq '<value>'`` accepts only the persisted
``DeploymentStatus`` values:
- ``DEPLOYED`` (UI: Active): filterable
- ``UNDEPLOYED`` (UI: Inactive): filterable
- ``DEPLOYMENT_IN_PROGRESS`` (UI: Starting): filterable
- ``DEPLOYMENT_FAILED`` (UI: Failed): filterable
- ``IDLE`` (UI: Standby): accepted but returns 0 rows — derived at read time, never persisted
Any other value returns 422. UI-only states such as "No version published" (no active revision)
are not filterable.

Example requests:
- ``?limit=10&page_number=1``
- ``?filter=status eq 'DEPLOYED'&limit=10``
- ``?filter=status eq 'IDLE'&limit=10``
- ``?filter=pipeline_name eq '{pipeline-name}'&limit=10``
- ``?filter=status eq 'DEPLOYED' and pipeline_name eq '{pipeline-name}'&limit=10``
- ``?field=pipeline_name&order=ASC&limit=10``
- ``?field=pipeline_name&order=DESC&limit=10``
- ``?field=updated_at&order=DESC&limit=10``

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./list-deployments-api-v-1-workspaces-workspace-name-deployments-get.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./list-deployments-api-v-1-workspaces-workspace-name-deployments-get.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./list-deployments-api-v-1-workspaces-workspace-name-deployments-get.StatusCodes.json")}
>
  
</StatusCodes>
