How to create a Tag via API

Business Case:

KPI to be measured

Bookmark this resource Follow

Ask a question

Was this article helpful? 0 out of 0 found this helpful

 

This article describes the procedure to be used for the creation of a tag.

 

Requirements

In order to create a new Tag within a specific classification, the following conditions must be complied:

  • The action must be performed by a business user with the appropriate permissions to manage Classes and Tags (permissions can be configured in THRON DAM PLATFORM > THRON Passport);
  • You need to use a THRON application to create metadata, but only through SU web service, which allows it to impersonate a business user (with the appropriate permission to manage class and tags);
  • You must know the classificationId of the class for which you want to create the new Tag. This information can be retrieved using the list web service which can be found in the classification package of xintelligence.

 

Creating a new tag within a specific class

In order to create a new Tag within a specific class, you need to use the insert web service, which is included in the itagdefinition package of xintelligence. Mandatory parameters to be included in the body of the request are:

  • lang: the language for the new tag;
  • label: the name of the new tag;
  • categorized: true or false; it defines whether the tag is approved and ordered in the Tag Center or whether it needs to be moderated.

Along with this information, you will also be able to set some constraints according to the specific Tag you want to create:

  • parentId: used to add new tag inside a tree structure. This should be the parent tag ID;
  • pos: desired tag position among elements of a specific tree level;
  • prettyId: used to easily identify the tag;
  • description: used to describe the tag.

 

POST: https://<clientId>-view.thron.com/api/xintelligence/resources/itagdefinition/insert/<clientId>/<classificationId>


{ 
  "value": { 
    "parentId": "Fill with Parent tag ID", 
    "names": [ 
      { 
        "description": "Material", 
        "label": "Wood", 
        "lang": "EN" 
      } 
    ], 
    "pos": 12, 
    "prettyId": "material-wood", 
    "categorized": true 
  } 
} 

 

Visit our Developer Center, in the section dedicated to this web service, for more details.

If, once you have created a new Tag, you need to associate metadata to it, you can follow the instructions in the article HOW TO ADD A NEW METADATA WITHIN A SPECIFIC TAG

Was this article helpful?
0 out of 0 found this helpful

Have any question?

Open a ticket
Comments