# List the Knowledge of a vault

`GET /api/v1/vaults/{vault}/knowledge/folders`

List every folder of a vault's Knowledge in its order, each with the ids and titles of its notes and lists.

It is the table of contents of the vault's Knowledge. Read a note or a list through its own endpoint.

This endpoint also answers QUERY, with the same parameters sent in the request body. [How QUERY works](https://my.monicahq.com/docs/api/query-method).

## Path parameters

- `vault` (string, required): The vault, named either by the readable name it reports as slug or by its id. A vault of another account answers 404.

## Returns

Every knowledge folder object of the vault, or an empty list. A vault of another account answers 404.

- `data` (array): Every folder of the vault, whole rather than a page at a time.
- `data[]` (object): One knowledge folder.
- `data[].type` (string): Always knowledge_folder.
- `data[].id` (string): The id of the folder, which every address naming it takes.
- `data[].attributes` (object): Everything the folder holds.
- `data[].attributes.name` (string): What the folder is called.
- `data[].attributes.position` (integer): Where the folder stands among the folders of the vault, from 1.
- `data[].attributes.note_count` (integer): How many notes the folder holds.
- `data[].attributes.list_count` (integer): How many lists the folder holds.
- `data[].attributes.notes` (array): The notes the folder holds.
- `data[].attributes.notes[]` (object): One note.
- `data[].attributes.notes[].id` (uuid): The id of the note, which the notes endpoints take.
- `data[].attributes.notes[].title` (string): The title of the note.
- `data[].attributes.lists` (array): The lists the folder holds.
- `data[].attributes.lists[]` (object): One list.
- `data[].attributes.lists[].id` (uuid): The id of the list, which the lists endpoints take.
- `data[].attributes.lists[].title` (string): The title of the list.
- `data[].attributes.created_at` (timestamp): When the folder was added, as a count of seconds since 1970.
- `data[].attributes.updated_at` (timestamp): When it last changed, as a count of seconds, or null.
- `data[].links` (object): Where to find the folder. A folder is not read on its own, so it has no address of its own.
- `data[].links.web` (string): The Knowledge screen of the vault in the application, which opens for somebody signed in rather than for a key.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/folders \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/folders', {
  headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/folders');
```

## Response

`200`

```json
{
    "data": [
        {
            "type": "knowledge_folder",
            "id": "2b7e4c91-0d5a-4f38-9c16-8e3a7f1b5d24",
            "attributes": {
                "name": "Office",
                "position": 1,
                "note_count": 1,
                "list_count": 1,
                "notes": [
                    {
                        "id": "7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92",
                        "title": "Dundies speech"
                    }
                ],
                "lists": [
                    {
                        "id": "e94b1c37-6a28-4d50-8b3f-2c7e9a4d1f68",
                        "title": "Paper clients"
                    }
                ],
                "created_at": 1773331200,
                "updated_at": 1773331200
            },
            "links": {
                "web": "https://my.monicahq.com/vaults/dunder-mifflin/knowledge"
            }
        },
        {
            "type": "knowledge_folder",
            "id": "c6f13a58-4e92-4b07-a1d3-5f8e2c9b7a60",
            "attributes": {
                "name": "Warehouse",
                "position": 2,
                "note_count": 0,
                "list_count": 0,
                "notes": [],
                "lists": [],
                "created_at": 1773417600,
                "updated_at": 1773417600
            },
            "links": {
                "web": "https://my.monicahq.com/vaults/dunder-mifflin/knowledge"
            }
        }
    ]
}
```
