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
Fri Aug 22 12:07:09 PDT 2014


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140822/3d251d69/attachment.html>


More information about the bioontology-support mailing list