# Get key store usage

> Source: https://truto.one/docs/api-reference/admin/key-stores/usage/

`GET /key-store/{id}/usage`

Resource: **Key stores**

How many of the environment's integrated accounts and environment integrations keep their secrets in this key store, how many still have them encrypted by Truto, and how many are in another of the environment's key stores.

## Path parameters

- **`id`** _(string, required)_

## Response body

- **`integrated_accounts`** _(object)_
  - **`in_key_store`** _(integer)_
    How many keep their secrets in this key store.
  - **`in_truto`** _(integer)_
    How many in the environment still have their secrets encrypted by Truto: written before a store was current, and not moved since.
  - **`in_other_stores`** _(integer)_
    How many in the environment keep their secrets in another of its key stores (one it was switched away from). "Move all now" on the current store moves them.
- **`environment_integrations`** _(object)_
  - **`in_key_store`** _(integer)_
    How many keep their secrets in this key store.
  - **`in_truto`** _(integer)_
    How many in the environment still have their secrets encrypted by Truto: written before a store was current, and not moved since.
  - **`in_other_stores`** _(integer)_
    How many in the environment keep their secrets in another of its key stores (one it was switched away from). "Move all now" on the current store moves them.

## Errors

| Status | Description |
| :----- | :---------- |
| `404` | Not found |

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/key-store/{id}/usage' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/key-store/{id}/usage', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/key-store/{id}/usage"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
