<?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: Atlas REST API? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160931#M33253</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Assuming you are on Sandbox 2.5 accessing Atlas 0.7, you will need to use the -u with the credentials for Atlas. On versions earlier that 0.7, you do not need to provide credentials.&lt;/P&gt;&lt;P&gt;1. To get all entities of a particular type:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas should return all of the types&lt;/P&gt;&lt;PRE&gt;{"results":["Asset","Process","hive_column","storm_node","storm_bolt","falcon_process","hive_serde","falcon_feed_replication","hbase_table","kafka_topic","hive_table","hive_storagedesc","sqoop_dbdatastore","fs_permissions","hive_principal_type","jms_topic","hive_process","falcon_cluster","storm_spout","Referenceable","falcon_feed_creation","falcon_feed","hdfs_path","sqoop_process","Infrastructure","storm_topology","hive_order","DataSet","Taxonomy","fs_path","hive_db","file_action"],"count":32,"requestId":"qtp86996017-77 - d3edd2c6-229c-4344-8745-1a4337856a1f"}&lt;/PRE&gt;&lt;P&gt;Now, request all entities of hive_table type&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities?type=hive_table" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities?type=hive_table&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with an array of GUIDs of entities that are typed as hive_table&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp86996017-144 - 8974d5b6-18fe-41c4-bb86-54f07861560f","typeName":"hive_table","results":["63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2","563e7954-7d4c-45a6-9237-3e94e4d23f68","7751030c-d902-41fd-992d-f209a8e5278e","a9d45d64-0aea-4d18-abcd-919f6a3ae1e7","405079e5-dd29-41dc-98e8-49dc6f70f36d"],"count":5}&lt;/PRE&gt;&lt;P&gt;To view the entire instance of any of the above entities&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with the entire entity definition. You can apply the previous steps to find and view any entity type and instance.&lt;/P&gt;&lt;P&gt;2. Issue the following request once you have identified the entity from which you want to determine applied tags&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2/traits" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2/traits&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp86996017-76 - 6a8faae6-627f-4f77-a6b2-21d74f1cacca","results":[],"count":0}&lt;/PRE&gt;&lt;P&gt;If the count is greater than 0 and the results field has a reference to a tag (trait) instance, then the entity has been tagged.&lt;/P&gt;&lt;P&gt;3. To get all defined tags (traits), make the following request:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types?type=TRAIT" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types?type=TRAIT&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"results":["publish"],"count":1,"requestId":"qtp86996017-248 - 16e3295b-9ed3-4c3f-9910-826218e93d89"}&lt;/PRE&gt;&lt;P&gt;The payload should contain the names of each tag that has been created. In this example, you can view the details of the publish tag (trait) as follows:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types/publish" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types/publish&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"typeName":"publish","definition":{"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"publish","typeDescription":"","attributeDefinitions":[]}],"classTypes":[]},"requestId":"qtp86996017-11 - 68f0d5af-05da-4254-b299-06e3d1dfa881"}&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 Jul 2016 10:41:51 GMT</pubDate>
    <dc:creator>vvaks</dc:creator>
    <dc:date>2016-07-04T10:41:51Z</dc:date>
    <item>
      <title>Atlas REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160929#M33251</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;Programming Step:&lt;/P&gt;&lt;P&gt;1) I want to automate tagging mechanism of Apache  Atlas by using java code.Right now I am fetching &lt;STRONG&gt;GUIDS for only hive_table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;2) Once I get the GUID then I will check whether this tag is already tagged or not?&lt;/P&gt;&lt;P&gt;3)  if not then,then tag it  with currently/newly created Trait/tag (Automatically).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) How to get  GUID'S  of all entities(includes hive tables,columns etc) in atlas(Using REST API)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) How to identify whether entity has been already tagged with some traits/tag or not?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3) How to get details/list of all tag/traits which are currently present in apache atlas(Using REST API)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I hope above written information is complete.&lt;/P&gt;&lt;P&gt;Please help me.I have attached my java code.&lt;/P&gt;&lt;P&gt;Till now in java code I am just getting all GUID for hive table only.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/5289-table.txt"&gt;table.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 21:12:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160929#M33251</guid>
      <dc:creator>Manus</dc:creator>
      <dc:date>2016-06-28T21:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160930#M33252</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt; Have you review Atlas Api &lt;A href="http://atlas.incubator.apache.org/0.6.0-incubating/api/rest.html"&gt;here&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 08:52:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160930#M33252</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-07-03T08:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160931#M33253</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Assuming you are on Sandbox 2.5 accessing Atlas 0.7, you will need to use the -u with the credentials for Atlas. On versions earlier that 0.7, you do not need to provide credentials.&lt;/P&gt;&lt;P&gt;1. To get all entities of a particular type:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas should return all of the types&lt;/P&gt;&lt;PRE&gt;{"results":["Asset","Process","hive_column","storm_node","storm_bolt","falcon_process","hive_serde","falcon_feed_replication","hbase_table","kafka_topic","hive_table","hive_storagedesc","sqoop_dbdatastore","fs_permissions","hive_principal_type","jms_topic","hive_process","falcon_cluster","storm_spout","Referenceable","falcon_feed_creation","falcon_feed","hdfs_path","sqoop_process","Infrastructure","storm_topology","hive_order","DataSet","Taxonomy","fs_path","hive_db","file_action"],"count":32,"requestId":"qtp86996017-77 - d3edd2c6-229c-4344-8745-1a4337856a1f"}&lt;/PRE&gt;&lt;P&gt;Now, request all entities of hive_table type&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities?type=hive_table" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities?type=hive_table&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with an array of GUIDs of entities that are typed as hive_table&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp86996017-144 - 8974d5b6-18fe-41c4-bb86-54f07861560f","typeName":"hive_table","results":["63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2","563e7954-7d4c-45a6-9237-3e94e4d23f68","7751030c-d902-41fd-992d-f209a8e5278e","a9d45d64-0aea-4d18-abcd-919f6a3ae1e7","405079e5-dd29-41dc-98e8-49dc6f70f36d"],"count":5}&lt;/PRE&gt;&lt;P&gt;To view the entire instance of any of the above entities&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with the entire entity definition. You can apply the previous steps to find and view any entity type and instance.&lt;/P&gt;&lt;P&gt;2. Issue the following request once you have identified the entity from which you want to determine applied tags&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2/traits" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/entities/63683ca8-e5a9-4c4c-b02e-3fe01bfda2a2/traits&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp86996017-76 - 6a8faae6-627f-4f77-a6b2-21d74f1cacca","results":[],"count":0}&lt;/PRE&gt;&lt;P&gt;If the count is greater than 0 and the results field has a reference to a tag (trait) instance, then the entity has been tagged.&lt;/P&gt;&lt;P&gt;3. To get all defined tags (traits), make the following request:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types?type=TRAIT" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types?type=TRAIT&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"results":["publish"],"count":1,"requestId":"qtp86996017-248 - 16e3295b-9ed3-4c3f-9910-826218e93d89"}&lt;/PRE&gt;&lt;P&gt;The payload should contain the names of each tag that has been created. In this example, you can view the details of the publish tag (trait) as follows:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:21000/api/atlas/types/publish" target="_blank"&gt;http://sandbox.hortonworks.com:21000/api/atlas/types/publish&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Atlas will respond with:&lt;/P&gt;&lt;PRE&gt;{"typeName":"publish","definition":{"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"publish","typeDescription":"","attributeDefinitions":[]}],"classTypes":[]},"requestId":"qtp86996017-11 - 68f0d5af-05da-4254-b299-06e3d1dfa881"}&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jul 2016 10:41:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160931#M33253</guid>
      <dc:creator>vvaks</dc:creator>
      <dc:date>2016-07-04T10:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160932#M33254</link>
      <description>&lt;P&gt;Thank you Vadim,&lt;/P&gt;&lt;P&gt;Do you know how to delete tag which are present on Atlas UI using REST API.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 19:38:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-REST-API/m-p/160932#M33254</guid>
      <dc:creator>Manus</dc:creator>
      <dc:date>2016-07-21T19:38:12Z</dc:date>
    </item>
  </channel>
</rss>

