Introduction
See Service API Design for the rationale and design details for this api.
See Developer Bootstrap#DeveloperBootstrap-ServiceDevelopment for instructions on how to run a local instance of this service.
Encoding
The primary request and response encoding for the service is JSON. Here's a handy tool to make a blob of JSON more readable: http://jsonformatter.curiousconcept.com/
In responses from the service, dates are serialized as long integers expressing epoch time - the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds. Here's a handy tool to convert from epoch time to human readable dates: http://www.epochconverter.com/
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'
Security
Eventually these services will be HTTPS only and disallow HTTP. Users will pass something like ?access_token=... as a query parameter for every request to the service
Query API Examples
'Select *' Query
Right now only a subset of query functionality is supported
SELECT * FROM <data type> [LIMIT <#>] [OFFSET <#>]
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/query?query=select+*+from+dataset+limit+3+offset+1'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "results": [ { "Disease": ["Cancer"], "Institution": ["Asian Cancer Research Group, Inc., (ACRG)"], "Internal Name": ["ACRG_gastric"], "Number of Samples": [2000], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Stomach"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/gastric_cancer_acrg.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/gastric_cancer_acrg.txt"], "creationDate": 1298428224101, "creator": "Asian Cancer Research Group, Inc., (ACRG)", "db_id": [1], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychMLEg1HQUVKRE9EYXRhc2V0GGQM", "name": "Gastric Cancer ACRG", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/gastric_cancer_acrg.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/gastric_cancer_acrg.txt"], "version": "0.0.1" }, { "Disease": ["Cancer"], "Institution": ["Asian Cancer Research Group, Inc., (ACRG)"], "Internal Name": ["ACRG_lung"], "Number of Samples": [2000], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Lung"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/lung_cancer_acrg.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/lung_cancer_acrg.txt"], "creationDate": 1298428225359, "creator": "Asian Cancer Research Group, Inc., (ACRG)", "db_id": [2], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychMLEg1HQUVKRE9EYXRhc2V0GHsM", "name": "Lung Cancer ACRG", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/lung_cancer_acrg.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/lung_cancer_acrg.txt"], "version": "0.0.1" }, { "Disease": ["Cancer"], "Institution": ["Fred Hutchinson Cancer Research Center /SKCCC at Johns Hopkins"], "Internal Name": ["AML-Ped_TARGET"], "Number of Samples": [200], "Posting Restriction": ["Link to data source"], "Species": ["Human"], "Tissue/Tumor": ["Blood"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/pediatric_aml_target.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/pediatric_aml_target.txt"], "creationDate": 1298428225995, "creator": "Soheil Meshinchi/ Bob Arceci", "db_id": [3], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GI4BDA", "name": "Pediatric AML TARGET", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/pediatric_aml_target.txt"], "releaseDate": null, "status": "Pending", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/pediatric_aml_target.txt"], "version": "0.0.1" } ], "totalNumberOfResults": 114 }
'Order By' Query
Right now only a subset of query functionality is supported
SELECT * FROM <data type> ORDER BY "<field name>" [ASC|DESC] [LIMIT <#>] [OFFSET #]
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/query?query=select+*+from+dataset+order+by+"name"+limit+3+offset+1'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "results": [ { "Disease": ["Cancer"], "Institution": ["Sage Bionetworks"], "Internal Name": ["Nonresponders_AML"], "Number of Samples": [300], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Blood"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/aml_nonresponders_cohort.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/aml_nonresponders_cohort.txt"], "creationDate": 1298428257367, "creator": "Stephen Friend", "db_id": [74], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GIMMDA", "name": "AML Nonresponders Cohort", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/aml_nonresponders_cohort.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/aml_nonresponders_cohort.txt"], "version": "0.0.1" }, { "Disease": ["Cancer"], "Institution": ["TCGA"], "Internal Name": ["TCGA_AML"], "Number of Samples": [500], "Posting Restriction": ["Embargo"], "Species": ["Human"], "Tissue/Tumor": ["Blood"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/aml_tcga.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/aml_tcga.txt"], "creationDate": 1298428265704, "creator": "TCGA", "db_id": [96], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GK8PDA", "name": "AML TCGA", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/aml_tcga.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/aml_tcga.txt"], "version": "0.0.1" }, { "Disease": ["Asthma"], "Institution": ["Imperial College London"], "Internal Name": ["Cookson_LCLs"], "Number of Samples": [404], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Lymphoblastoid Cell Line"], "Type": ["Other"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/asthma_human_lymphoblastoid_cell_lines.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/asthma_human_lymphoblastoid_cell_lines.txt"], "creationDate": 1298428239025, "creator": "Cookson", "db_id": [25], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GMgEDA", "name": "Asthma Human Lymphoblastoid Cell Lines", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/asthma_human_lymphoblastoid_cell_lines.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/asthma_human_lymphoblastoid_cell_lines.txt"], "version": "0.0.1" } ], "totalNumberOfResults": 114 }
'Where Equal To' Query
Right now only a subset of query functionality is supported
SELECT * FROM <data type> WHERE "<field name>" == "<value>" [LIMIT <#>] [OFFSET #]
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/query?query=select+*+from+dataset+where+name+==+"Human Liver Cohort"'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "results": [{ "Disease": ["CVD"], "Institution": ["Vanderbilt University/ University of Pittsburg/ StJudes Hospital"], "Internal Name": ["Deliver"], "Number of Samples": [517], "Posting Restriction": ["Link to data source"], "Species": ["Human"], "Tissue/Tumor": ["Liver"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/human_liver_cohort.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/human_liver_cohort.txt"], "creationDate": 1298428240821, "creator": "Fred Guengrich/Steve Strom/ Erin Schuetz", "db_id": [29], "description": null, "hasClinicalData": true, "hasExpressionData": true, "hasGeneticData": true, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA", "name": "Human Liver Cohort", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/human_liver_cohort.txt"], "releaseDate": null, "status": "Current", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/human_liver_cohort.txt"], "version": "0.0.1" }], "totalNumberOfResults": 114 }
'Where Equal To' Query with a Limit
Right now only a subset of query functionality is supported
SELECT * FROM <data type> WHERE "<field name>" == "<value>" [LIMIT <#>] [OFFSET #]
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/query?query=select+*+from+dataset+where+"Species"+==+"Human"+limit+3+offset+1'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "results": [ { "Disease": ["Cancer"], "Institution": ["Asian Cancer Research Group, Inc., (ACRG)"], "Internal Name": ["ACRG_gastric"], "Number of Samples": [2000], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Stomach"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/gastric_cancer_acrg.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/gastric_cancer_acrg.txt"], "creationDate": 1298428224101, "creator": "Asian Cancer Research Group, Inc., (ACRG)", "db_id": [1], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychMLEg1HQUVKRE9EYXRhc2V0GGQM", "name": "Gastric Cancer ACRG", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/gastric_cancer_acrg.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/gastric_cancer_acrg.txt"], "version": "0.0.1" }, { "Disease": ["Cancer"], "Institution": ["Asian Cancer Research Group, Inc., (ACRG)"], "Internal Name": ["ACRG_lung"], "Number of Samples": [2000], "Posting Restriction": ["unspecified"], "Species": ["Human"], "Tissue/Tumor": ["Lung"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/lung_cancer_acrg.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/lung_cancer_acrg.txt"], "creationDate": 1298428225359, "creator": "Asian Cancer Research Group, Inc., (ACRG)", "db_id": [2], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychMLEg1HQUVKRE9EYXRhc2V0GHsM", "name": "Lung Cancer ACRG", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/lung_cancer_acrg.txt"], "releaseDate": null, "status": "Future", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/lung_cancer_acrg.txt"], "version": "0.0.1" }, { "Disease": ["Cancer"], "Institution": ["Fred Hutchinson Cancer Research Center /SKCCC at Johns Hopkins"], "Internal Name": ["AML-Ped_TARGET"], "Number of Samples": [200], "Posting Restriction": ["Link to data source"], "Species": ["Human"], "Tissue/Tumor": ["Blood"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/pediatric_aml_target.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/pediatric_aml_target.txt"], "creationDate": 1298428225995, "creator": "Soheil Meshinchi/ Bob Arceci", "db_id": [3], "description": null, "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GI4BDA", "name": "Pediatric AML TARGET", "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/pediatric_aml_target.txt"], "releaseDate": null, "status": "Pending", "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/pediatric_aml_target.txt"], "version": "0.0.1" } ], "totalNumberOfResults": 114 }
REST API Examples (Read Only)
Sanity check request
This is just a 'hello world' type request that you can make to ensure that the service is running.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/test'
Response
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 Content-Language: en-US Pragma: no-cache Cache-Control: no-cache, no-store, max-age=0 Expires: Thu, 01 Jan 1970 00:00:00 GMT Transfer-Encoding: chunked Server: Jetty(6.1.x) {"hello": "REST for Datasets rocks"}
Get All Datasets
Optional Parameters
- offset - integer - 1-based pagination offset
- limit - integer - maximum number of results to return
- sort - string - the name of the field upon which to sort
- ascending - boolean - whether or not to sort ascending
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset?sort=name&limit=3'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "paging": {"next": "/repo/v1/dataset?offset=4&limit=3&sort=name&ascending=true"}, "results": [ { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GIMMDA/annotations", "creationDate": 1298428257367, "creator": "Stephen Friend", "description": null, "etag": "-2010080092", "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GIMMDA", "layer": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GIMMDA/layer", "name": "AML Nonresponders Cohort", "releaseDate": null, "status": "Future", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GIMMDA", "version": "0.0.1" }, { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GK8PDA/annotations", "creationDate": 1298428265704, "creator": "TCGA", "description": null, "etag": "1652542921", "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GK8PDA", "layer": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GK8PDA/layer", "name": "AML TCGA", "releaseDate": null, "status": "Future", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GK8PDA", "version": "0.0.1" }, { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GMgEDA/annotations", "creationDate": 1298428239025, "creator": "Cookson", "description": null, "etag": "968203795", "hasClinicalData": false, "hasExpressionData": false, "hasGeneticData": false, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GMgEDA", "layer": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GMgEDA/layer", "name": "Asthma Human Lymphoblastoid Cell Lines", "releaseDate": null, "status": "Future", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GMgEDA", "version": "0.0.1" } ], "totalNumberOfResults": 114 }
Get a Dataset
This returns the primary fields of a dataset and links to get additional info.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 1829355917 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/annotations", "creationDate": 1298428240821, "creator": "Fred Guengrich/Steve Strom/ Erin Schuetz", "description": null, "etag": "1829355917", "hasClinicalData": true, "hasExpressionData": true, "hasGeneticData": true, "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA", "layer": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer", "name": "Human Liver Cohort", "releaseDate": null, "status": "Current", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA", "version": "0.0.1" }
Get Annotations for a Dataset
This returns the annotations for a dataset.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/annotations'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 413002292 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "creationDate": null, "dateAnnotations": {}, "doubleAnnotations": {}, "etag": "413002292", "id": "ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA", "longAnnotations": { "Number of Samples": [517], "db_id": [29] }, "stringAnnotations": { "Disease": ["CVD"], "Institution": ["Vanderbilt University/ University of Pittsburg/ StJudes Hospital"], "Internal Name": ["Deliver"], "Posting Restriction": ["Link to data source"], "Species": ["Human"], "Tissue/Tumor": ["Liver"], "Type": ["GCD"], "abstract_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/abstract_files/human_liver_cohort.txt"], "citation_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/citation_files/human_liver_cohort.txt"], "readme_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/readme_files/human_liver_cohort.txt"], "user_agreement_file_path": ["/srv/www/htdocs/Foswiki/downloads/data/v2/user_agreement_files/human_liver_cohort.txt"] }, "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/annotations" }
Get all the Layers for a Dataset
This returns the primary fields for all the layers of a dataset.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "paging": {}, "results": [ { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/annotations", "creationDate": 1298428298393, "description": "", "etag": "-869197816", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA", "locations": [ "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/awsEBSLocation", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/locations", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/sageLocation", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/awsS3Location" ], "name": "expression data", "platform": null, "preview": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/preview", "processingFacility": null, "publicationDate": null, "qcBy": null, "qcDate": null, "releaseNotes": "", "tissueType": null, "type": "E", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA", "version": "0.0.1" }, { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/annotations", "creationDate": 1298428302169, "description": "", "etag": "-647910265", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA", "locations": [ "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/sageLocation", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/awsS3Location", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/locations", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/awsEBSLocation" ], "name": "genetic data", "platform": null, "preview": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/preview", "processingFacility": null, "publicationDate": null, "qcBy": null, "qcDate": null, "releaseNotes": "", "tissueType": null, "type": "G", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA", "version": "0.0.1" }, { "annotations": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/annotations", "creationDate": 1298428294319, "description": "", "etag": "-1124514053", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA", "locations": [ "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/awsS3Location", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/sageLocation", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/awsEBSLocation", "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/locations" ], "name": "clinical data", "platform": null, "preview": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/preview", "processingFacility": null, "publicationDate": null, "qcBy": null, "qcDate": null, "releaseNotes": "", "tissueType": null, "type": "C", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA", "version": "0.0.1" } ], "totalNumberOfResults": 3 }
Get Annotations for a Expression Dataset Layer
This returns the annotations for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/annotations'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 923521 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "creationDate": null, "dateAnnotations": {}, "doubleAnnotations": {}, "etag": "923521", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA", "longAnnotations": {}, "stringAnnotations": {}, "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/annotations" }
Get preview data for a Expression Dataset Layer
This returns the preview data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/preview'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 945969657 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "etag": "945969657", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA", "preview": "expression data preview", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/preview" }
Get the awsEBSLocation for a Expression Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/awsEBSLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "snap-29d33a42 (US West)", "type": "awsebs" }
Get the sageLocation for a Expression Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/sageLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "/Shares/external-data/DAT_030__human_liver_cohort", "type": "sage" }
Get the awsS3Location for a Expression Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMASDA/awsS3Location'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "https://data01.sagebase.org.s3.amazonaws.com/human_liver_cohort.tar.gz?Expires=1298431661&AWSAccessKeyId=thisIsAFakeAccessKey&Signature=%2BXVN4wyPRXs9D8xaubF5jFavFBU%3D", "type": "awss3" }
Get Annotations for a Genetic Dataset Layer
This returns the annotations for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/annotations'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 923521 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "creationDate": null, "dateAnnotations": {}, "doubleAnnotations": {}, "etag": "923521", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA", "longAnnotations": {}, "stringAnnotations": {}, "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/annotations" }
Get preview data for a Genetic Dataset Layer
This returns the preview data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/preview'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 246848728 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "etag": "246848728", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA", "preview": "genetic data preview", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/preview" }
Get the sageLocation for a Genetic Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/sageLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "/Shares/external-data/DAT_030__human_liver_cohort", "type": "sage" }
Get the awsS3Location for a Genetic Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/awsS3Location'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "https://data01.sagebase.org.s3.amazonaws.com/human_liver_cohort.tar.gz?Expires=1298431662&AWSAccessKeyId=thisIsAFakeAccessKey&Signature=vV5sW7M%2FsvzRdTuJFxyRlGS8CfQ%3D", "type": "awss3" }
Get the awsEBSLocation for a Genetic Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGMoSDA/awsEBSLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "snap_29d33a42 (US West)", "type": "awsebs" }
Get Annotations for a Clinical Dataset Layer
This returns the annotations for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/annotations'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 923521 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "creationDate": null, "dateAnnotations": {}, "doubleAnnotations": {}, "etag": "923521", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA", "longAnnotations": {}, "stringAnnotations": {}, "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/annotations" }
Get preview data for a Clinical Dataset Layer
This returns the preview data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/preview'
Response
HTTP/1.1 200 OK Content-Type: application/json ETag: 345556318 Transfer-Encoding: chunked Server: Jetty(6.1.x) { "etag": "345556318", "id": "ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA", "preview": "clinical data preview", "uri": "/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/preview" }
Get the awsS3Location for a Clinical Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/awsS3Location'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "https://data01.sagebase.org.s3.amazonaws.com/human_liver_cohort.tar.gz?Expires=1298431663&AWSAccessKeyId=thisIsAFakeAccessKey&Signature=D5SfbSfe0oo77501lngx0VTfRjM%3D", "type": "awss3" }
Get the sageLocation for a Clinical Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/sageLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "/Shares/external-data/DAT_030__human_liver_cohort", "type": "sage" }
Get the awsEBSLocation for a Clinical Dataset Layer
This returns the location data for a dataset layer.
Request
curl -i -H Accept:application/json 'http://localhost:8080/repo/v1/dataset/ag1kZWZsYXV4LXRlc3QychQLEg1HQUVKRE9EYXRhc2V0GJcFDA/layer/ag1kZWZsYXV4LXRlc3Qyci8LEg1HQUVKRE9EYXRhc2V0GJcFDAsSFEdBRUpET0lucHV0RGF0YUxheWVyGLYSDA/awsEBSLocation'
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "path": "snap-29d33a42 (US West)", "type": "awsebs" }
REST API Usage Examples (Read/Write and slightly out of date)
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.
Create a Dataset
Request:
curl -i -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
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/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "version":"0.0.1", "creator":"fake creator", "description":null, "creationDate":1296595870715, "status":"not curated", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "etag":"1309185941", "releaseDate":1254355200000, "layers":[] }
Update a Dataset
Note that in the example below the creator and description fields have been changed but all others remain the same.
Request:
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:1309185941 -d '{ "name":"test dataset", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "version":"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":[] } ' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
Response
HTTP/1.1 200 OK ETag: -852418664 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"test dataset", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "version":"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, "layers":[] }
Add Annotations to a Dataset
First get the empty annotations container for your newly created dataset
Request
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations
Response
HTTP/1.1 200 OK ETag: 923521 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "etag":"923521", "stringAnnotations":{ }, "floatAnnotations":{ }, "dateAnnotations":{ } }
Then you add/modify the annotations of interest and do a PUT. Note that annotation values must always be list values even if the list is only of length one.
Request
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:923521 -d '{ "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "etag":"923521", "stringAnnotations":{ "Experimental Design Templates":["exp-122887", "exp-97765"] }, "floatAnnotations":{ "Number of Samples":[500] }, "dateAnnotations":{ "Publication Date":["2011-01-15"] } }' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations
Response
HTTP/1.1 200 OK ETag: -1638393853 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww/annotations", "etag":"-1638393853", "stringAnnotations":{ "Experimental Design Templates":[ "exp-122887", "exp-97765" ] }, "floatAnnotations":{ "Number of Samples":[ 500.0 ] }, "dateAnnotations":{ "Publication Date":[ 1295049600000 ] } }
Delete a Dataset
Request
curl -i -X DELETE http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
Response
HTTP/1.1 204 No Content Server: Jetty(6.1.x)
Get a Layers for a Dataset
Request
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer
Response
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "results":[ { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1424771925", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":"liver", "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null }, { "name":"Flint HS Mice Phenotypes", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww", "type":"C", "version":"0.0.1", "description":"this is a description", "creationDate":1296693007167, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww", "etag":"1445062754", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":null, "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null } ], "totalNumberOfResults":2, "paging":{ } }
Get a Layer
Request
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
Response
HTTP/1.1 200 OK ETag: 1240467407 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1240467407", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":null, "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null }
Get annotations for a layer
Request
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations
Response
HTTP/1.1 200 OK ETag: 923521 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"923521", "stringAnnotations":{ }, "floatAnnotations":{ }, "dateAnnotations":{ } }
Create a layer
Request
curl -i -H Accept:application/json -H Content-Type:application/json -d '{"name":"Flint HS Mice Affy", "type":"E", "description":"this is a description", "releaseNotes":"this is a release note"}' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer
Response
HTTP/1.1 201 Created ETag: 1240467407 Location: /repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1240467407", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":null, "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null }
Now ask for the owning dataset and you can see the preview of the layer
Request
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww
Response
HTTP/1.1 200 OK ETag: -801135512 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww", "version":"0.0.1", "creator":"Jonathan Flint", "description":null, "creationDate":1296690549675, "status":"Future", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww", "etag":"-801135512", "releaseDate":null, "layers":[ { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww" },{ "id":"use this uri to make a new layer", "type":"hack", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer" } ] }
Update a Layer
In the example below we updated the tissue type.
Request
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:1240467407 -d ' { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1240467407", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":"liver", "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null }' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
Response
HTTP/1.1 200 OK ETag: 1424771925 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1424771925", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":"liver", "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null }
Delete a layer
Request
curl -i -X DELETE http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
Response
HTTP/1.1 204 No Content Server: Jetty(6.1.x)
Add annotations to a layer
Request
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:923521 -d ' { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"923521", "stringAnnotations":{ "notes":["I threw away 6 samples during the curation process due to gender chromosome mismatches"] }, "floatAnnotations":{ }, "dateAnnotations":{ } }' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations
Response
HTTP/1.1 200 OK ETag: -1897035229 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"-1897035229", "stringAnnotations":{ "notes":[ "I threw away 6 samples during the curation process due to gender chromosome mismatches" ] }, "floatAnnotations":{ }, "dateAnnotations":{ } }