Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] issues retrieving class labels with REST API

Jennifer Leigh Vendetti vendetti at stanford.edu
Mon Mar 7 17:52:42 PST 2016


Hi M,

Great!  Glad it’s working for you now!

Best,
Jennifer


On Mar 7, 2016, at 5:33 PM, Maxwell Neal <maxneal at gmail.com<mailto:maxneal at gmail.com>> wrote:

Hi Jennifer,

When I went back and tried to execute the Java sample code, it worked. And it turns out I wasn't using the correct, Bioportal-specific namespaces in my application. So after fixing that, things are working. Looks like it was an issue on my end. Sorry for the inconvenience!

Thanks,

M

On Fri, Mar 4, 2016 at 6:27 PM, Jennifer Leigh Vendetti <vendetti at stanford.edu<mailto:vendetti at stanford.edu>> wrote:
Hi M,

I tried out your API key.  It works for me in all scenarios - Java sample code, web browser, and curl.  How are you executing the Java program?  Have you made any other edits to the Java file besides assigning a value to the API_KEY variable?

Jennifer


On Mar 4, 2016, at 12:11 PM, Maxwell Neal <maxneal at gmail.com<mailto:maxneal at gmail.com>> wrote:

Hi Jennifer,

Many thanks for the reply. That curl command does actually work for me.  Here's the command I used:

curl -X GET 'http://data.bioontology.org/ontologies/BRO?apikey=c4192e4b-88a8-4002-ad08-b4636c88df1a'

But I still get the 401 error when I try the GetLabels example. Does the example succeed if you use my API key on your end?

M

On Fri, Mar 4, 2016 at 2:13 PM, Jennifer Leigh Vendetti <vendetti at stanford.edu<mailto:vendetti at stanford.edu>> wrote:
Hi M,

I was able to execute the sample code to retrieve labels with my API key successfully.  HTTP 401 errors indicate unauthorized access, so I’m wondering if the API key you put in GetLabels.java is correct.  Are you able to issue a simple curl command at the command line to retrieve ontology data, e.g.:

curl -X GET 'http://data.bioontology.org/ontologies/BRO?apikey=your_api_key_here'

Does this succeed for you?

Jennifer



On Mar 3, 2016, at 10:10 AM, Maxwell Neal <maxneal at gmail.com<mailto:maxneal at gmail.com>> wrote:

Hi,

When I attempt to retrieve class labels programmatically using the "GetLabels" example<https://github.com/ncbo/ncbo_rest_sample_code/blob/master/java/src/GetLabels.java> on the BioPortal API GitHub site, I get an HTTP 401 error and the labels aren't retrieved.

I've edited the example code so it uses my own application apikey, and I get the 401 error whether I run the original or edited code.

Any help is appreciated. Thanks!

M

_______________________________________________
bioontology-support mailing list
bioontology-support at lists.stanford.edu<mailto:bioontology-support at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/bioontology-support





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20160308/bcca4ef6/attachment.html>


More information about the bioontology-support mailing list