<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello Ben,
<div class=""><br class="">
</div>
<div class="">The curl application sends POST requests with a default content type of 'application/x-www-form-urlencoded'.  If you want to send a JSON request, the content type needs to be specified in the curl call.  In order to execute the example from our
 documentation, you could use something like this:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">➜  ~ curl -vX POST <a href="http://data.bioontology.org/batch" class="">
http://data.bioontology.org/batch</a> -d @batch.json --header 'Content-Type: application/json' --header 'Authorization: apikey token=<your api key here>’</div>
<div class=""><br class="">
</div>
<div class="">… which yields a successful result:</div>
<div class=""><br class="">
</div>
<div class="">*   Trying 171.64.13.9...</div>
<div class="">* Connected to <a href="http://data.bioontology.org" class="">data.bioontology.org</a> (171.64.13.9) port 80 (#0)</div>
<div class="">> POST /batch HTTP/1.1</div>
<div class="">> Host: <a href="http://data.bioontology.org" class="">data.bioontology.org</a></div>
<div class="">> User-Agent: curl/7.43.0</div>
<div class="">> Accept: */*</div>
<div class="">> Content-Type: application/json</div>
<div class="">> Authorization: apikey token=</div>
<div class="">> Content-Length: 769</div>
<div class="">></div>
<div class="">* upload completely sent off: 769 out of 769 bytes</div>
<div class="">< HTTP/1.1 200 OK</div>
<div class="">< Server: nginx/1.10.1</div>
<div class="">< Date: Tue, 04 Oct 2016 18:56:24 GMT</div>
<div class="">< Content-Type: application/json;charset=utf-8</div>
<div class="">< Content-Length: 8198</div>
<div class="">< Connection: keep-alive</div>
<div class="">< X-Rack-Cache: invalidate, pass</div>
<div class="">< Vary: Origin</div>
<div class="">< X-Content-Type-Options: nosniff</div>
<div class=""><</div>
<div class="">{"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>":[{"prefLabel":"Ontology Development and Management","synonym":[],"@id":"<a href="http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Ontology_Development_and_Management" class="">http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Ontology_Development_and_Management</a>","@type":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","links":{"self":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management</a>","ontology":"<a href="http://data.bioontology.org/ontologies/BRO" class="">http://data.bioontology.org/ontologies/BRO</a>","children":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/children" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/children</a>","parents":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/parents" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/parents</a>","descendants":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/descendants" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/descendants</a>","ancestors":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/ancestors" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/ancestors</a>","instances":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/instances" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/instances</a>","tree":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/tree" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/tree</a>","notes":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/notes" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/notes</a>","mappings":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/mappings" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management/mappings</a>","ui":"<a href="http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management" class="">http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Ontology_Development_and_Management</a>","@context":{"self":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ontology":"<a href="http://data.bioontology.org/metadata/Ontology" class="">http://data.bioontology.org/metadata/Ontology</a>","children":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","parents":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","descendants":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ancestors":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","instances":"<a href="http://data.bioontology.org/metadata/Instance" class="">http://data.bioontology.org/metadata/Instance</a>","tree":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","notes":"<a href="http://data.bioontology.org/metadata/Note" class="">http://data.bioontology.org/metadata/Note</a>","mappings":"<a href="http://data.bioontology.org/metadata/Mapping" class="">http://data.bioontology.org/metadata/Mapping</a>","ui":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>"}},"@context":{"@vocab":"<a href="http://data.bioontology.org/metadata/" class="">http://data.bioontology.org/metadata/</a>","prefLabel":"<a href="http://data.bioontology.org/metadata/skosprefLabel" class="">http://data.bioontology.org/metadata/skosprefLabel</a>","synonym":"<a href="http://data.bioontology.org/metadata/skossynonym" class="">http://data.bioontology.org/metadata/skossynonym</a>"}},{"prefLabel":"Modular
 Component","synonym":[],"@id":"<a href="http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Modular_Component" class="">http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Modular_Component</a>","@type":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","links":{"self":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component</a>","ontology":"<a href="http://data.bioontology.org/ontologies/BRO" class="">http://data.bioontology.org/ontologies/BRO</a>","children":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/children" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/children</a>","parents":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/parents" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/parents</a>","descendants":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/descendants" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/descendants</a>","ancestors":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/ancestors" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/ancestors</a>","instances":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/instances" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/instances</a>","tree":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/tree" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/tree</a>","notes":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/notes" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/notes</a>","mappings":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/mappings" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component/mappings</a>","ui":"<a href="http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component" class="">http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Modular_Component</a>","@context":{"self":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ontology":"<a href="http://data.bioontology.org/metadata/Ontology" class="">http://data.bioontology.org/metadata/Ontology</a>","children":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","parents":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","descendants":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ancestors":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","instances":"<a href="http://data.bioontology.org/metadata/Instance" class="">http://data.bioontology.org/metadata/Instance</a>","tree":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","notes":"<a href="http://data.bioontology.org/metadata/Note" class="">http://data.bioontology.org/metadata/Note</a>","mappings":"<a href="http://data.bioontology.org/metadata/Mapping" class="">http://data.bioontology.org/metadata/Mapping</a>","ui":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>"}},"@context":{"@vocab":"<a href="http://data.bioontology.org/metadata/" class="">http://data.bioontology.org/metadata/</a>","prefLabel":"<a href="http://data.bioontology.org/metadata/skosprefLabel" class="">http://data.bioontology.org/metadata/skosprefLabel</a>","synonym":"<a href="http://data.bioontology.org/metadata/skossynonym" class="">http://data.bioontology.org/metadata/skossynonym</a>"}},{"prefLabel":"Stimulator","synonym":[],"@id":"<a href="http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Stimulator" class="">http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Stimulator</a>","@type":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","links":{"self":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator</a>","ontology":"<a href="http://data.bioontology.org/ontologies/BRO" class="">http://data.bioontology.org/ontologies/BRO</a>","children":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/children" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/children</a>","parents":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/parents" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/parents</a>","descendants":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/descendants" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/descendants</a>","ancestors":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/ancestors" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/ancestors</a>","instances":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/instances" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/instances</a>","tree":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/tree" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/tree</a>","notes":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/notes" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/notes</a>","mappings":"<a href="http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/mappings" class="">http://data.bioontology.org/ontologies/BRO/classes/http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator/mappings</a>","ui":"<a href="http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator" class="">http://bioportal.bioontology.org/ontologies/BRO?p=classes&conceptid=http%3A%2F%2Fbioontology.org%2Fontologies%2FBiomedicalResourceOntology.owl%23Stimulator</a>","@context":{"self":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ontology":"<a href="http://data.bioontology.org/metadata/Ontology" class="">http://data.bioontology.org/metadata/Ontology</a>","children":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","parents":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","descendants":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","ancestors":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","instances":"<a href="http://data.bioontology.org/metadata/Instance" class="">http://data.bioontology.org/metadata/Instance</a>","tree":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>","notes":"<a href="http://data.bioontology.org/metadata/Note" class="">http://data.bioontology.org/metadata/Note</a>","mappings":"<a href="http://data.bioontology.org/metadata/Mapping" class="">http://data.bioontology.org/metadata/Mapping</a>","ui":"<a href="http://www.w3.org/2002/07/owl#Class" class="">http://www.w3.org/2002/07/owl#Class</a>"}},"@context":{"@vocab":"<a href="http://data.bioontology.org/metadata/" class="">http://data.bioontology.org/metadata/</a>","prefLabel":"<a href="http://data.bioontology.org/metadata/skosprefLabel" class="">http://data.bioontology.org/metadata/skosprefLabel</a>","synonym":"<a href="http://data.bioontology.org/metadata/skossynony*" class="">http://data.bioontology.org/metadata/skossynony*</a>
 Connection #0 to host <a href="http://data.bioontology.org" class="">data.bioontology.org</a> left intact</div>
<div class="">m"}}]}%</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Kind Regards,</div>
<div class="">Jennifer</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Sep 29, 2016, at 5:04 PM, Ben Leinfelder <<a href="mailto:leinfelder@nceas.ucsb.edu" class="">leinfelder@nceas.ucsb.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div class="BodyFragment"><font size="2" class=""><span style="font-size:10pt;" class="">
<div class="PlainText">Hello,<br class="">
I'm investigating BioPortal's "batch" endpoint - described here: <a href="http://data.bioontology.org/documentation#nav_batch" class="">
http://data.bioontology.org/documentation#nav_batch</a> - but haven't been able to retrieve results from it.<br class="">
<br class="">
I've used your example, verbatim, to construct the json request and post it to the endpoint:<br class="">
         curl -X POST -v -d @batch.json "<a href="http://data.bioontology.org/batch" class="">http://data.bioontology.org/batch</a>" -H "Authorization: apikey token=<my token>"<br class="">
But get this response:<br class="">
        {"errors":["Batch endpoint only support calls to owl:Class resources"],"status":422}<br class="">
<br class="">
Am I missing something?<br class="">
<br class="">
Thank you,<br class="">
Ben Leinfelder<br class="">
<br class="">
</div>
</span></font></div>
<div class="BodyFragment"><font size="2" class=""><span style="font-size:10pt;" class="">
<div class="PlainText"><br class="">
<br class="">
</div>
</span></font></div>
<div class="BodyFragment"><font size="2" class=""><span style="font-size:10pt;" class="">
<div class="PlainText">_______________________________________________<br class="">
bioontology-support mailing list<br class="">
<a href="mailto:bioontology-support@lists.stanford.edu" class="">bioontology-support@lists.stanford.edu</a><br class="">
<a href="https://mailman.stanford.edu/mailman/listinfo/bioontology-support" class="">https://mailman.stanford.edu/mailman/listinfo/bioontology-support</a><br class="">
</div>
</span></font></div>
</div>
<span id="cid:7AF008618CDE6344B6EAC2DBF3CAAFA2@namprd02.prod.outlook.com"><batch.json></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>