...
In requests to the service, dates can be serialized either as long integers expressing epoch time or human readable dates in http://www.ietf.org/rfc/rfc3339.txt format such as '2011-01-31' or '2011-01-31T22:00:00'
Usage Examples
Get a Dataset
...
This is a REST api (see Service API Design for more details as to what this means). You can create entities, updated entities, read entities, and delete entities. More advanced querying will be implemented as a separate API. Partial updates (e.g., just updating two fields in a dataset) are not supported. In a nutshell, when you update something like a dataset, you GET the dataset first, modify the properties you want to change, and then send the entire object back to the service so that this revised entity overwrites the previously stored entity.
Get a Dataset
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA"
|
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: 456728335
Content-Type: application/json
Date: Tue, 01 Feb 2011 18:22:24 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
{
"name":"Glioblastoma TCGA",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"version":"0.0.1",
"description":null,
"status":"Available",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"etag":"456728335",
"creator":null,
"creationDate":1296182238229,
"releaseDate":null,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
|
Get Annotations for a Dataset
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations"
|
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: -1919132670
Content-Type: application/json
Date: Tue, 01 Feb 2011 18:24:15 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
"etag":"-1919132670",
"creationDate":null,
"stringAnnotations":{
"Disease":[
"Cancer"
],
"Tumor / Tissue Type":[
"Glioblastoma"
],
"Species":[
"Human"
],
"Institution":[
"TCGA"
],
"Reference / PubMed ID":[
"18772890" ]
},
"floatAnnotations":{
"Number of Samples":[
465.0
]
},
"dateAnnotations":{
}
}
|
Get Datasets
Optional Parameters
- offset - integer - 1-based pagination offset
- limit - integer - maximum number of results to return
- sort - string - the name of the primary field upon which to sort
- ascending - boolean - whether or not to sort ascending
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset?limit=3"
|
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: 22610276 Content-Type: application/json Date: Tue, 01 Feb 2011 18:07:45 GMT Server: Google Frontend Cache-Control: private, x-gzip-ok="" Transfer-Encoding: chunked { "results":[ { "name":"Pediatric AML TARGET", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA/annotations", "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA", "version":"0.0.1", "description":null, "status":"In Transition", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA", "etag":"1703131409", "creator":"Soheil Meshinchi", "creationDate":1296182253120, "releaseDate":null, "layers":[ { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "type":"C", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "type":"E", "uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", "version":"0.0.1", "description":null, "statustype":"AvailableG", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA", "etag":"456728335", "creator":null, "creationDateuri":1296182238229,"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" "releaseDate":null, "layers":[ } { ] "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", }, "type":"C",{ "uriname":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"Flint HS Mice", }, {"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA/annotations", "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA", "typeversion":"E0.0.1", "uridescription":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"null, }, "status":"Future", { "iduri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA", "typeetag":"G1025901212", "uricreator":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"Jonathan Flint", } "creationDate":1296182255070, ] } |
Get Annotations for a Dataset
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations" HTTP/1.1 200 OK ETag: -1919132670 Content-Type: application/json Date: Tue, 01 Feb 2011 18:24:15 GMT Server: Google Frontend Cache-Control: private, x-gzip-ok="" Transfer-Encoding: chunked { "releaseDate":null, "layers":[ { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDAagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "uri "type":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotationsC", "etag "uri":"-1919132670",/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" "creationDate":null, "stringAnnotations":{ }, "Disease":[ "Cancer" { ], "Tumor / Tissue Type"id":["agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "Glioblastoma" ],"type":"E", "Species":[ "uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" "Human" ], }, "Institution":[ { "TCGA" ] }, "floatAnnotationsid":{"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", "Number of Samples":[ "type":"G", 465.0 ], "Reference / PubMed ID":[uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" 1.877289E7 } ] }, ] "dateAnnotations":{ }, } |
Get Datasets
Optional Parameters
- offset - integer - 1-based pagination offset
- limit - integer - maximum number of results to return
- sort - string - the name of the primary field upon which to sort
- ascending - boolean - whether or not to sort ascending
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset?limit=3" HTTP/1.1 200 OK ETag: 22610276 Content-Type: application/json Date: Tue, 01 Feb 2011 18:07:45 GMT Server: Google Frontend Cache-Control: private, x-gzip-ok="" Transfer-Encoding: chunked { "results":[ { "name":"Glioblastoma TCGA", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations", "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA", "version":"0.0.1", {"description":null, "namestatus":"Pediatric AML TARGETAvailable", "annotationsuri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA/annotationsagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA", "etag":"456728335", "idcreator":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA"null, "versioncreationDate":"0.0.1"1296182238229, "descriptionreleaseDate":null, "statuslayers":"In Transition",[ { "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA", "etagid":"1703131409",agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "creatortype":"Soheil MeshinchiC", "creationDate":1296182253120, "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" "releaseDate":null, "layers":[}, { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQwagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "type":"CE", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQwagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", "type":"EG", "uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA""/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" } }, ] } { ], "totalNumberOfResults":10, "paging":{ "idnext":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",/repo/v1/dataset?offset=4&limit=3" } } |
Create a Dataset
Request:
Code Block |
---|
curl -i "type":"G", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" } ] }, { "name":"Flint HS Mice", -H Accept:application/json -H Content-Type:application/json -d '{"name":"test dataset", "creator":"fake creator", "releaseDate":"2009-10-01", "status":"not curated"}' http://localhost:8080/repo/v1/dataset |
Response
Code Block |
---|
HTTP/1.1 201 Created ETag: 1736839268 Location: /repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBAw Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"test dataset", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDAagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDAagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "version":"0.0.1", "creator":"fake creator", "description":null, "creationDate":1296595870715, "status":"Futurenot curated", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDAagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "etag":"1309185941", "etagreleaseDate":"1025901212"1254355200000, "layers":[ "creator":"Jonathan Flint", { "creationDateid":1296182255070"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "type"releaseDate:"C":null, "layersuri":["/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQwagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "type":"CE", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", "type":"EG", "uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" } ] }, { |
Add Annotations to a Dataset
Code Block |
---|
Update a Dataset
Note that the creator and description fields have been changed but all others remain the same.
Request:
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:1309185941 \ -d '{ "idname":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDAtest dataset", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "typeid":"GagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "uri"version":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"0.0.1", "creator":"updated creator", "description":"I just added } a description", "creationDate":1296595870715, ] "status":"not curated", },"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "etag":"1309185941", {"releaseDate":1254355200000, "layers":[ "name":"Glioblastoma TCGA", { "annotationsid":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotationsagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "idtype":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDAC", "versionuri":"0.0.1",/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, "description":null,{ "statusid":"AvailableagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "uritype":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDAE", "etaguri":"456728335",agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" }, "creator":null,{ "creationDateid":1296182238229"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", "releaseDatetype":null"G", "layersuri":["/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" } ] } ' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw |
Response
Code Block |
---|
HTTP/1.1 {200 OK ETag: -852418664 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "idname":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQwtest dataset", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "typeid":"CagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "uri"version":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"0.0.1", "creator":"updated creator", "description":"I just added a }description", "creationDate":1296595870715, "status":"not curated", { "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "etag":"-852418664", "releaseDate":1254355200000, "idlayers":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",[ { "typeid":"EagxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "uritype":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDAC", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA", "type":"GE", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDAagxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA" }, } { ] "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA", } ], "totalNumberOfResultstype":10"G", "paging":{ "nexturi":"/repo/v1/dataset?offset=4&limit=3"datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" } ] } |
Create a Dataset
...
Add Annotations to a Dataset
...
Update a Dataset
Delete a Dataset
Code Block |
---|