---
title: "List deployments"
method: GET
path: "/v1/projects/{project_id}/deployments"
tags: ["deployments"]
---

# List deployments

`GET /v1/projects/{project_id}/deployments`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/deployments`
- Auth: HTTP bearer

Returns all deployments in the environment, newest first, each with its number of failed test cases.

Required permission: `deployments.view`.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `environment_id` string, uuid, required: Environment to list deployments for.

## Response `200`

Successful Response

- DeploymentListItemResponse[]
  - `id` string, uuid, required
  - `project_id` string, uuid, required: Project the deployment belongs to.
  - `environment_id` string, uuid, required: Environment the deployment belongs to.
  - `commit_hash` string, nullable, required: Git commit or ref that was built. null for CLI uploads.
  - `source_type` 'git' | 'cli_upload', required: `git` for builds from the connected repository, `cli_upload` for code uploaded with the CLI.
  - `status` 'pending' | 'building' | 'deployed' | 'failed' | 'blocked' | 'cancelled', required: Deployment state: `pending` until the build starts, `building` while it builds, tests and activates, then `deployed`, `failed` or `cancelled`.
  - `is_active` boolean, required: Whether this deployment currently serves the environment.
  - `agents_metadata` string, required: JSON-encoded array with the configuration of each agent found in the code. `[]` until the build discovers agents.
  - `agents_count` integer, required: Number of agents in the deployment.
  - `tools_count` integer, required: Number of distinct tools referenced by the agents.
  - `middlewares_count` integer, required: Number of middleware modules found.
  - `guardrails_count` integer, required: Number of distinct guardrail types used by the agents.
  - `logs` string, nullable, required: Build and activation log output. null until the build writes output.
  - `created_at` string, date-time, required
  - `started_at` string, date-time, nullable, required: When the build started. null while pending.
  - `ended_at` string, date-time, nullable, required: When the deployment finished, failed or was cancelled.
  - `testing_started_at` string, date-time, nullable, required: When the test phase started. null if it has not run.
  - `deploy_started_at` string, date-time, nullable, required: When activation started. null if it has not started.
  - `tests_status` 'running' | 'passed' | 'failed' | 'skipped' | 'cancelled', nullable, required: Result of the deploy-gate test phase. null when tests have not run or the code has no tests.
  - `skip_tests` boolean, required: Whether the deploy-gate test phase was skipped for this deployment.
  - `connic_triggered` boolean, required: Whether connic started this deployment on the project's behalf.
  - `kind` 'deploy' | 'dev_session' | 'test_run', required: `deploy` for a regular deployment, `dev_session` for code synced by `connic dev`, `test_run` for a build that only runs tests.
  - `current_phase` string, nullable, required: Current phase: `building`, `testing`, `deploying`, `active` or `done`. null before the build starts.
  - `connectors_status` 'applied' | 'partial' | 'failed', nullable: Result of applying the connectors declared in code: `applied`, `partial` when some failed and kept their previous state, or `failed`. null until connectors are applied.
  - `skip_failed_connectors` boolean: Whether connectors declared in code that fail to apply keep their previous state instead of failing the deployment.
  - `tests_failed_count` integer, required: Number of test cases that failed in the deploy-gate test phase.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
