---
title: "List CLI site deployments"
method: GET
path: "/v2/teamspaces/{teamspaceId}/sites/{siteId}/local-deployments"
tags: ["Docs7 Sites"]
---

# List CLI site deployments

`GET /v2/teamspaces/{teamspaceId}/sites/{siteId}/local-deployments`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/local-deployments`
- Auth: HTTP bearer

The builds and live targets of a site deployed with the `docs7 deploy` CLI, to follow its build state. Read the log lines of a build with get build logs. Only for CLI sites: a GitHub site answers 404. Any member.

## Path parameters

- `teamspaceId` string, uuid, required
- `siteId` string, uuid, required

## Response `200`

Builds and targets

- object
  - `data` object, required
    - `deployments` Docs7LocalDeployment[], required
      - `id` string, uuid, required
      - `siteId` string, uuid, required
      - `projectId` string, uuid
      - `hostname` string
      - `workerName` string
      - `target` 'production' | 'preview', required
      - `branch` 'local', nullable: `local` for a preview; null for production.
      - `trigger` 'cli', required
      - `state` 'awaiting_upload' | 'queued' | 'building' | 'succeeded' | 'failed' | 'canceled', required: `awaiting_upload`: the CLI has not uploaded the files yet.
      - `source` object: The uploaded archive.
        - `sha256` string
        - `archiveBytes` integer
        - `sourceBytes` integer
        - `fileCount` integer
        - `directoryCount` integer
        - `cliVersion` string
      - `attributionRequired` boolean
      - `triggeredBy` string
      - `commitSha` string, nullable
      - `uploadExpiresAt` string, date-time
      - `createdAt` string, date-time, required
      - `startedAt` string, date-time, nullable
      - `completedAt` string, date-time, nullable
      - `failure` object: Only on a failed build.
        - `kind` 'content' | 'configuration' | 'source' | 'capacity' | 'platform', required
        - `message` string, required
      - `cancellation` object: Only on a canceled build.
        - `reason` 'superseded' | 'preview_removed' | 'site_removed' | 'target_changed', required
        - `replacementDeploymentId` string, uuid
    - `targets` Docs7DeploymentTarget[], required
      - `hostname` string, required
      - `workerName` string
      - `branch` string, nullable, required: Null for production.
      - `liveDeploymentId` string, uuid, nullable, required
      - `publicUrl` string, uri, nullable, required
      - `customDomainRouting` 'dns' | 'proxy', nullable

## Other responses

- `400`: Invalid teamspace or site id
- `401`: Missing or invalid bearer
- `403`: Not a member, missing role, or an API key of another teamspace
- `404`: No such site in this teamspace
- `500`: Internal error

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/sites/:siteId/local-deployments/get.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
