POST the attached create-tag.txt to following REST API to create a tag named PII
After tag creation , get the GUID of the entity in Atlas which has to be associated to the tag.
If you want to associate to an hive_table entity by name employee which is in default database , fetch the GUID of the entity using DSL search :
typename = hive_table , query = where qualifiedName="default.employee@cl1" select __guid
Fetch the GUID and post the associate-tag.txt to the following REST API:
In the associate-tag.txt file , in "entityGuids" json array ,replace the existing GUID with the GUID fetched from the DSL search query.
Please refer to http://atlas.apache.org/api/v2/resource_TypesREST.html for more information on creating,updating,deleting tags and http://atlas.apache.org/api/v2/resource_EntityREST.html#resource_EntityREST_addClassification_POST for associating tags to entities.