---
title: "Get queued run count"
method: GET
path: "/v1/projects/{project_id}/environments/{environment_id}/queued-count"
tags: ["runs"]
---

# Get queued run count

`GET /v1/projects/{project_id}/environments/{environment_id}/queued-count`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/environments/{environment_id}/queued-count`
- Auth: HTTP bearer

Returns how many runs in the environment are currently waiting in `queued` status, optionally for one agent.

Required permission: `runs.view`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required

## Query parameters

- `agent_name` string, nullable: Only count runs of this agent.

## Response `200`

Successful Response

- QueuedCountResponse: Number of runs waiting in the queue.
  - `queued_count` integer, required: Runs currently in `queued` status; scheduled runs are not counted.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `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)
