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 with Batch service

Paolo Ciccarese paolo.ciccarese at gmail.com
Mon Aug 25 09:24:35 PDT 2014


Hi Manuel,
with the authorization in the headers and the  -H "Content-Type:
application/json" both curl and code works.
I do not experience any bug in the handling authorization HTTP headers.

Thank you for your help,
Paolo



On Fri, Aug 22, 2014 at 4:58 PM, Manuel Salvadores Olaizola <
manuelso at stanford.edu> wrote:

> Paolo,
>
> Two things that might fixed this issue ...
>
> 1.- You need to specify content type with:  -H "Content-Type:
> application/json"
> 2.- It seems we have a bug handling authorization HTTP headers. There is a
> work around, you can add the apikey in the json document. My first response
> includes an example of that.
> Manuel
>
> ----- Original Message -----
> From: "Paolo Ciccarese" <paolo.ciccarese at gmail.com>
> To: "Manuel Salvadores Olaizola" <manuelso at stanford.edu>
> Cc: bioontology-support at lists.stanford.edu
> Sent: Friday, August 22, 2014 12:07:09 PM
> Subject: Re: [bioontology-support] Issues with Batch service
>
> Hi Manuel,
> sorry I am not sure how that JSON was missing the class IDs, I believe it
> is the result of the formatter I used for putting together the email.
>
> The following curl contains the class IDs and gives the same result:
> curl -i -X POST http://data.bioontology.org/batch
> -H "Authorization: apikey token=APIKEY"
> -d'{"http://www.w3.org/2002/07/owl#Class":{"collection":[{"class":"
>
> http://ontology.neuinfo.org/NIF/BiomaterialEntities/NIF-Molecule.owl#sao1143333050
> ","ontology":"http://data.bioontology.org/ontologies/NIFSTD"}],"include":
> "prefLabel,synonym,semanticTypes"}}'
>
> Here is the JSON
> {
>     "http://www.w3.org/2002/07/owl#Class": {
>         "collection": [
>             {
>                 "class": "
>
> http://ontology.neuinfo.org/NIF/BiomaterialEntities/NIF-Molecule.owl#sao1143333050
> ",
>                 "ontology": "http://data.bioontology.org/ontologies/NIFSTD
> "
>             }
>         ],
>         "include": "prefLabel,synonym,semanticTypes"
>     }
> }
>
> Is there something I am missing in it?
>
> I've also used your JSON payload and I still get a 422.
>
> Thank you,
> Paolo
>
>
>
> On Fri, Aug 22, 2014 at 2:55 PM, Manuel Salvadores Olaizola <
> manuelso at stanford.edu> wrote:
>
> > Hi Paolo,
> >
> > Your POST request is missing class IDs. Here you can see a working
> example:
> >
> > {
> > "apikey" : "VALID API KEY",
> >  "http://www.w3.org/2002/07/owl#Class": {
> >   "include": "prefLabel",
> >   "collection": [
> >    { "class" : "http://purl.bioontology.org/ontology/ICD10CM/C34.90",
> >      "ontology" : "http://data.bioontology.org/ontologies/ICD10M" },
> >    { "class" : "http://purl.bioontology.org/ontology/SNOMEDCT/254637007
> ",
> >      "ontology" : "http://data.bioontology.org/ontologies/SNOMEDCT" },
> >     { "class" : "http://purl.bioontology.org/ontology/SNOMEDCT/444604002
> ",
> >       "ontology" : "http://data.bioontology.org/ontologies/SNOMEDCT" },
> >    { "class" : "
> http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C12913
> > ",
> >       "ontology" : "http://data.bioontology.org/ontologies/NCIT" }
> >   ]
> >  }
> > }
> >
> > As you can see you need to provide pairs of (ontology,class) IDs.
> >
> > I hope this helps.
> >
> > Manuel
> >
> > ----- Original Message -----
> > From: "Paolo Ciccarese" <paolo.ciccarese at gmail.com>
> > To: bioontology-support at lists.stanford.edu
> > Sent: Friday, August 22, 2014 11:43:28 AM
> > Subject: [bioontology-support] Issues with Batch service
> >
> > Hi,
> > is there any reason why the following curl (with a proper apikey) would
> > not work?
> > The payload is exactly the same that is displayed in the example in the
> > documentation
> > http://data.bioontology.org/documentation#nav_batch
> >
> > curl -i -X POST http://data.bioontology.org/batch \
> > -H "Authorization: apikey token=blah" \
> > -d '{" http://www.w3.org/2002/07/owl#Class
> ":{"collection":[{"ontology":"
> > http://data.bioontology.org/ontologies/BRO "},{"ontology":"
> > http://data.bioontology.org/ontologies/BRO "},{"ontology":"
> > http://data.bioontology.org/ontologies/BRO
> > "}],"include":"prefLabel,synonym,semanticTypes"}}'
> >
> > It is returning a 422
> > {"errors":["Batch endpoint only support calls to owl:Class
> > resources"],"status":422}
> >
> > I have also groovy code doing the same and getting back the same message.
> >
> > Best,
> > Paolo
> >
> >
> > --
> > Dr. Paolo Ciccarese
> >
> > _______________________________________________
> > bioontology-support mailing list
> > bioontology-support at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/bioontology-support
> >
> >
>
>


-- 
Dr. Paolo Ciccarese
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140825/0ced8646/attachment-0001.html>


More information about the bioontology-support mailing list