...
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 05 Oct 2011 16:34:49 GMT Server: Apache-Coyote/1.1 transfer-encoding: chunked Connection: keep-alive { "paging": {}, "results": [ { "accessControlListid": "/repo/v1/location/17338/acl", "annotationsmodifiedOn": "/repo/v1/location/17338/annotations2012-09-13T05:12:26.121Z", "contentTypemodifiedByPrincipalId": "application/zipJohn Hill", "creationDateversionComment": 1317832487819,"The second version of this "etag": "1"location.", "idversionLabel": "173380.0.2", "md5sumversionNumber": "b513a23fc54b7b0d65312e1a900af5a6",2 "name": "17338"}, "parentId": "17337",{ "pathid": "https://s3.amazonaws.com/stagingdata.sagebase.org/17338/0.0.2/mskcc_prostate_cancer.phenotype.zip?Expires=1317918890&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=CNx6C5wWmtSAZvrprtC4V2gqyio%3D", "typemodifiedOn": "awss32012-10-13T06:12:16.001Z", "urimodifiedByPrincipalId": "/repo/v1/location/17338John Hill", "versionComment": "The second version of this location."null, "versionLabel": "0.0.20", "versionNumber": 2,1 } "versionUrl": "/repo/v1/location/17338/version/2", ], "versionstotalNumberOfResults": "/repo/v1/location/17338/version" }, { 2 } |
Get a Previous Version
To get a previous version we must provide the version number we would like to fetch:
Request
Code Block |
---|
curl -i -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version/1' |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 05 Oct 2011 16:34:51 GMT ETag: 1 Server: Apache-Coyote/1.1 Content-Length: 675 Connection: keep-alive { "accessControlList": "/repo/v1/location/17338/acl", "annotations": "/repo/v1/location/17338/annotations", "contentType": "application/zip", "creationDate": 1317832487819, "etag": "1", "id": "17338", "md5sum": "b513a23fc54b7b0d65312e1a900af5a6", "name": "17338", "parentId": "17337", "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/17338/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=13179188901317918891&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=V2xinPmlN4VeaUrpm7Wno7QSD0w%3DxAjgB1Bffb9URkleySoO%2FMZ6pB4%3D", "type": "awss3", "uri": "/repo/v1/location/17338", "versionComment": null, "versionLabel": "0.0.0", "versionNumber": 1, "versionUrl": "/repo/v1/location/17338/version/1", "versions": "/repo/v1/location/17338/version" } ], "totalNumberOfResults": 2 } |
Get Annotations of a Previous Version
To get the annotations of a previous version we must provide the version number we would like to fetch:
...
Code Block |
---|
curl -i -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version/1/annotations' |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 05 Oct 2011 16:34:51 GMT ETag: 1 Server: Apache-Coyote/1.1 Content-Length: 675217 Connection: keep-alive { "accessControlListblobAnnotations": "/repo/v1/location/17338/acl"{}, "annotationscreationDate": "/repo/v1/location/17338/annotations",1317832487819, "contentTypedateAnnotations": "application/zip"{}, "creationDatedoubleAnnotations": 1317832487819{}, "etag": "1", "id": "17338", "md5sumlongAnnotations": "b513a23fc54b7b0d65312e1a900af5a6"{}, "namestringAnnotations": "17338"{}, "parentId": "17337", "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/17338/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918891&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=xAjgB1Bffb9URkleySoO%2FMZ6pB4%3D", "type": "awss3", "uri": "/repo/v1/location/17338", "versionComment": null, "versionLabel": "0.0.0", "versionNumber": 1, "versionUrl": "/repo/v1/location/17338/version/1", "versions": "/repo/v1/location/17338/version/annotations" } |
...
Delete a
...
Version
To get the annotations of a previous version delete a specific versoin we must provide the version number we would like to fetch:. Note: You cannot delete the last version of an entity.
Request
Code Block |
---|
curl -i -H sessionToken:YourSessionToken -H Accept:application/json -X 'DELETE https://repo-staging.sagebase.org/repo/v1/location/17338/version/1/annotations' |
Response
Code Block |
---|
HTTP/1.1 200 OK 204 No Content Content-length: 0 Content-Type: application/jsontext/plain; charset=UTF-8 Date: Wed, 05 Oct 2011 16:34:51 GMT ETagServer: 1 Server: Apache-Coyote/1.1 Content-Length: 217 Connection: keep-alive { "blobAnnotations": {}, "creationDate": 1317832487819, "dateAnnotations": {}, "doubleAnnotations": {}, "etag": "1", "id": "17338", "longAnnotations": {}, "stringAnnotations": {}, "uri": "/repo/v1/location/17338/version/1/annotations" } |
Delete a Version
To delete a specific versoin we must provide the version number. Note: You cannot delete the last version of an entity.
Request
Code Block |
---|
curl -i -H sessionToken:YourSessionToken -H Accept:application/json -X DELETE https://repo-staging.sagebase.org/repo/v1/location/17338/version/1 |
Response
Code Block |
---|
HTTP/1.1 204 No Content
Content-length: 0
Content-Type: text/plain; charset=UTF-8
Date: Wed, 05 Oct 2011 16:34:51 GMT
Server: Apache-Coyote/1.1
Connection: keep-alive
|
Finally List Versions Again
...
Code Block |
---|
curl -i -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version' |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 05 Oct 2011 16:34:51 GMT Server: Apache-Coyote/1.1 transfer-encoding: chunked Connection: keep-alive { "paging": {}, "results": [{ "accessControlList": "/repo/v1/location/17338/acl", "annotations": " Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/annotations", "contentType": "application/zip", "creationDate": 1317832487819, "etag": "2", "id": "17338", "md5sum": "b513a23fc54b7b0d65312e1a900af5a6", "name": "17338",/version' |
Response
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 05 Oct 2011 16:34:51 GMT Server: Apache-Coyote/1.1 transfer-encoding: chunked Connection: keep-alive { "paging": {}, "results": [{ "parentIdid": "1733717338", "path "modifiedOn": "https://s3.amazonaws.com/stagingdata.sagebase.org/17338/0.0.2/mskcc_prostate_cancer.phenotype.zip?Expires=1317918892&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=dhswjgIVdzD1y9uQxnc5xR3UBqI%3D", "type": "awss3", "uri": "/repo/v1/location/17338"2012-09-13T05:12:26.121Z", "modifiedByPrincipalId": "John Hill", "versionComment": "The second version of this location.", "versionLabel": "0.0.2", "versionNumber": 2, "versionUrl": "/repo/v1/location/17338/version/2", "versions": "/repo/v1/location/17338/version" }], "totalNumberOfResults": 1 } |
...