Thanks Keval.

Using your example, I was able to do what I need to do.

I had been trying to use the /v2/entities/bulk API, which allowed me to create 
Glossaries and Terms, but I couldn’t figure out how to relate them properly 
using the “entities” json.

Much appreciated!

Doug

From: Keval Bhatt <[email protected]>
Sent: Monday, October 1, 2018 2:08 AM
To: [email protected]
Subject: Re: Glossary APIs - Looking for how to properly create terms using API


Doug,

In order to create a term inside the glossary, you should pass the glossaryGuid 
inside the anchor property.
Example:  
"anchor":{"glossaryGuid":"f8d2dd9a-aa79-4473-a064-1617cf9da802","displayText":"Test"}}.

Create Glossary:

Request URL: 
http://<your_IP>:21000/api/atlas/v2/glossary<http://%3cyour_IP%3e:21000/api/atlas/v2/glossary>
Request Method: POST
Request Payload: {"name":"Test","shortDescription":"","longDescription":""}
Response: 
{"guid":"f8d2dd9a-aa79-4473-a064-1617cf9da802","qualifiedName":"Test","name":"Test"}


Create Term:

Request URL: 
http://<your_IP>:21000/api/atlas/v2/glossary/term<http://%3cyour_IP%3e:21000/api/atlas/v2/glossary/term>
Request Method:  POST
Request Payload: 
{"name":"test_term","shortDescription":"","longDescription":"","anchor":{"glossaryGuid":"f8d2dd9a-aa79-4473-a064-1617cf9da802","displayText":"Test"}}
Response: 
{"guid":"ca65ae8b-1b04-494c-838b-51739d8634c6","qualifiedName":"test_term@Test","name":"test_term","anchor":{"glossaryGuid":"f8d2dd9a-aa79-4473-a064-1617cf9da802","relationGuid":"1ec3f068-b868-4d3e-88eb-957eb2df7fa0"}}


Now go to the UI. you can see the glossary Test and test_term inside it.


For more details please check this API documentation: 
https://atlas.apache.org/api/v2/resource_GlossaryREST.html




On Sun, Sep 30, 2018 at 6:35 PM Doug Fisher 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

I’m getting stuck trying to work with the Glossary and I’d like to understand 
whether I’m doing something wrong, or if the features just aren’t ready yet.

I can create entities via the APIs – this works great.
I can create AtlasGlossary entities via the API, too.
What I can’t seem to do is create an AtlasGlossaryTerm that is related to an 
AtlasGlossary using the API in a way that will show up in the UI.
The terms get created, but they don’t get related to a Glossary. I can query 
them via the API, but they won’t show up in the UI.

In the UI, I can create a term under a glossary, but when I query it via the 
API, there don’t seem to be any properties that I can see that relate it to its 
parent or anchor glossary.

Can all of this be done in version 1.1.0 and I’m likely doing something wrong, 
or are some of these features still under development?

Thanks,

Doug

Manage Subscription<https://www.softchoice.com/subscribe> – 
Unsubscribe<https://www.softchoice.com/subscribe> – 
Privacy<https://www.softchoice.com/help/privacy>   ●    Vos 
abonnements<https://www.softchoice.com/subscribe?store=fr-CA> - Se 
désabonner<https://www.softchoice.com/subscribe?store=fr-CA> - Protection de la 
vie privée<https://www.softchoice.com/help/privacy>
Manage Subscription<https://www.softchoice.com/subscribe> – 
Unsubscribe<https://www.softchoice.com/subscribe> – 
Privacy<https://www.softchoice.com/help/privacy>   ●    Vos 
abonnements<https://www.softchoice.com/subscribe?store=fr-CA> - Se 
désabonner<https://www.softchoice.com/subscribe?store=fr-CA> - Protection de la 
vie privée<https://www.softchoice.com/help/privacy>

Reply via email to