# list_deployments

`tools/call` · `POST /agent/v1/deployments:list`

List deployments, sorted by product name and then environment name, optionally for one product or one environment. A deployment counts as archived when its product or its environment is. Returns deployments, each with its product, environment, base URL and version. Needs read access.

- Area: Catalog
- Needs the read grant. Read-only. Idempotent.

## Inputs

- `product` (string): Only this product's deployments, such as storefront.
- `environment` (string): Only deployments to this environment, such as staging.
- `archived` (string, one of: `exclude`, `include`, `only`): Which deployments to list: exclude (the default) leaves archived ones out, include adds them, only lists just them.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_deployments",
    "arguments": {
      "product": "storefront"
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/deployments:list \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "product": "storefront"
  }'
```
