# Collection metrics

> Face/selfie counts for one collection, from the gateway's count registry (or a live engine read when the registry is… (GET /v1/collections/{id}/metrics)

Source: https://sightradar.com/docs/api/collections/collection-metrics

Face/selfie counts for one collection, from the gateway's count registry (or a live engine read when the registry is not ready, or with `?verify=true`). Free.

### Example request

```bash
curl -X GET "https://api.sightradar.com/v1/collections/$ID/metrics" \
  -H "Authorization: Bearer $SR_API_KEY"
```

Put each id in the path percent-encoded, as a single path segment. An id with `/`, `?`, `#`, `%` or a space otherwise addresses a different URL. In code, use your HTTP library's path encoding (for example `encodeURIComponent` in JavaScript or `urllib.parse.quote(id, safe="")` in Python).

### Parameters

| Name              | In    | Type      | Description                                                                                               |
| ----------------- | ----- | --------- | --------------------------------------------------------------------------------------------------------- |
| `id` **required** | path  | `string`  |                                                                                                           |
| `verify`          | query | `boolean` | Force a live engine read of the counts instead of the gateway registry (counts\_source becomes `engine`). |

### Response body

| Field           | Type      | Description                                                               |
| --------------- | --------- | ------------------------------------------------------------------------- |
| `collection_id` | `string`  |                                                                           |
| `status`        | `string`  |                                                                           |
| `photo_count`   | `integer` |                                                                           |
| `face_count`    | `integer` |                                                                           |
| `selfie_count`  | `integer` |                                                                           |
| `counts_source` | `string`  | `postgres` = the gateway's count registry, `engine` = a live engine read. |

### Status codes

| Status | Meaning                     |
| ------ | --------------------------- |
| `200`  | Counts.                     |
| `401`  | Missing or invalid API key. |
| `404`  | Resource not found.         |
| `502`  | Engine metrics unavailable. |
