ckanaction

tag_create

POST
tag_create

Create a new vocabulary tag.

You must be a sysadmin to create vocabulary tags.

You can only use this function to create tags that belong to a vocabulary, not to create free tags. (To create a new free tag simply add the tag to a package, e.g. using the package_update() function.)

Authorization

apiTokenHeader
headerAuthorization<token>

CKAN API token

Request Body

application/json
  1. body
name?string

the name for the new tag, a string between 2 and 100 characters long containing only alphanumeric characters, spaces and the characters -, _, and ., e.g. 'Fruits'

vocabulary_id?string

the id of the vocabulary that the new tag should be added to, e.g. the id of vocabulary 'Genre'

Example Request
curl -X POST 'http://localhost:5000/api/3/action/tag_create' \  -H 'Content-Type: application/json' \  -d '{}'