Thank you.

Yes, I can create the terms individually and anchor them appropriately to a 
glossary via the Glossary term API described below, just not via the entity 
bulk API.

Regards,
Doug


On Oct 19, 2018 8:19 PM, Madhan Neethiraj <mad...@apache.org> wrote:
Doug �C documentation for a number of REST APIs don’t show the payload details 
�C including the glossary APIs. For some APIs, like 
addClassifications<https://atlas.apache.org/api/v2/resource_EntityREST.html#resource_EntityREST_addClassificationsByUniqueAttribute_POST>
 the documentation shows the payload details. @Apoorv 
Naik<mailto:apoorvn...@apache.org> �C can you please take a look?

On your question on anchoring terms to a glossary, did you try specifying 
Glossary’s guid in ‘anchor’ attribute �C as shown in below (from @Keval 
Bhatt<mailto:kevalbhat...@gmail.com>’s response to another thread on this):

    From: Keval Bhatt <kbh...@apache.org<mailto:kbh...@apache.org>>
    Sent: Monday, October 1, 2018 2:08 AM
    To: user@atlas.apache.org<mailto:user@atlas.apache.org>
    Subject: Re: Glossary APIs - Looking for how to properly create terms using 
API

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"}}


> Specifically I’m looking for the json template to submit multiple terms using 
> the v2/glossary/terms POST API.
Until the document is updated, one option is refer relevant Java sources for 
details of REST API payload and return details.
Entity APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
Glossary APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/GlossaryREST.java
Lineage APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/LineageREST.java
Relationship APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/RelationshipREST.java
Search APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
Types APIs: 
https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java

> I really feel like this is tool and project with enormous merit. Hopefully at 
> some point I will know enough about it to contribute.
Thanks! Apache Atlas team appreciates your note. Looking forward to your 
continued engagement with the community and contributions.

Hope this helps.

Madhan

From: Doug Fisher <doug.fis...@softchoice.com>
Reply-To: "user@atlas.apache.org" <user@atlas.apache.org>
Date: Friday, October 19, 2018 at 3:13 PM
To: "user@atlas.apache.org" <user@atlas.apache.org>
Subject: Working with Atlas REST APIs - where can I find request body 
specifications

Hi,

I’ve been working to create and manage glossaries along with categories, 
classifications, and related entities. Additionally I’ve been adding processes 
and linking inputs & outputs to generate lineage via the APIs.

Even though I can find the REST API documentation at 
https://atlas.apache.org/api/v2 I can’t find the json schema for the request 
payloads.

Where can I find the json schemas for the POST request payloads?

As an aside, I have found that I can create an AtlasGlossaryTerm via the bulk 
entity API but it doesn’t hook up the anchor or create the other metadata 
required to show it in the UI and I think I end up with orphan terms. Maybe 
this is expected based on what I’m submitting?

Specifically I’m looking for the json template to submit multiple terms using 
the v2/glossary/terms POST API.

I really feel like this is tool and project with enormous merit. Hopefully at 
some point I will know enough about it to contribute.

Thanks,

Doug


Manage Subscription<https://www.softchoice.com/subscribe> �C 
Unsubscribe<https://www.softchoice.com/subscribe> �C 
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> �C 
Unsubscribe<https://www.softchoice.com/subscribe> �C 
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