API documentation: add tag to note

I recently stumbled upon a small undocumented behavior of the data API when testing joppy. I guess this doesn't affect any real usecase, so it should be fine to leave it here as documentation.

When adding an existing tag to an existing note, the response contains note_id and tag_id. These keys are not documented at Joplin Data API | Joplin.

Reproducer (bash):


# create notebook
curl --silent --data '{"title": "test_notebook"}' "http://localhost:41184/folders?token=$API_TOKEN" &> /dev/null

# create note
NOTE_ID=$(curl --silent --data '{"title": "test_note"}' "http://localhost:41184/notes?token=$API_TOKEN" | jq --raw-output ".id")

# create tag
TAG_ID=$(curl --silent --data '{"title": "test_tag"}' "http://localhost:41184/tags?token=$API_TOKEN" | jq --raw-output ".id")

echo "$NOTE_ID"
echo "$TAG_ID"

# link the tag to the note
curl --silent --data '{"id": "'$NOTE_ID'"}' "http://localhost:41184/tags/$TAG_ID/notes?token=$API_TOKEN"

Example output of the code snippet: