<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Add tag in Atlas on Sandbox HDP 2.5 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141711#M104304</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/12913/alarsen.html" nodeid="12913"&gt;@Anders Boje&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below are some additional examples:&lt;/P&gt;&lt;P&gt;Let's suppose we want to annotate a table (GUID f4019a65-8948-
46f1-afcf-545baa2df99f) with the Trait PublicData to indicate it is a data asset that is
created by crawling public sites. Also, suppose that we want to set a "Retainable" trait
on the column family contents (GUID 9e6308c6-1006-48f8-95a8-a605968e64d2) with a
retention period of 100 days.&lt;/P&gt;&lt;P&gt;The following are the requests to send:
&lt;/P&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/f4019a65-8948-46f1-afcf-" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/f4019a65-8948-46f1-afcf-&lt;/A&gt; 545baa2df99f/traits

BODY
{ "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
	"typeName":"PublicData", 
	"values":{}
} &lt;/PRE&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/9e6308c6-1006-48f8-95a8-" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/9e6308c6-1006-48f8-95a8-&lt;/A&gt; a605968e64d2/traits

BODY
{ "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", 			"typeName":"Retainable",
	"values":{"retentionPeriod":"100" }
} 
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14999/sthammeken.html" nodeid="14999"&gt;@Stig Hammeken&lt;/A&gt;&lt;P&gt;To associate a Term/Taxonomy to an entity use the below&lt;/P&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/{entity_guid}/tags/{fully_qualified_name_of_term}" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/{entity_guid}/tags/{fully_qualified_name_of_term}&lt;/A&gt; 	
&lt;/PRE&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;PRE&gt;POST &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/f4019a65-8948-46f1-afcf-545baa2df99f/tags/d.term1.term12" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/f4019a65-8948-46f1-afcf-545baa2df99f/tags/d.term1.term12&lt;/A&gt; 
&lt;/PRE&gt;&lt;P&gt;You can get the "fully_qualified_name_of_term" using:&lt;/P&gt;&lt;PRE&gt;#Listing all terms under the Catalog Taxonomy
GET &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms&lt;/A&gt;

#Listing all terms under a given Term
GET &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms/term_name/terms/.../terms/term_name/terms" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms/term_name/terms/.../terms/term_name/terms&lt;/A&gt; 

&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Dec 2016 08:50:04 GMT</pubDate>
    <dc:creator>egarelnabi</dc:creator>
    <dc:date>2016-12-21T08:50:04Z</dc:date>
    <item>
      <title>Add tag in Atlas on Sandbox HDP 2.5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141709#M104302</link>
      <description>&lt;P&gt;
	I had a hard time finding a way to add a tag/traits in Atlas by using the REST API. &lt;/P&gt;&lt;P&gt;
	Here is a solution:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt; &lt;A href="http://{YOUR" target="_blank"&gt;http://{YOUR&lt;/A&gt; IP ADRESS}:21000/api/atlas/entities/{GUID FOR ENTITY}/traits/&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BODY &lt;/STRONG&gt;{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct","typeName":"PII","values":{}}&lt;/P&gt;&lt;PRE&gt;curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" -d '{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct","typeName":"PII","values":{}}' "http://192.168.255.128:21000/api/atlas/entities/d5dcb483-d2fc-4544-8368-6ef56321efdb/traits/"&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 22:30:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141709#M104302</guid>
      <dc:creator>alarsen</dc:creator>
      <dc:date>2016-10-20T22:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add tag in Atlas on Sandbox HDP 2.5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141710#M104303</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Anders. 
It works fine, but not if the tag i a business term (tag) a trait type (super typer) "TaxonomyTerm". 
The REST interface respond with a "Error deserializing trait instance". 
Any idea how I add a Business Term to an Entity?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 20:27:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141710#M104303</guid>
      <dc:creator>sthammeken</dc:creator>
      <dc:date>2016-12-20T20:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add tag in Atlas on Sandbox HDP 2.5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141711#M104304</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/12913/alarsen.html" nodeid="12913"&gt;@Anders Boje&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below are some additional examples:&lt;/P&gt;&lt;P&gt;Let's suppose we want to annotate a table (GUID f4019a65-8948-
46f1-afcf-545baa2df99f) with the Trait PublicData to indicate it is a data asset that is
created by crawling public sites. Also, suppose that we want to set a "Retainable" trait
on the column family contents (GUID 9e6308c6-1006-48f8-95a8-a605968e64d2) with a
retention period of 100 days.&lt;/P&gt;&lt;P&gt;The following are the requests to send:
&lt;/P&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/f4019a65-8948-46f1-afcf-" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/f4019a65-8948-46f1-afcf-&lt;/A&gt; 545baa2df99f/traits

BODY
{ "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
	"typeName":"PublicData", 
	"values":{}
} &lt;/PRE&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/9e6308c6-1006-48f8-95a8-" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/entities/9e6308c6-1006-48f8-95a8-&lt;/A&gt; a605968e64d2/traits

BODY
{ "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", 			"typeName":"Retainable",
	"values":{"retentionPeriod":"100" }
} 
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14999/sthammeken.html" nodeid="14999"&gt;@Stig Hammeken&lt;/A&gt;&lt;P&gt;To associate a Term/Taxonomy to an entity use the below&lt;/P&gt;&lt;PRE&gt;POST 
&lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/{entity_guid}/tags/{fully_qualified_name_of_term}" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/{entity_guid}/tags/{fully_qualified_name_of_term}&lt;/A&gt; 	
&lt;/PRE&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;PRE&gt;POST &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/f4019a65-8948-46f1-afcf-545baa2df99f/tags/d.term1.term12" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/entities/f4019a65-8948-46f1-afcf-545baa2df99f/tags/d.term1.term12&lt;/A&gt; 
&lt;/PRE&gt;&lt;P&gt;You can get the "fully_qualified_name_of_term" using:&lt;/P&gt;&lt;PRE&gt;#Listing all terms under the Catalog Taxonomy
GET &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms&lt;/A&gt;

#Listing all terms under a given Term
GET &lt;A href="http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms/term_name/terms/.../terms/term_name/terms" target="_blank"&gt;http://&amp;lt;atlas-server-host:port&amp;gt;/api/atlas/v1/taxonomies/Catalog/terms/term_name/terms/.../terms/term_name/terms&lt;/A&gt; 

&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Dec 2016 08:50:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141711#M104304</guid>
      <dc:creator>egarelnabi</dc:creator>
      <dc:date>2016-12-21T08:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add tag in Atlas on Sandbox HDP 2.5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141712#M104305</link>
      <description>&lt;P&gt;Thank you Eyad you nailed it for me:-)&lt;/P&gt;&lt;P&gt;API "Tags" = Business Term&lt;/P&gt;&lt;P&gt;API "Traits" = Tag&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 22:24:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141712#M104305</guid>
      <dc:creator>sthammeken</dc:creator>
      <dc:date>2016-12-22T22:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add tag in Atlas on Sandbox HDP 2.5</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141713#M104306</link>
      <description>&lt;P&gt;Actually you mean:&lt;/P&gt;&lt;P&gt;API "Terms" = Business Term&lt;/P&gt;&lt;P&gt;API "Traits" = Tag&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 22:27:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Add-tag-in-Atlas-on-Sandbox-HDP-2-5/m-p/141713#M104306</guid>
      <dc:creator>egarelnabi</dc:creator>
      <dc:date>2016-12-22T22:27:15Z</dc:date>
    </item>
  </channel>
</rss>

