Tags

Each URL may have tags attached to it. Tags have their own endpoint /tags.

Tag labels are not case-sensitive.

GET /tags - read list of all existing tags

Example response: { "error": { "code": 0, "message": "" }, "tags": [ { "label": "banana" }, { "label": "apple" } ] }


POST /tags - create new tag (if it's not exist).

Input params: { "label": "pear" }

Example response: { "error": { "code": 0, "message": "" }, "tags": [ { "label": "pear" } ] }


PATCH /tags/[label] - edit (rename) existing tag.

Input params: { "label": "new_label" }

Example response: { "error": { "code": 0, "message": "" }, "tags": [ { "label": "new_label" } ] }


DELETE /tags/[label] - delete tag with given label.

For efficiency, many operations with URLs may be performed using tags. In this case, "hashes" query parameter should be omitted. And "tags" query parameter should be used.

Example of reading first 10 URLs tagged with label "fruit":
GET /urls?tags=fruit&limit=10

Tags parameter may be used for reading URLs, patching URLs, deleting URLs and deleting stats.

Tags parameter support complex syntax with logical operators and brackets. More info here.