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] Help on a small API script

Jennifer Leigh Vendetti vendetti at stanford.edu
Thu Sep 30 16:26:24 PDT 2021


Hello Zhiliang,

If you want check the version of the latest submission of a particular ontology, you can use the /latest_submission endpoint, e.g., for VT the REST API call would be the following:

http://data.bioontology.org/ontologies/VT/latest_submission

In the JSON results, you can check for the “version” key/value pair:



[cid:3217752D-CBD5-43F8-BA8C-92D82CB0C19B at lan]

You may also be interested in the /submissions endpoint, which would allow you to retrieve all of the submissions for a particular ontology, e.g.:

http://data.bioontology.org/ontologies/VT/submissions

You can iterate over the collection, looking at the “version” key/value pair for each ontology submission object.

We have some example code for interacting with our REST API in GitHub:

https://github.com/ncbo/ncbo_rest_sample_code

Kind regards,
Jennifer



On Sep 30, 2021, at 3:34 PM, Hu, Zhiliang [AN S] <zhu at iastate.edu<mailto:zhu at iastate.edu>> wrote:

Greetings,

I have a routine to watch the latest versions of a few ontologies (VT/LPT/CMO/etc).
I tried the following:

use LWP::Simple;
use JSON qw( decode_json );
my $bioprtAPIky = "720f4412-5a96-48cc-a39f-961570c9a94b";
my $url = "http://data.bioontology.org";
  $url .= "/property_search?";
  $url .= "apikey=$bioprtAPIky";
  $url .= "&ontology=VT";
  $url .= "&q=version";
my $get = get("$url");

and get lost at what to extract for.

I was on your doc http://data.bioontology.org/documentation but didn't get much. Could you help with this script? (to get just the latest version number).

Thanks in advance,

Zhiliang

PS:
I used to "get" "https://bioportal.bioontology.org/ontologies/VT/?p=summary" and apparently the scripting "get" is being blocked on your site lately.


_______________________________________________
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/20210930/73fe7232/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-09-30 at 4.12.46 PM.png
Type: image/png
Size: 165861 bytes
Desc: Screen Shot 2021-09-30 at 4.12.46 PM.png
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20210930/73fe7232/attachment-0001.png>


More information about the bioontology-support mailing list