API Investigation:Sparql
From ToxBank API Wiki
(Difference between revisions)
Mrautenberg (Talk | contribs) |
Mrautenberg (Talk | contribs) |
||
Line 4: | Line 4: | ||
|REST_op_method=GET | |REST_op_method=GET | ||
|REST_op_uri=investigation/sparql/{template_name} | |REST_op_uri=investigation/sparql/{template_name} | ||
− | |REST_op_params=params per template: | + | |REST_op_params=params per template(template_name): |
* no params needed for investigation_and_characteristics, investigations_and_factors and investigation_and_protocols | * no params needed for investigation_and_characteristics, investigations_and_factors and investigation_and_protocols | ||
* factorValues: URI array for investigation_by_factors and protocols_by_factors template | * factorValues: URI array for investigation_by_factors and protocols_by_factors template | ||
+ | * geneIdentifiers: Array of Strings for investigation_by_genes (e.G.: uniprot:P10809,genesymbol:HSPD1,unigene:Hs.595053,refseq:NM_002156,entrez:3329) | ||
* value: String for investigation_by_characteristic_name, investigation_by_characteristic_value, investigation_by_characteristic and investigation_by_factor | * value: String for investigation_by_characteristic_name, investigation_by_characteristic_value, investigation_by_characteristic and investigation_by_factor | ||
|REST_header_param=Accept: one of < application/sparql-results+xml, application/json, text/uri-list, text/html > , subjectid:SECURITY-TOKEN | |REST_header_param=Accept: one of < application/sparql-results+xml, application/json, text/uri-list, text/html > , subjectid:SECURITY-TOKEN | ||
Line 13: | Line 14: | ||
|REST_op_status=200 | |REST_op_status=200 | ||
}} | }} | ||
− | Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigation_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationAndProtocols, InvestigationByFactors). | + | Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigation_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationAndProtocols, InvestigationByFactors). |
==== cURL example ==== | ==== cURL example ==== | ||
Line 19: | Line 20: | ||
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "factorValues=['http://purl.obolibrary.org/chebi/CHEBI:39867']" https://services.toxbank.net/investigation/sparql/investigation_by_factors | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "factorValues=['http://purl.obolibrary.org/chebi/CHEBI:39867']" https://services.toxbank.net/investigation/sparql/investigation_by_factors | ||
+ | |||
+ | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['uniprot:P10809','genesymbol:HSPD1','unigene:Hs.595053']" https://services.toxbank.net/investigation/sparql/investigation_by_genes | ||
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=HepaRG" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_name | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=HepaRG" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_name |
Revision as of 09:47, 12 December 2013
Description | Get information from investigations |
---|---|
Resource | Investigation |
Method | GET |
URI | investigation/sparql/{template_name} |
Parameters | params per template(template_name):
|
Header Parameters | Accept: one of < application/sparql-results+xml, application/json, text/uri-list, text/html > , subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation data as sparql-results+xml json uri-list html |
Media Type (output) | application/sparql-results+xml application/json text/uri-list text/html |
Status code | 200 |
Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigation_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationAndProtocols, InvestigationByFactors).
cURL example
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigation_and_protocols
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "factorValues=['http://purl.obolibrary.org/chebi/CHEBI:39867']" https://services.toxbank.net/investigation/sparql/investigation_by_factors
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['uniprot:P10809','genesymbol:HSPD1','unigene:Hs.595053']" https://services.toxbank.net/investigation/sparql/investigation_by_genes
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=HepaRG" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_name
Facts about API Investigation:SparqlRDF feed
Acts on | Investigation + |
Has output media type | application/sparql-results+xml application/json text/uri-list text/html + |
Has status code | 200 + |