# List searchable vector collections

Operation ID: `graph.listVectorCollections`

List the vector collections this deployment can search, with each one's chunk count, vector width, similarity metric, and whether it is partitioned by payer (which makes payer_key mandatory when reading it). The width is the operationally important field: the collections are loaded by a separate pipeline, so a corpus embedded with a different model has a different width and cannot be searched with this deployment's query vectors at all.

## Public method

`listVectorCollections`

Signature: `graph.listVectorCollections()`

Return type: `Promise<ListVectorCollectionsResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /graph/vector/collections`

## Path parameters

None.

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`ListVectorCollectionsResponse`](../models/ListVectorCollectionsResponse.md) | application/json | Configured collections with chunk count, vector width and metric |

## Success response examples

### 200

```json
{
  "collections": [
    {
      "available": true,
      "chunk_count": 4211,
      "collection": "medical_documents",
      "detail": null,
      "dimension": 384,
      "metric_type": "COSINE",
      "partitioned_by_payer": false,
      "role": "documents"
    }
  ],
  "embedding_model": "BAAI/bge-small-en-v1.5",
  "total": 1
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |
| `503` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Vector search is not configured in this environment |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

### 503 — No Milvus endpoint or embedding key is provisioned

```json
{
  "error": "Vector search is not configured"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const result = await graph.listVectorCollections();
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-graph.health.cloud/graph/vector/collections'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
