Tag Label POST Resources
Create tag
POST /tag-labels
Only users with the contentadmin_ role are allowed to create tags.
Parameter | Type | Description |
---|---|---|
tag |
string |
Tag to create. Tag must not exist. Tags are treated case-insensitive. |
excluded_from_suggestions |
boolean |
If true , this tag is explicitly excluded from being returned by the /search/tags/suggestions endpoint. |
Payload
{
"tag": "Sherlock",
"excluded_from_suggestions": true
}
Response
{
"tag": "Sherlock",
"encounter": 0,
"question_count": 0,
"excluded_from_suggestions": true,
"created": "2011-12-12T15:35:25.000Z"
}
Merge tags
POST /tag-labels/:TAGLABEL/merge
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
source_tag_label |
String |
- | ✓ | Label of the source tag to merge. |
Use percent encoding for special characters in the :TAGLABEL
segment of the endpoint URL.
Merge a source-tag into a target-tag. The request is made as POST /tags/label/targetLabel/merge
with the source tag in the payload.
Merging has the following consequences:
- The target label remains unchanged.
- Questions with the source tag are tagged with the target tag after the merge.
- The target inherits subscribers and linked tags of the source.
- The target keeps its
exclude_from_suggestions
property. - After the merge, the source tag is completely removed from the network.
It is not possible to revert a tag merge. However, it is possible to recreate the source tag as completely new tag after the merge.
A common use case for this endpoint is to merge a misspelling (e.g. source tag Stamrind
) into the correct tag (target tag Starmind
).
Payload
{
"source_tag_label": "Stamrind"
}
Response
{
"created": "2011-12-12T14:35:25.000Z",
"encounter": 2273,
"question_count": 1427,
"excluded_from_suggestions": false,
"tag": "Starmind"
}