List all tags (tagcloud)

GET /api/letter-tags
<?xml version="1.0" encoding="UTF-8"?>
<letter-tags type="array" page="1" per_page="100" total="2">
    <letter-tag>
        <id type="integer">1</id>
        <name>foo</name>
        <count type="integer">12</count>
    </letter-tag>
    <letter-tag>
        <id type="integer">1</id>
        <name>bar</name>
        <count type="integer">7</count>
    </letter-tag>
</letter-tags>

List all tags for a letter

GET /api/letter-tags?letter_id={letter_id}

Tags can only be returned for a particular letter.
Therefore letter_id is a mandatory parameter.

<?xml version="1.0" encoding="UTF-8"?>
<letter-tags type="array" page="1" per_page="100" total="2">
    <letter-tag>
        ...
    <letter-tag>
    <letter-tag>
        ...
    <letter-tag>
</letter-tags>

Get a single tag

GET /api/letter-tags/{id}
<?xml version="1.0" encoding="UTF-8"?>
<letter-tag>
    <id type="integer">1</id>
    <letter_id type="integer">1</letter_id>
    <name>foo</name>
</letter-tag>

Create tag

POST /api/letter-tags
XML element Description Type Default value Mandatory
letter_id ID of the letter INT yestd>
name Name of the tag ALNUM yes
<letter-tag>
    <letter_id>1</letter_id>
    <name>foo</name>
</letter-tag>
<?xml version="1.0" encoding="UTF-8"?>
<letter-tag>
    <id type="integer">1</id>
    <letter_id type="integer">1</letter_id>
    <name>foo</name>
</letter-tag>

Delete tag

DELETE /api/letter-tags/{id}