Tags
note
This guide assumes familiarity with the Spring Framework.
If you are new to Spring, we recommend starting with their official guides to get up to speed.
Tags allow users to categorize content in a quick and easy way.
Each content object contains the tag property with a list of tag keys
that the object is categorized by.
A Tag is uniquely identified by a key.
You can save a name and a description in multiple translations to the database.
Managing Tags
Creating Tags
New tags can be created through the endpoint:
- Endpoint:
POST /api/content/tags - Requirements: Only members of the
CONTRIBUTORcan create tags.
On Startup
It is possible to create tags during the application startup.
You can use your application.yaml to specify tags with descriptions.
singularity:
content:
tags:
- key: music # The unique key
translations:
en: # The language tag
name: Music
description: Content related to music.
de:
name: Musik
description: Inhalte kategorisiert in Musik.
- key: arts
translations:
en:
name: Arts
description: Content related to arts.
de:
name: Kunst
description: Inhalte kategorisiert in Kunst.
Finding Tags
- A tag with given
keycan be requested through the endpointGET /api/content/tags/{key}. - Tags can be queried through the endpoint
GET /api/content/tags.
Updating Tags
A tag with given key can be updated through the endpoint:
- Endpoint:
PATCH /api/content/tags/{key} - Requirements: Only members of the
CONTRIBUTORcan update tags.
Deleting Tags
A tag with given key can be deleted through the endpoint:
- Endpoint:
DELETE /api/content/tags/{key} - Requirements: Only members of the
CONTRIBUTORcan update tags.