Created 12-20-2016 11:17 PM
If I have a 'User ID' tag with attribute 'ID Number' and add this to entity A, how can I pull the attribute ID Number VALUE using the REST api?
Farthest I'm able to get is pulling the tags for entity A but not the attribute values:
sandbox:2100/api/atlas/entities/{guid}/traits
Created 12-21-2016 12:59 AM
If you want to get the Tag/Trait info then use:
GET http://<atlas-server-host:port>/api/atlas/types/{trait_name}
If you want to get the Tags/Traits associated with an Entity, with details, use:
GET http://<atlas-server-host:port>/api/atlas/entities/{guid}
Created 12-21-2016 12:59 AM
If you want to get the Tag/Trait info then use:
GET http://<atlas-server-host:port>/api/atlas/types/{trait_name}
If you want to get the Tags/Traits associated with an Entity, with details, use:
GET http://<atlas-server-host:port>/api/atlas/entities/{guid}
Created 12-21-2016 01:33 AM
Thanks for the quick response!
Lets say I added the User ID tag to A and provide the ID number attribute value ID123456.
When I pull using either command provided I still don't see ID123456 anywhere. I have not been able to find any documentation about pulling attribute values, perhaps this has not been implemented yet?
{"typeName":"User ID","definition":{"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":["Business2"],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"User ID","typeDescription":"","attributeDefinitions":[{"name":"ID Number","dataTypeName":"string","multiplicity":"optional","isComposite":false,"isUnique":false,"isIndexable":true,"reverseAttributeName":null}]}]
,"classTypes":[]},"requestId":" - \/api\/atlas\/types\/User%20ID\/ - 7e841c42-ea66-4f05-b7e9-719ef3c1c943"}
Created 12-21-2016 03:46 AM
What you provided above is the response for:
GET http://<atlas-server-host:port>/api/atlas/types/{typeName}
Please post the response for:
GET http://<atlas-server-host:port>/api/atlas/entities/{entity_guid}
It should have the "ID123456" under "values" right after the "typeName":"UserID"
If you don't know the entity_guid, navigate to the entity you want ("A" in this case) in the Atlas UI. The alphanumeric string at the end of the URL is the entity_guid.
(http://<atlas-server-host:port>/index.html#!/detailPage/{entity_guid})
Created 12-21-2016 05:36 AM
Thanks for clarifying, I'm able to see the attribute value now.
Do you know if you're able to search by attribute value, either through the rest api or dsl? And if so can you provide an example.
Created 12-21-2016 05:39 AM
The easiest way would be to do a full text search not DSL. Just search for the attribute value itself. You can do this through the UI or through the API as follows:
GET http://<atlas-server- host:port>/api/atlas/discovery/search/fulltext?query={query_string}