Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)
Expert Contributor

Atlas Quickstart creates a number of Tags. You may also have created some tags with the REST API. You may want to list the definition of a single Tag or Trait, or you may want a list of all Tags/Traits in Atlas.

The following command will list all TRAITS or Tags

curl -iv -d -H "Content-Type: application/json" -X GET http://sandbox.hortonworks.com:21000/api/atlas/types?type=TRAIT

The following response shows that I have seven Traits/Tags defined:

{"results":["Dimension","ETL","Fact","JdbcAccess","Metric","PII","EXPIRES_ON"],"count":7,"requestId":"qtp1770708318-84 - 6efad306-cb19-4d12-8fd4-31f664e771eb"}

The following command returns the definition of a Tag/Trait named, EXPIRES_ON:

curl -iv -d -H "Content-Type: application/json" -X GET http://sandbox.hortonworks.com:21000/api/atlas/types/EXPIRES_ON

Following is the response:

{"typeName":"EXPIRES_ON","definition":"{\n  \"enumTypes\":[\n    \n  ],\n  \"structTypes\":[\n    \n  ],\n  \"traitTypes\":[\n    {\n      \"superTypes\":[\n        \n      ],\n      \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.TraitType\",\n      \"typeName\":\"EXPIRES_ON\",\n      \"attributeDefinitions\":[\n        {\n          \"name\":\"expiry_date\",\n          \"dataTypeName\":\"string\",\n          \"multiplicity\":\"required\",\n          \"isComposite\":false,\n          \"isUnique\":false,\n          \"isIndexable\":true,\n          \"reverseAttributeName\":null\n        }\n      ]\n    }\n  ],\n  \"classTypes\":[\n    \n  ]\n}","requestId":"qtp1770708318-97 - cffcd8b0-5ebe-4673-87b2-79fac9583557"}

Notice all of the new lines (\n) that are part of the response. This is a known issue, and you can follow the progress in this JIRA:

https://issues.apache.org/jira/browse/ATLAS-208

1,079 Views
0 Kudos
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎06-15-2016 01:22 AM
Updated by:
 
Contributors
Top Kudoed Authors