API Investigation:Sparql
From ToxBank API Wiki
(Difference between revisions)
m (→cURL example) |
|||
(11 intermediate revisions by 2 users not shown) | |||
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(template_name): | + | |REST_op_params=params per template(template_name):* no params needed for investigation_and_characteristics, investigations_and_factors and investigations_and_protocols* factorValues: URI array for investigation_by_factors and protocols_by_factors template * geneIdentifiers: Array of Strings for biosearch (e.G.: entrez:3075,genesymbol:HSPD1). <!--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* relOperator: String for investigation_by_gene_and_value. Relational operator for pvalue, qvalue, FC. One of <below, above>.--> |
− | * no params needed for investigation_and_characteristics, investigations_and_factors and | + | |REST_header_param=Accept: application/json, subjectid:SECURITY-TOKEN |
− | * factorValues: URI array for investigation_by_factors and protocols_by_factors template | + | |REST_op_result=Investigation data as json |
− | * geneIdentifiers: Array of Strings for investigation_by_genes (e.G.: uniprot:P10809,genesymbol:HSPD1,unigene:Hs.595053,refseq:NM_002156,entrez:3329) | + | |REST_op_mime_output=application/json |
− | * value: String for investigation_by_characteristic_name, investigation_by_characteristic_value, investigation_by_characteristic and investigation_by_factor | + | |REST_op_status=200, 400, 401, 404 |
− | |REST_header_param=Accept: | + | |
− | |REST_op_result=Investigation data as | + | |
− | |REST_op_mime_output= | + | |
− | |REST_op_status=200 | + | |
}} | }} | ||
− | Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/ | + | Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigations_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationsAndProtocols, InvestigationByFactors). |
==== cURL example ==== | ==== cURL example ==== | ||
+ | |||
+ | |||
+ | curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/genelist | ||
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" https://services.toxbank.net/investigation/sparql/investigation_and_characteristics | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" https://services.toxbank.net/investigation/sparql/investigation_and_characteristics | ||
Line 26: | Line 25: | ||
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=Saccharomyces cerevisiae (Baker's yeast)" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_value | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=Saccharomyces cerevisiae (Baker's yeast)" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_value | ||
− | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d " | + | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "values=http://purl.obolibrary.org/chebi/CHEBI:39867" https://services.toxbank.net/investigation/sparql/investigation_by_factor |
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 "value=0.035" https://services.toxbank.net/investigation/sparql/investigation_by_foldchange | |
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 "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=0.65614" https://services.toxbank.net/investigation/sparql/ | + | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['uniprot:P10809','genesymbol:HSPD1','unigene:Hs.595053']" -d "value=pvalue:0.65614" https://services.toxbank.net/investigation/sparql/investigation_by_gene_and_value |
+ | |||
+ | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['uniprot:P10809','genesymbol:HSPD1','unigene:Hs.595053']" -d "value=pvalue:0.65614" -d "relOperator=above" https://services.toxbank.net/investigation/sparql/investigation_by_gene_and_value | ||
+ | |||
+ | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=FC:0.65614" https://services.toxbank.net/investigation/sparql/investigation_by_value | ||
− | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=0.805517" https://services.toxbank.net/investigation/sparql/ | + | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=qvalue:0.805517" https://services.toxbank.net/investigation/sparql/investigation_by_value |
+ | --> | ||
+ | curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['entrez:3075']" https://services.toxbank.net/investigation/sparql/biosearch | ||
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_and_factors | curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_and_factors |
Latest revision as of 10:19, 29 September 2015
Description | Get information from investigations |
---|---|
Resource | Investigation |
Method | GET |
URI | investigation/sparql/{template_name} |
Parameters | params per template(template_name):* no params needed for investigation_and_characteristics, investigations_and_factors and investigations_and_protocols* factorValues: URI array for investigation_by_factors and protocols_by_factors template * geneIdentifiers: Array of Strings for biosearch (e.G.: entrez:3075,genesymbol:HSPD1). |
Header Parameters | Accept: application/json, subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation data as json |
Media Type (output) | application/json |
Status code | 200, 400, 401, 404 |
Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigations_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationsAndProtocols, InvestigationByFactors).
cURL example
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/genelist
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" https://services.toxbank.net/investigation/sparql/investigation_and_characteristics
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=http://purl.obolibrary.org/obo/NEWT_4932" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=organism" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_name
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=Saccharomyces cerevisiae (Baker's yeast)" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_value
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "values=http://purl.obolibrary.org/chebi/CHEBI:39867" https://services.toxbank.net/investigation/sparql/investigation_by_factor
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=['entrez:3075']" https://services.toxbank.net/investigation/sparql/biosearch
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_and_factors
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_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/protocols_by_factors
Facts about API Investigation:SparqlRDF feed
Acts on | Investigation + |
Has output media type | application/json + |
Has status code | 200, 400, 401, 404 + |