# Get a note

`GET /api/v1/vaults/{vault}/knowledge/notes/{note}`

Retrieve one note with its text and its headings.

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.
- `note` (uuid, required): The id of the note. A note of another vault or of another account answers 404.

## Returns

A knowledge note object. A note of another vault or of another account answers 404.

- `data` (object): The knowledge note.
- `data.type` (string): Always knowledge_note. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.
- `data.id` (string): The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.
- `data.attributes` (object): Everything the record holds.
- `data.attributes.title` (string): The title of the note.
- `data.attributes.folder` (object): The folder the note sits in.
- `data.attributes.folder.id` (uuid): The id of the folder, as the knowledge folders endpoints give it.
- `data.attributes.folder.name` (string): What the folder is called.
- `data.attributes.created_at` (timestamp): When the note was written, as a count of seconds since 1970.
- `data.attributes.updated_at` (timestamp): When it last changed, as a count of seconds, or null.
- `data.attributes.body` (string): The text of the note in Markdown, exactly as written, or null. It is never drawn: raw HTML in it stays text, and the application escapes it when it shows the note.
- `data.attributes.headings` (array): The headings of the text, from the first level to the third, in reading order.
- `data.attributes.headings[]` (object): One heading.
- `data.attributes.headings[].text` (string): What the heading says.
- `data.attributes.headings[].level` (integer): Its level, 1 to 3.
- `data.attributes.headings[].anchor` (string): The anchor the application gives it, to open the note at that heading with links.web followed by # and the anchor.
- `data.links` (object): Where to find this record.
- `data.links.self` (string): The absolute address this record is read from.
- `data.links.web` (string): The note in the application, which opens for somebody signed in rather than for a key. It is the link to give a person.

## 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/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92 \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92', {
  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/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92');
```

## Response

`200`

```json
{
    "data": {
        "type": "knowledge_note",
        "id": "7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92",
        "attributes": {
            "title": "Dundies speech",
            "body": "## Best dressed\nPam, again.\n\n- [x] Book Chili's\n- [ ] Engrave the trophies",
            "headings": [
                {
                    "text": "Best dressed",
                    "level": 2,
                    "anchor": "section-best-dressed"
                }
            ],
            "folder": {
                "id": "2b7e4c91-0d5a-4f38-9c16-8e3a7f1b5d24",
                "name": "Office"
            },
            "created_at": 1773331200,
            "updated_at": 1773417600
        },
        "links": {
            "self": "https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92",
            "web": "https://my.monicahq.com/vaults/dunder-mifflin/knowledge/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92"
        }
    }
}
```
