Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

The Query API is loosely modeled after Facebook's Query Language.

The REST API took inspiration from several successful REST APIs:

See Service API Design for more information regarding the rationale and design details for this api.

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 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

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

...

Security

Eventually these services will be HTTPS only and disallow HTTP. For all requests requiring authentication, users will pass a special header sessionToken with
each request to the service.

Log into Synapse

You must have an account with permission to create entities in Synapse.

Request

Code Block
curl -i -k -H Accept:application/json -H Content-Type:application/json -d '{
  "email": "me@myEmail.com",
  "password": "thisIsAFakePassword"
}' https://auth-prod.sagebase.org/auth/v1/session

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 201 Created
Content-Type: application/json
Date: Tue, 
01
28 
Feb
Aug 
2011
2012 
18
23:
22
03:
24
04 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",
Apache-Coyote/1.1
Content-Length: 43
Connection: keep-alive
{
	"sessionToken":"XXXXXXXXXXXXXXX"
}

Create/Update/Delete Examples

You can create entities, update entities, read entities, and delete entities. More advanced querying is 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. Conflicting updates are detected and rejected through the use of the ETag header.

Create a Entity

An entity is created with a POST where the entity body is passed with a content type of application/json.  The only required property for any entity is the 'entityType' which indicates the type of entity you wish to create.  See the following table for common entity types:

entityTypeAlias (for query)Description
org.sagebionetworks.repo.model.ProjectprojectA project entity serves as the root for collaboration.  It is a common practices to place all other entities within a project.
org.sagebionetworks.repo.model.FolderfolderA simple tool for organizing entities.  This is similar to a file folder.
org.sagebionetworks.repo.model.LinklinkAn entity that points to another entity, similar to a Window's Short Cut or a Linux/Mac Link.
org.sagebionetworks.repo.model.CodecodeAn entity where the location is composed of source code.
org.sagebionetworks.repo.model.PhenotypeDataphenotypedataUsed for phenotypic data.
org.sagebionetworks.repo.model.GenotypeDatagenotypedataUsed for genotypic data.
org.sagebionetworks.repo.model.ExpressionDataexpressiondataUsed for expression data.
org.sagebionetworks.repo.model.RObjectrobjectLanguage specific 'R' object.
org.sagebionetworks.repo.model.StudystudyUsed for a study.
org.sagebionetworks.repo.model.DatadataGeneric data.

For more information on entity types see: Synapse Entity Types.

Note that the request is a POST and the content type of the data we are sending to the service is json

In the following example we are going to create a project entity:

Request

Code Block
curl -i -k -H sessionToken:YourSessionToken -H Accept:application/json -H Content-Type:application/json -d '{"entityType": "org.sagebionetworks.repo.model.Project"}' https://repo-prod.sagebase.org/repo/v1/entity

Response

Expand
title[Click to show]
Code Block
Content-Type: application/json
Date: Wed, 29 Aug 2012 03:34:01 GMT
ETag: 0
Location: /repo/v1/entity/syn1058078
Server: Apache-Coyote/1.1
Content-Length: 396
Connection: keep-alive
{
   "createdOn":"2012-08-29T03:34:00.967Z",
   "id":"syn1058078",
   "parentId":"syn4489",
   "modifiedOn":"2012-08-29T03:34:00.967Z",
   "createdBy":"John Hill",
   "accessControlList":"/repo/v1/entity/syn1058078/acl",
   "etag":"0",
   "modifiedBy":"John Hill",
   "name":"syn1058078",
   "annotations":"/repo/v1/entity/syn1058078/annotations",
   "entityType":"org.sagebionetworks.repo.model.Project",
   "uri":"/repo/v1/entity/syn1058078"
}

 

In the above example, we created an entity with only the 'entityType' but the returned entity had many more fields set.  In the next section we will cover the basic fields of an entity.

Basic Entity Fields

The following are fields that are common to all entities and entity types:

Field NameTypeDescriptionEditableDefault Value
idStringThe ID issued to this entity by Synapse to unique identify it.  This ID is immutable and guaranteed to be unique within Synapse.  Once an ID is issue to entity the ID will never be issued to another entity even if the original entity is deleted.falseauto-generated
parentId
StringThis is the ID of this entity's parent.  This is used to build a hierarchy of entities.trueRoot folder
createdOn
ISO 8601 date-timeThe date and time when the entity was original created.falseauto-generated
modifiedOn
ISO 8601 date-timeThe date and time when the entity was last modified.falseauto-generated
createdBy
StringThe name of the user that originally created the entity.falseauto-generated
modifiedBy
StringThe name of the user that last modified the entity.falseauto-generated
name
StringThe name of the entity.  This is the most prominent fields of the entity and will show up everywhere.  Just like a file must have a unique name within a folder, an Entity must have a unique name within its parent.trueentity id
descriptionStringThe description provides more details about an Entity.  This field is very prominent on the Synapse web site.truenull
etag
StringUsed to concurrency and change detection.falseauto-generated
uri
StringRelative URI of the entity.falseauto-generated
annotations
StringThe relative URL for the entity annotations.falseauto-generated
accessControlList
StringThe relative URL for the entity Access Control List ACL.falseauto-generated

Any editable field can be set at creation time or updated.

Update an Entity

In this example we want to give our project entity from the previous example a more meaningful name (the default name is the same as the entity's id) .

Note that the request is a PUT. Also note that we add a header 'ETag' with a value that is the same as current etag of the entity.  If the entity has been modified since we last fetched it the etag will not match and we will receive a concurrent modification error.

Request

Code Block
curl -i -k -H sessionToken:YourSessionToken -H ETag:0 -H Accept:application/json -H Content-Type:application/json -X PUT -d '{
   "createdOn":"2012-08-29T03:34:00.967Z",
   "id":"syn1058078",
   "parentId":"syn4489",
   "modifiedOn":"2012-08-29T03:34:00.967Z",
   "createdBy":"John Hill",
   "accessControlList":"/repo/v1/entity/syn1058078/acl",
   "etag":"0",
   "modifiedBy":"John Hill",
   "name":"Example Project",
   "annotations":"/repo/v1/entity/syn1058078/annotations",
   "entityType":"org.sagebionetworks.repo.model.Project",
   "uri":"/repo/v1/entity/syn1058078"
}' https://repo-prod.sagebase.org/repo/v1/entity/syn1058078

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 29 Aug 2012 04:16:18 GMT
ETag: 1
Server: Apache-Coyote/1.1
Content-Length: 401
Connection: keep-alive
{
   "createdOn":"2012-08-29T03:34:00.967Z",
   "id":"syn1058078",
   "parentId":"syn4489",
   "modifiedOn":"2012-08-29T04:16:18.234Z",
   "createdBy":"John Hill",
   "accessControlList":"/repo/v1/entity/syn1058078/acl",
   "etag":"1",
   "modifiedBy":"John Hill",
   "name":"Example Project",
   "annotations":"/repo/v1/entity/syn1058078/annotations",
   "entityType":"org.sagebionetworks.repo.model.Project",
   "uri":"/repo/v1/entity/syn1058078"
}


Creating Hierarchy

Hierarchy is created in Synapse by setting the "parentId" field of an entity.  In this example we are going to create a new folder entity as a child to our project:

Request

Code Block
curl -i -k -H sessionToken:YourSessionToken -H Accept:application/json -H Content-Type:application/json -d '{"entityType": "org.sagebionetworks.repo.model.Data", "parentId":"syn1058078", "name":"Sample Data"}' https://repo-prod.sagebase.org/repo/v1/entity

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 201 Created
Content-Type: application/json
Date: Thu, 13 Sep 2012 02:33:06 GMT
ETag: c5dc66a6-c864-4886-a8f1-25c4c84ba48b
Location: /repo/v1/entity/syn1151499
Server: Apache-Coyote/1.1
Content-Length: 620
Connection: keep-alive
{
   "s3Token":"/repo/v1/entity/syn1151499/s3Token",
   "versionLabel":"0.0.0",
   "etag":"c5dc66a6-c864-4886-a8f1-25c4c84ba48b",
   "accessControlList":"/repo/v1/entity/syn1151499/acl",
   "versionUrl":"/repo/v1/entity/syn1151499/version/1",
   "modifiedBy":"John Hill",
   "entityType":"org.sagebionetworks.repo.model.Data",
   "uri":"/repo/v1/entity/syn1151499",
   "id":"syn1151499",
   "createdOn":"2012-09-13T02:33:06.314Z",
   "modifiedOn":"2012-09-13T02:33:06.314Z",
   "parentId":"syn1058078",
   "versions":"/repo/v1/entity/syn1151499/version",
   "createdBy":"John Hill",
   "name":"Sample Data",
   "annotations":"/repo/v1/entity/syn1151499/annotations",
   "versionNumber":1
}


Entity Annotations

Get Annotations

First get the current annotations for your newly created data entity.

Request

Code Block
curl -i -k -H sessionToken:YourSessionToken -H Accept:application/json https://repo-prod.sagebase.org/repo/v1/entity/syn1151499/annotations

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 13 Sep 2012 02:38:03 GMT
ETag: c5dc66a6-c864-4886-a8f1-25c4c84ba48b
Server: Apache-Coyote/1.1
Content-Length: 244
Connection: keep-alive
{
   "id":"syn1151499",
   "creationDate":"1347503586314",
   "stringAnnotations":{
   },
   "dateAnnotations":{
   },
   "etag":"c5dc66a6-c864-4886-8f1-25c4c84ba48b",
   "doubleAnnotations":{
   },
   "longAnnotations":{
   },
   "blobAnnotations":{
   },
   "uri":"/entity/syn1151499/annotations"
}


Update Annotations

Then you add new annotations to the existing annotations, or modify the existing annotations, and do a PUT. Note that annotation values must always be arrays even if the array is only of length one.

Request

Code Block
curl -i -k -H sessionToken:YourSessionToken -H ETag:843bddfc-d6f8-45d2-b88e-09b4aa27a1cf -H Accept:application/json -H Content-Type:application/json -X PUT -d '
{
   "id":"syn1151499",
   "creationDate":"1347503586314",
   "stringAnnotations":{
      "stringExampleA":[
         "one",
         "two"
      ],
      "stringExampleB":[
         "cat",
         "dog"
      ]
   },
   "dateAnnotations":{
      "dateExample":[
         1347519600000,
         1347606000000
      ]
   },
   "etag":"843bddfc-d6f8-45d2-b88e-09b4aa27a1cf",
   "doubleAnnotations":{
      "floatExample":[
         1.234,
         99.789
      ]
   },
   "longAnnotations":{
      "longExample":[
         123,
         456879
      ]
   },
   "blobAnnotations":{

   },
   "uri":"/entity/syn1151499/annotations"
}' https://repo-prod.sagebase.org/repo/v1/entity/syn1151499/annotations

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 13 Sep 2012 02:51:54 GMT
ETag: 2526dd09-565e-4989-b8c4-a82e724672c6
Server: Apache-Coyote/1.1
Content-Length: 403
Connection: keep-alive
{
   "id":"syn1151499",
   "creationDate":"1347503586314",
   "stringAnnotations":{
      "stringEampleB":[
         "cat",
         "dog"
      ],
      "stringExampleA":[
         "one",
         "two"
      ]
   },
   "dateAnnotations":{
      "dateEample":[
         1347519600000,
         1347606000000
      ]
   },
   "etag":"2526dd09-565e-4989-b8c4-a82e72467c6",
   "doubleAnnotations":{
      "floatExample":[
         1.234,
         99.789
      ]
   },
   "longAnnotations":{
      "longExample":[
         123,
         456879
      ]
   },
   "blobAnnotations":{

   },
   "uri":"/entity/syn1151499/annotations"
}


Set Entity Location

In this example we will be uploading a simple text file with the following content:

Code Block
Some simple text!

We will need to know the md5 of our file before we start.  For this example the text the MD5 is:

Code Block
6b65ca38d3596e0e0e6e1ed3cfa981eb

There are three steps required to set an Entity's location data:

  1. Create an S3 Token.  We will use this token to upload the file to Amazon's S3.
    1. Request

      Code Block
      curl -i -k -H sessionToken:YourSessionToken -H Accept:application/json -H Content-Type:application/json -d '{"path": "SampleTextFile.txt", "md5":"6b65ca38d3596e0e0e6e1ed3cfa981eb"}' https://repo-prod.sagebase.org/repo/v1/entity/syn1151499/s3Token

      Response

      Expand
      title[Click to show]
      Code Block
      {
         "sessionToken":"AQoDYXdzEG4asAKFXWZXVmnAG7q1zyUzRjVz6rnN6wIRT0msXgSRBC3suTAItfuQjJRv9YOAw3Fr4nlJL2HAnRbNvF1NC4xnW5+j6VUNnJYGtZUj+wii+bTGYncNrruXLxqqLM8Kg/dmGQGWluVZkYy7rLDbofrWcWunRjSYBb7uEe74EURM1jg1ae3qMnNgwBUHWJvJb1AjOojpNujh0N5KX0C3ux6VCDcFrgHR6K+siyfiPqSW25XmabA5jGAnV6EGXn1iazywrl2ZW8z+fYAZB1kgsoTCQgCZMsPxpXxh/BdQi7cc7rwflCr/P1wD51N9PGFakFhJkbm8glGhE+YQDYEOpvRmOF0+S2+xrstIzsEAoZ5NXmMg97pqOWx1sBQVvKp8NXgdkXn422CFJLFPW8u+Vd/HzO6EILnQxYIF",
         "secretAccessKey":"XXXXXXXXXXXXXXXXX",
         "bucket":"proddata.sagebase.org",
         "path":"/1151499/1159148/SampleTextFile.txt",
         "accessKeyId":"XXXXXXXXXXXXXXXXXXXX",
         "md5":"6b65ca38d3596e0e0e6e1ed3cfa981eb",
         "contentType":"text/plain",
         "presignedUrl":"https://s3.amazonaws.com/proddata.sagebase.org/1151499/1159148/SampleTextFile.txt?Expires=1347598777&x-amz-security-token=AQoDYXdzEG4asAKFXWZXVmnAG7q1zyUzRjVz6rnN6wIRT0msXgSRBC3suTAItfuQjJRv9YOAw3Fr4nlJL2HAnRbNvF1NC4xnW5%2Bj6VUNnJYGtZUj%2Bwii%2BbTGYncNrruXLxqqLM8Kg%2FdmGQGWluVZkYy7rLDbofrWcWunRjSYBb7uEe74EURM1jg1ae3qMnNgwBUHWJvJb1AjOojpNujh0N5KX0C3ux6VCDcFrgHR6K%2BsiyfiPqSW25XmabA5jGAnV6EGXn1iazywrl2ZW8z%2BfYAZB1kgsoTCQgCZMsPxpXxh%2FBdQi7cc7rwflCr%2FP1wD51N9PGFakFhJkbm8glGhE%2BYQDYEOpvRmOF0%2BS2%2BxrstIzsEAoZ5NXmMg97pqOWx1sBQVvKp8NXgdkXn422CFJLFPW8u%2BVd%2FHzO6EILnQxYIF&AWSAccessKeyId=ASIAIGRZMDNEEK777KGA&Signature=c%2BC0HOBQ2MOzS4L89ev4OPbzD1w%3D"
      }
  2. Use the "presignedUrl" from the previous step to upload the file to Amazon S3:  Note: For more information on uploading files to S3 see: http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
    1. Request

      Code Block
      curl -v -k -X PUT -H Content-MD5:a2XKONNZbg4Obh7Tz6mB6w== -H x-amz-acl:bucket-owner-full-control -H Content-Type:text/plain --data-ascii SampleTextFile.txt https://s3.amazonaws.com/proddata.sagebase.org/1151499/1159148/SampleTextFile.txt?Expires=1347598777&x-amz-security-token=AQoDYXdzEG4asAKFXWZXVmnAG7q1zyUzRjVz6rnN6wIRT0msXgSRBC3suTAItfuQjJRv9YOAw3Fr4nlJL2HAnRbNvF1NC4xnW5%2Bj6VUNnJYGtZUj%2Bwii%2BbTGYncNrruXLxqqLM8Kg%2FdmGQGWluVZkYy7rLDbofrWcWunRjSYBb7uEe74EURM1jg1ae3qMnNgwBUHWJvJb1AjOojpNujh0N5KX0C3ux6VCDcFrgHR6K%2BsiyfiPqSW25XmabA5jGAnV6EGXn1iazywrl2ZW8z%2BfYAZB1kgsoTCQgCZMsPxpXxh%2FBdQi7cc7rwflCr%2FP1wD51N9PGFakFhJkbm8glGhE%2BYQDYEOpvRmOF0%2BS2%2BxrstIzsEAoZ5NXmMg97pqOWx1sBQVvKp8NXgdkXn422CFJLFPW8u%2BVd%2FHzO6EILnQxYIF&AWSAccessKeyId=ASIAIGRZMDNEEK777KGA&Signature=c%2BC0HOBQ2MOzS4L89ev4OPbzD1w%3D
      
      
  3. Once the file has been successfully uploaded to S3 update the Entity using the S3 Token:
    1. Request

      Code Block
      curl -i -k -H sessionToken:YourSessionToken -H ETag:2526dd09-565e-4989-b8c4-a82e724672c6 -H Accept:application/json -H Content-Type:application/json -X PUT -d '{
         "s3Token":"/repo/v1/entity/syn1151499/s3Token",
         "versionLabel":"0.0.0",
         "etag":"2526dd09-565e-4989-b8c4-a82e724672c6",
         "accessControlList":"/repo/v1/entity/syn1151499/acl",
         "versionUrl":"/repo/v1/entity/syn1151499/version/1",
         "modifiedBy":"John Hill",
         "contentType":"text/plain",
         "entityType":"org.sagebionetworks.repo.model.Data",
         "uri":"/repo/v1/entity/syn1151499",
         "id":"syn1151499",
         "createdOn":"2012-09-12T19:33:06.314-07:00",
         "modifiedOn":"2012-09-12T19:44:39.544-07:00",
         "parentId":"syn1058078",
         "versions":"/repo/v1/entity/syn1151499/version",
         "createdBy":"John Hill",
         "locations":[
            {
               "path":"/1151499/1158826/SampleTextFile.txt",
               "type":"awss3"
            }
         ],
         "name":"Sample Data",
         "md5":"6b65ca38d3596e0e0e6e1ed3cfa981eb",
         "annotations":"/repo/v1/entity/syn1151499/annotations",
         "versionNumber":1
      }' https://repo-prod.sagebase.org/repo/v1/entity/syn1151499

      Response

      Expand
      title[Click to show]
      Code Block
      HTTP/1.1 200 OK
      Content-Type: application/json
      Date: Thu, 13 Sep 2012 05:10:20 GMT
      ETag: 0bf4af7b-0dc9-4c5c-9454-3931bcf08a17
      Server: Apache-Coyote/1.1
      Content-Length: 1382
      Connection: keep-alive
      {
         "s3Token":"/repo/v1/entity/syn1151499/s3Token",
         "versionLabel":"0.0.0",
         "etag":"0bf4af7b-0dc9-4c5c-9454-3931bcf08a17",
         "accessControlList":"/repo/v1/entity/syn1151499/acl",
         "versionUrl":"/repo/v1/entity/syn1151499/version/1",
         "modifiedBy":"John Hill",
         "contentType":"text/plain",
         "entityType":"org.sagebionetworks.repo.model.Data",
         "uri":"/repo/v1/entity/syn1151499",
         "id":"syn1151499",
         "createdOn":"2012-09-13T02:33:06.314Z",
         "modifiedOn":"2012-09-13T05:12:26.121Z",
         "parentId":"syn1058078",
         "versions":"/repo/v1/entity/syn1151499/version",
         "createdBy":"John Hill",
         "locations":[
            {
               "path":"https://s3.amazonaws.com/proddata.sagebase.org/1151499/1158826/SampleTextFile.txt?Expires=1347599546&x-amz-security-token=AQoDYXdzEG4asAKml38O7Ej08SS50xD7p84phJD9YjcylB6FmjsrDCyGKdb7rpC8GsZloCFT3jd5pVdLDMo58SgDFYNPZjGzg%2BpA6AWk0HTIirwdJvQCdq2KnImv3NMWmvnULs%2B%2Fbbkl6V6C0EPK5W8EhZsCtH55zuOofEpVnNk9BrhhU0VcmStaCevCv6eaCHJw5DsmIsnOlKswGnoibuEAh7WA2JTTU4sg6aDrzYCnDL6MgGxxtnNw7%2B5N9GPmrfLRk7NdqqF2NulYpv%2BH5ZmALdW1YjRAB8C9o9SGPX8nQci1e2r5cGIJyNc6kuw1Fzs0vhRKBH3Jz%2FMR3hdqE7zQmMp5x%2F4eAtgm09GKhPC1kH%2BJdrMFP0i6N%2BmPsQVF4lNx0yhVCwIbC%2BRxYFAIzmiredqAKbvhsOKeILrWxYIF&AWSAccessKeyId=ASIAJNRHQYY4PXQAD3YA&Signature=jtY54hJMHqhWoBiHEsbVIUWipuQ%3D",
               "type":"awss3"
            }
         ],
         "name":"Sample Data",
         "md5":"6b65ca38d3596e0e0e6e1ed3cfa981eb",
         "annotations":"/repo/v1/entity/syn1151499/annotations",
         "versionNumber":1
      }

Versions Create/Read/Update/Delete (and Promote)

Any leaf entity that is version-able will have additional metada. Here is the JSON schema for these additional fields:

Code Block
{
  "properties": {
    "versionLabel": {"type": "string"},
    "versionNumber": {"type": "number"},
    "versionUrl": {"type": "string"},
    "versions": {"type": "string"},
    "versionComment" {"type": "string"},
  },
  "type": "object"
}

Field Name

User Provided / Auto-generated

Description

versionLabel

User Provided

The user visible label for this revision. It is up to the user to provide a meaningful label

versionComment

User Provided

The user provided comment for this version. For example, what is this version, and why was it created?

versionNumber

Auto-generate

The contiguous number representing this version. The first version will be '1', followed by '2'...'n'

versionUrl

Auto-generated

The URL that can be used to fetch this version of the entity

versions

Auto-generated

The URL to list all versions of this entity

Version-able Entity Metadata

For version-able Entities, some metadata applies to the root object and is therefore version independent, while other metadata applies to the version and is therefore, version dependent. For example, the Access Control List (ACL) of an entity is version independent. This means it is not possible to apply different permissions to different versions of an entity. While the Annotations of an entity are version dependent. This means each version of the same entity can have different Annotations. The following table lists the various entity metadata and whether it is version dependent or independent.

Metadata

Version Dependent /Independent

Implications

Access Control List

Independent

Access to all versions is controlled with a single ACL

Name

Independent

One name applies to all versions of an entity

Description

Independent

One description applies to all versions of an entity

Created-On

Independent

An entity can only be created once

Created-By

Independent

An entity can only be created once

Parent-Id

Independent

All version of an entity must have the same parent

Annotations

Dependent

Each version of an entity can have its own annotations

Modified-By

Dependent

First set when a new version is created, and updated every time its version is change. Once a new version is created the Modified-By fields of older versions will remain static as older versions are immutable

Modified-On

Dependent

First set when a new version is created, and updated every time its version is change. Once a new version is created the Modified-On fields of older versions will remain static as older versions are immutable

All Entity specific matadata

Dependent

Each version of an entity can have its own values for all entity specific metadata. For example, the Location.path can have a unique value for each version.

Current API

The following table describes how versioning effects the current entity CRUD API:

URL

HTTP Type

Description

/{entityType}

POST

Creates a new entity of the given {entityType}. For version-able entities, this will create the first version of this entity. This entity will have a versionNumber=1

/{entityType}

GET

Get a list of all entities of the given type: {entityType}. For version-able entity types, this will list the current version of each entity of that type.

/{entityType}/{id}

GET

Get an entity using its type and id. For version-able entities this will return the current version of the entity.

/{entityType}/{id}

PUT

Update the entity identified by type and id. For a version-able entity this will update the current version of the entity.

/{entityType}/{id}

DELETE

Delete the entity identified by type and id. For a version-able entity this will delete the entity and all versions of the entity.

/{entityType}/{id}/annotations

GET

Get the annotations for the entity identified by type and id. For a version-able entity this will return the annotations of the current entity.

/{entityType}/{id}/annotations

PUT

Update the annotations for the entity identified by type and id. For a version-able entity this will update the annotations of the current entity.

Version-able Additions to the API

The following table describes the new methods for manipulating the versions of a version-able entity.

URL

HTTP Type

Description

/{versionable-entityType}/{entityId}/version

PUT

Create a new version of a given version-able entity. The user should provide a versionLabel and Synapse will auto-generate a new versionNumber. When this called on a version-able entity, the annotations of the current entity will be copied and applied to the newly created version.

/{versionable-entityType}/{entityId}/version

GET

Returns a list of all versions of this entity. This will be a paginated list with a default sort on versionNumber descending

/{versionable-entityType}/{entityId}/version/{versionNumber}

GET

Get a particular version of a version-able entity using the given id and version number. Note that the specific version fetched cannot be used to update the current version. Instead, promote it to the current version.

/{versionable-entityType}/{entityId}/version/{versionNumber}

PUT

Not supported! Only the current version of an entity can be updated using the existing API.

/{versionable-entityType}/{entityId}/version/{versionNumber}

DELETE

Delete a particular version of a version-able entity using the given id and version number.

/{versionable-entityType}/{entityId}/version/{versionNumber}/annotations

GET

Get the annotations of a particular version of a version-able entity using the given id and version number.

/{versionable-entityType}/{entityId}/version/{versionNumber}/annotations

PUT

Not Supported! You can only change the annotations of the current version.

/{versionable-entityType}/{entityId}/promoteVersion/{versionNumber}POSTPromote the specified versionNumber to be the current version. Effectively, this just changes the number of that version to be current + 1.

Version API Examples:

Get the Location to Version

Get the location object we created earlier:

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:48 GMT
ETag: 0
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": "0",
  "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=1317918889&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=2vTczuWgJ88Z0tiau1%2BPse4L2NA%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"
}


Create New Version

To create a new version of a location, we set the version comment and label. We also want to set a new path for this version:

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H ETag:0 -H Accept:application/json -H Content-Type:application/json -X PUT -d '{
  "contentType": "application/zip",
  "etag": "0",
  "id": "17338",
  "md5sum": "b513a23fc54b7b0d65312e1a900af5a6",
  "name": "17338",
  "parentId": "17337",
  "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/17338/0.0.2/mskcc_prostate_cancer.phenotype.zip?Expires=1317918889&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=2vTczuWgJ88Z0tiau1%2BPse4L2NA%3D",
  "type": "awss3",
  "uri": "/repo/v1/location/17338",
  "versionComment": "The second version of this location.",
  "versionLabel": "0.0.2"
}' https://repo-staging.sagebase.org/repo/v1/location/17338/version

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:49 GMT
ETag: 1
Server: Apache-Coyote/1.1
transfer-encoding: chunked
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.2/mskcc_prostate_cancer.phenotype.zip?Expires=1317918889&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=o9gfXP8rb35RRxrNSrjaW0EpBGM%3D",
  "type": "awss3",
  "uri": "/repo/v1/location/17338",
  "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"
}


List Versions

List all of the version of this location. The current version will be the first in the list:

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version'

Response

Expand
title[Click to show]
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": [
    {
      "id": "17338",
	  "modifiedOn": "2012-09-13T05:12:26.121Z",
	  "modifiedByPrincipalId": "John Hill",
      "versionComment": "The second version of this location.",
      "versionLabel": "0.0.2",
      "versionNumber": 2
    },
    {
      "id": "17338",
	  "modifiedOn": "2012-10-13T06:12:16.001Z",
	  "modifiedByPrincipalId": "John Hill",
      "versionComment": null,
      "versionLabel": "0.0.0",
      "versionNumber": 1
    }
  ],
  "totalNumberOfResults": 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

Expand
title[Click to show]
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=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"
}


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:

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version/1/annotations'

Response

Expand
title[Click to show]
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: 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

Expand
title[Click to show]
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

Promote a Version

To promote a specific version we must provide the version number.  Note: you can promote the current version of an entity, but it is a no-op

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json -X DELETE https://repo-staging.sagebase.org/repo/v1/location/17338/promoteVersion/1

Response

Expand
Code Block
TODO!!!!

Finally List Versions Again

List all of the version of this location. Since we deleted the first version, only the second remains:

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/17338/version'

Response

Expand
title[Click to show]
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": [{
    "id": "17338",
	"modifiedOn": "2012-09-13T05:12:26.121Z",
	"modifiedByPrincipalId": "John Hill",
    "versionComment": "The second version of this location.",
    "versionLabel": "0.0.2",
    "versionNumber": 2
  }],
  "totalNumberOfResults": 1
}


Delete a Project

Note that the request is a DELETE and no content is returned. Also note that this will delete all of the datasets layers, etc.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json -X DELETE https://repo-staging.sagebase.org/repo/v1/project/17334

Response

Expand
title[Click to show]
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:52 GMT
Server: Apache-Coyote/1.1
Connection: keep-alive


Query API

The Query API is loosely modeled after Facebook's Query Language.

Examples

'Select *' Query

These queries are generally of the form:

Code Block
SELECT * FROM <data type> [LIMIT <#>] [OFFSET <#>]


Currently supported data types:

<data type>
project
folder

file

entity

 

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+dataset+limit+3+offset+1'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:58 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "dataset.Disease": ["Cancer"],
      "dataset.Institution": ["Memorial Sloan Kettering Cancer Center"],
      "dataset.Internal_Name": ["Prostate cancer-MSKCC"],
      "dataset.Number_of_Samples": [261],
      "dataset.Posting_Restriction": ["unspecified"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Prostate"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3733/acl",
      "dataset.citation": ["Integrative genomic profiling of human prostate cancer. Taylor BS et al., Cancer Cell. 2010 Jul 13;18(1):11-22.  "],
      "dataset.creationDate": 1312573506326,
      "dataset.creator": "Charles Sawyers",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "Genetic and epigenetic alterations have been identified that lead to transcriptional Annotation of prostate cancer genomes provides a foundation for discoveries that can impact disease understanding and treatment. Concordant assessment of DNA copy number, mRNA expression, and focused exon resequencing in the 218 prostate cancer tumors represented in this dataset haveidentified the nuclear receptor coactivator NCOA2 as an oncogene in approximately 11% of tumors. Additionally, the androgen-driven TMPRSS2-ERG fusion was associated with a previously unrecognized, prostate-specific deletion at chromosome 3p14 that implicates FOXP1, RYBP, and SHQ1 as potential cooperative tumor suppressors. DNA copy-number data from primary tumors revealed that copy-number alterations robustly define clusters of low- and high-risk disease beyond that achieved by Gleason score.  ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3733",
      "dataset.last_modified_date": [1243987200000],
      "dataset.layers": "/repo/v1/dataset/3733/layer",
      "dataset.locations": "/repo/v1/dataset/3733/location",
      "dataset.name": "MSKCC Prostate Cancer",
      "dataset.number_of_downloads": [32],
      "dataset.number_of_followers": [7],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [20579941],
      "dataset.releaseDate": 1234137600000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["Metabolic Disease"],
      "dataset.Institution": ["UCLA/  Merck & Co."],
      "dataset.Internal_Name": ["BxD"],
      "dataset.Number_of_Samples": [111],
      "dataset.Posting_Restriction": ["No Restriction"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Mouse"],
      "dataset.Tissue_Tumor": ["Liver"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3735/acl",
      "dataset.citation": ["Genetic loci determining bone density in mice with diet-induced atherosclerosis.  Drake TA, Schadt E, Hannani K, Kabo JM, Krass K, Colinayo V, Greaser LE 3rd, Goldin J, Lusis AJ. Physiol Genomics. 2001 Apr 27;5(4):205-15. PMID: 11328966   Genetics of gene expression surveyed in maize, mouse and man. Schadt EE, Monks SA, Drake TA, Lusis AJ, Che N, Colinayo V, Ruff TG, Milligan SB, Lamb JR, Cavet G, Linsley PS, Mao M, Stoughton RB, Friend SH. Nature. 2003 Mar 20;422(6929):297-302.PMID: 12646919 "],
      "dataset.creationDate": 1312573523697,
      "dataset.creator": "Jake Lusis/ Merck & Co.",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "111 female F2 progeny of a C57BL/6J and DBA/2J intercross were examined for multiple measures of femoral bone mass, density, and biomechanical properties using both computerized tomographic and radiographic methods. In addition, body weight and length, adipose tissue mass, plasma lipids and insulin, and aortic fatty lesions were assessed. Mice were on a rodent chow diet up to 12 months of age, and then switched to an atherogenic high-fat, high-cholesterol diet for another 4 months. Mice were killed at 16 months of age.  Liver tissue was profiled for expression traits using a custom mouse gene oligonucleotide microarray (Rosetta Inpharmatics) that contained 23,574 non-control oligonucleotide probes for mouse genes and 2,186 control probes. All microarrays were custom ink-jet microarrays fabricated by Agilent Technologies. A complete linkage map for all chromosomes except Y in mouse was constructed at an average density of 13cM using microsatellite markers. ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3735",
      "dataset.last_modified_date": [1318291200000],
      "dataset.layers": "/repo/v1/dataset/3735/layer",
      "dataset.locations": "/repo/v1/dataset/3735/location",
      "dataset.name": "Mouse Model of Diet-Induced Atherosclerosis",
      "dataset.number_of_downloads": [60],
      "dataset.number_of_followers": [101],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [18406497],
      "dataset.releaseDate": 1273276800000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["CVD"],
      "dataset.Institution": ["UCLA/  Merck & Co."],
      "dataset.Internal_Name": ["BxH ApoE"],
      "dataset.Number_of_Samples": [334],
      "dataset.Posting_Restriction": ["No Restriction"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Mouse"],
      "dataset.Tissue_Tumor": [
        "Adipose",
        "Liver",
        "Brain",
        "Muscle"
      ],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3736/acl",
      "dataset.citation": ["Integrating genetic and network analysis to characterize genes related to mouse weight. Ghazalpour, A., et al., PLoS Genet, 2006. 2(8): p. e130.  Dosage compensation is less effective in birds than in mammals. Itoh, Y., et al., J Biol, 2007. 6(1): p. 2.  Elucidating the murine brain transcriptional network in a segregating mouse population to identify core functional modules for obesity and diabetes.  Lum, P.Y., et al., J Neurochem, 2006. 97 Suppl 1: p. 50-62.  Identification of Abcc6 as the major causal gene for dystrophic cardiac calcification in mice through integrative genomics. Meng, H., et al. Proc Natl Acad Sci U S A, 2007. 104(11): p. 4530-5.  Mapping the genetic architecture of gene expression in human liver. Schadt, E.E., et al.,  PLoS Biol, 2008. 6(5): p. e107.  Elucidating the role of gonadal hormones in sexually dimorphic gene coexpression networks.  van Nas, A., et al., Endocrinology, 2009. 150(3): p. 1235-49.  Identification of pathways for atherosclerosis in mice: integration of quantitative trait locus analysis and global gene expression data. Wang, S.S., et al., Circ Res, 2007. 101(3): p. e11-30.  Tissue-specific expression and regulation of sexually dimorphic genes in mice. Yang, X., et al., Genome Res, 2006. 16(8): p. 995-1004. "],
      "dataset.creationDate": 1312573525824,
      "dataset.creator": "Jake Lusis/ Merck & Co.",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "C57BL/6J and C3H/HeJ inbred mouse strains exhibit dramatically different cardiovascular and metabolic phenotypes on the hyperlipidemic apolipoprotein E (Apoe) null background.  In order to identify the genes that contribute to these differences, we constructed an F2 intercross between the B6.Apoe-/- and C3H.Apoe-/- strains consisting of 334 animals.  The mice were fed on a chow diet until 8 weeks of age, then fed a high fat (42% fat) \"western\" diet for 16 weeks to exacerbate the phenotypes and euthanized at 24 weeks of age via cervical dislocation.  Prior to death, mice were fasted for 4 hours in the morning, anesthetized using Isoflurane, and weighed.   Blood was collected by retro-orbital bleed; plasma was frozen at -800C.  We measured plasma cholesterol, HDL, LDL, triglycerides, free fatty acids, glucose, insulin, leptin, adiponectin and PON1 activity levels.  Liver, brain, skeletal muscle (hamstring) and adipose (gonadal fat pad) were flash frozen in liquid nitrogen. RNA was isolated from the tissues using the Trizol method and utilized in microarray analysis on a custom 60mer Agilent chip (reference for chip would be useful).  Hepatic cholesterol, triglyceride and free fatty acid levels were also measured.  Hearts and aortae were extracted, perfused and fixed for atherosclerotic lesion analysis.  The aortic arch was serially sectioned through to the aortic sinus with every fifth 10um section stained with hematoxylin and oil-red-o, which specifically stains lipids.  Slides were examined by light microscopy.  The fatty streak lesion area was quantified using an ocular with a grid; forty sections per mouse were quantified and averaged.  Vascular calcification and aneurysm formation were also measured in a semi-quantitative manner based on presence or absence and size or severity. DNA was isolated from kidney using a phenol chloroform extraction method.  The mice were genotyped at 1500 SNPs using the ParAllele molecular inversion probe technology; 1353 SNPs passed quality control for a final marker density of 1.5cM. ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3736",
      "dataset.last_modified_date": [1320796800000],
      "dataset.layers": "/repo/v1/dataset/3736/layer",
      "dataset.locations": "/repo/v1/dataset/3736/location",
      "dataset.name": "Mouse Model of Sexually Dimorphic Atherosclerotic Traits",
      "dataset.number_of_downloads": [24],
      "dataset.number_of_followers": [93],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [19147482],
      "dataset.releaseDate": 1252454400000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 122
}


'Order By' Query

These queries are generally of the form:

Code Block
SELECT * FROM <data type> ORDER BY <field name> [ASC|DESC] [LIMIT <#>] [OFFSET #]

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+dataset+order+by+Number_of_Samples+DESC+limit+3+offset+1'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:58 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "dataset.Disease": ["Multiple"],
      "dataset.Institution": ["NHLBI"],
      "dataset.Internal_Name": ["Framingham"],
      "dataset.Number_of_Samples": [5000],
      "dataset.Posting_Restriction": ["Link to data source"],
      "dataset.QC_statistician": [""],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Blood"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3780/acl",
      "dataset.citation": ["Genetics of the Framingham Heart Study population.  Govindaraju DR, Cupples LA, Kannel WB, O'Donnell CJ, Atwood LD, D'Agostino RB Sr, Fox CS, Larson M, Levy D, Murabito J, Vasan RS, Splansky GL, Wolf PA, Benjamin EJ.Adv Genet. 2008;62:33-65.  http://www.framinghamheartstudy.org/ "],
      "dataset.creationDate": 1312573648469,
      "dataset.creator": "Dan Levy",
      "dataset.curator": [""],
      "dataset.description": "The Framingham Heart Study comprises a longitudinal three-generation population study (n~15,000). Genotyping at 500K SNPs is available for ~9,500 individuals and gene expression for blood on 5,000-7,000. Phenotypes in the cohort include serum lipid/cholesterol, CRP, glucose levels, adiposity measures, hypertension, T2D, chronic kidney disease, imaging measures and heart disease outcomes (MI, failure) ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": false,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": false,
      "dataset.id": "3780",
      "dataset.last_modified_date": [1244332800000],
      "dataset.layers": "/repo/v1/dataset/3780/layer",
      "dataset.locations": "/repo/v1/dataset/3780/location",
      "dataset.name": "Framingham Heart Study",
      "dataset.number_of_downloads": [42],
      "dataset.number_of_followers": [115],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [18201960],
      "dataset.releaseDate": 1212624000000,
      "dataset.status": "Future",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["Cancer"],
      "dataset.Institution": ["Asian Cancer Research Group, Inc., (ACRG)"],
      "dataset.Internal_Name": ["ACRG_gastric"],
      "dataset.Number_of_Samples": [2000],
      "dataset.Posting_Restriction": ["unspecified"],
      "dataset.QC_statistician": [""],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Stomach"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3758/acl",
      "dataset.citation": ["This study is not yet published. "],
      "dataset.creationDate": 1312573600445,
      "dataset.creator": "Asian Cancer Research Group, Inc., (ACRG)",
      "dataset.curator": [""],
      "dataset.description": "Eli Lilly and Company, Merck, and Pfizer Inc. have formed the Asian Cancer Research Group, Inc., (ACRG), an independent, not-for-profit company established to accelerate research and ultimately improve treatment for patients affected with the most commonly-diagnosed cancers in Asia. Over the next two years ACRG have committed to create one of the most extensive pharmacogenomic cancer databases known to date. This database will be composed of data from approximately 2,000 tissue samples from patients with lung and gastric cancer that will be made publicly available to researchers and, over time, further populated with clinical data from a longitudinal analysis of patients. Comparison of the contrasting genomic signatures of these cancers could inform new approaches to treatment ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3758",
      "dataset.last_modified_date": [1273536000000],
      "dataset.layers": "/repo/v1/dataset/3758/layer",
      "dataset.locations": "/repo/v1/dataset/3758/location",
      "dataset.name": "Gastric Cancer ACRG",
      "dataset.number_of_downloads": [55],
      "dataset.number_of_followers": [79],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [20705566],
      "dataset.releaseDate": 1207526400000,
      "dataset.status": "Future",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["Cancer"],
      "dataset.Institution": ["Asian Cancer Research Group, Inc., (ACRG)"],
      "dataset.Internal_Name": ["ACRG_lung"],
      "dataset.Number_of_Samples": [2000],
      "dataset.Posting_Restriction": ["unspecified"],
      "dataset.QC_statistician": [""],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Lung"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3759/acl",
      "dataset.citation": ["This study is not yet published.   "],
      "dataset.creationDate": 1312573602804,
      "dataset.creator": "Asian Cancer Research Group, Inc., (ACRG)",
      "dataset.curator": [""],
      "dataset.description": "Eli Lilly and Company, Merck, and Pfizer Inc. have formed the Asian Cancer Research Group, Inc., (ACRG), an independent, not-for-profit company established to accelerate research and ultimately improve treatment for patients affected with the most commonly-diagnosed cancers in Asia. Over the next two years ACRG have committed to create one of the most extensive pharmacogenomic cancer databases known to date. This database will be composed of data from approximately 2,000 tissue samples from patients with lung and gastric cancer that will be made publicly available to researchers and, over time, further populated with clinical data from a longitudinal analysis of patients. Comparison of the contrasting genomic signatures of these cancers could inform new approaches to treatment ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3759",
      "dataset.last_modified_date": [1357776000000],
      "dataset.layers": "/repo/v1/dataset/3759/layer",
      "dataset.locations": "/repo/v1/dataset/3759/location",
      "dataset.name": "Lung Cancer ACRG",
      "dataset.number_of_downloads": [34],
      "dataset.number_of_followers": [83],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [21821572],
      "dataset.releaseDate": 1270252800000,
      "dataset.status": "Future",
      "dataset.version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 122
}


Single clause 'Where' Query

These queries are generally of the form:

Code Block
SELECT * FROM <data type> WHERE <expression> (AND <expression>)* [LIMIT <#>] [OFFSET #]

<expresssion> := <field name> <operator> <value>

<value> should be in quotes for strings, but not numbers (i.e. name == "Smith" AND size > 10)

Curently supported <operators> with their required URL escape codes:

Operator

Value

URL Escape Code

Equal

==

%3D%3D

Does Not equal

!=

!%3D

Greater Than

>

%3E

Less than

<

%3C

Greater than or equals

>=

%3E%3D

Less than or equals

<=

%3C%3D

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+dataset+where+name+==+%22MSKCC+Prostate+Cancer%22'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:58 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [{
    "dataset.Disease": ["Cancer"],
    "dataset.Institution": ["Memorial Sloan Kettering Cancer Center"],
    "dataset.Internal_Name": ["Prostate cancer-MSKCC"],
    "dataset.Number_of_Samples": [261],
    "dataset.Posting_Restriction": ["unspecified"],
    "dataset.QC_statistician": ["Solly Sieberts"],
    "dataset.Species": ["Human"],
    "dataset.Tissue_Tumor": ["Prostate"],
    "dataset.Type": ["GCD"],
    "dataset.accessControlList": "/repo/v1/dataset/3733/acl",
    "dataset.citation": ["Integrative genomic profiling of human prostate cancer. Taylor BS et al., Cancer Cell. 2010 Jul 13;18(1):11-22.  "],
    "dataset.creationDate": 1312573506326,
    "dataset.creator": "Charles Sawyers",
    "dataset.curator": ["Matt Furia"],
    "dataset.description": "Genetic and epigenetic alterations have been identified that lead to transcriptional Annotation of prostate cancer genomes provides a foundation for discoveries that can impact disease understanding and treatment. Concordant assessment of DNA copy number, mRNA expression, and focused exon resequencing in the 218 prostate cancer tumors represented in this dataset haveidentified the nuclear receptor coactivator NCOA2 as an oncogene in approximately 11% of tumors. Additionally, the androgen-driven TMPRSS2-ERG fusion was associated with a previously unrecognized, prostate-specific deletion at chromosome 3p14 that implicates FOXP1, RYBP, and SHQ1 as potential cooperative tumor suppressors. DNA copy-number data from primary tumors revealed that copy-number alterations robustly define clusters of low- and high-risk disease beyond that achieved by Gleason score.  ",
    "dataset.eulaId": "3732",
    "dataset.hasClinicalData": true,
    "dataset.hasExpressionData": true,
    "dataset.hasGeneticData": true,
    "dataset.id": "3733",
    "dataset.last_modified_date": [1243987200000],
    "dataset.layers": "/repo/v1/dataset/3733/layer",
    "dataset.locations": "/repo/v1/dataset/3733/location",
    "dataset.name": "MSKCC Prostate Cancer",
    "dataset.number_of_downloads": [32],
    "dataset.number_of_followers": [7],
    "dataset.parentId": "3731",
    "dataset.pubmed_id": [20579941],
    "dataset.releaseDate": 1234137600000,
    "dataset.status": "Current",
    "dataset.version": "1.0.0"
  }],
  "totalNumberOfResults": 1
}


Multiple clause 'Where' Query

These queries are generally of the form:

Code Block
SELECT * FROM <data type> WHERE <expression> (AND <expression>)* [LIMIT <#>] [OFFSET #]

<expresssion> := <field name> <operator> <value>

<value> should be in quotes for strings, but not numbers (i.e. name == "Smith" AND size > 10)

Curently supported <operators> with their required URL escape codes:

Operator

Value

URL Escape Code

Equal

==

%3D%3D

Does Not equal

!=

!%3D

Greater Than

>

%3E

Less than

<

%3C

Greater than or equals

>=

%3E%3D

Less than or equals

<=

%3C%3D

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+dataset+where+dataset.Species+==+%22Human%22+and+dataset.Number_of_Samples+%3E+100+limit+3+offset+1'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:59 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "dataset.Disease": ["Cancer"],
      "dataset.Institution": ["Memorial Sloan Kettering Cancer Center"],
      "dataset.Internal_Name": ["Prostate cancer-MSKCC"],
      "dataset.Number_of_Samples": [261],
      "dataset.Posting_Restriction": ["unspecified"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Prostate"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3733/acl",
      "dataset.citation": ["Integrative genomic profiling of human prostate cancer. Taylor BS et al., Cancer Cell. 2010 Jul 13;18(1):11-22.  "],
      "dataset.creationDate": 1312573506326,
      "dataset.creator": "Charles Sawyers",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "Genetic and epigenetic alterations have been identified that lead to transcriptional Annotation of prostate cancer genomes provides a foundation for discoveries that can impact disease understanding and treatment. Concordant assessment of DNA copy number, mRNA expression, and focused exon resequencing in the 218 prostate cancer tumors represented in this dataset haveidentified the nuclear receptor coactivator NCOA2 as an oncogene in approximately 11% of tumors. Additionally, the androgen-driven TMPRSS2-ERG fusion was associated with a previously unrecognized, prostate-specific deletion at chromosome 3p14 that implicates FOXP1, RYBP, and SHQ1 as potential cooperative tumor suppressors. DNA copy-number data from primary tumors revealed that copy-number alterations robustly define clusters of low- and high-risk disease beyond that achieved by Gleason score.  ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3733",
      "dataset.last_modified_date": [1243987200000],
      "dataset.layers": "/repo/v1/dataset/3733/layer",
      "dataset.locations": "/repo/v1/dataset/3733/location",
      "dataset.name": "MSKCC Prostate Cancer",
      "dataset.number_of_downloads": [32],
      "dataset.number_of_followers": [7],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [20579941],
      "dataset.releaseDate": 1234137600000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["CVD"],
      "dataset.Institution": ["Vanderbilt University/ University of Pittsburg/ StJudes Hospital/ Merck & Co."],
      "dataset.Internal_Name": ["Deliver"],
      "dataset.Number_of_Samples": [517],
      "dataset.Posting_Restriction": ["Link to data source"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Liver"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3738/acl",
      "dataset.citation": ["Mapping the genetic architecture of gene expression in human liver. Eric E. Schadt, Cliona Molony, Eugene Chudin, Ke Hao, Xia Yang, Pek Y. Lum, Andrew Kasarskis, Bin Zhang, Susanna Wang, Christine Suver, Jun Zhu, Joshua Millstein, Solveig Sieberts, John Lamb, Debraj GuhaThakurta, Jonathan Derry, John D. Storey, Iliana Avila-Campillo, Mark J. Kruger, Jason M. Johnson, Carol A. Rohl, Atila van Nas, Margarete Mehrabian, Thomas A. Drake, Aldons J. Lusis, Ryan C. Smith, F. Peter Guengerich, Stephen C. Strom, Erin Schuetz, Thomas H. Rushmore, Roger Ulrich. PLoS Biol, 2008. 6(5): p. e107. PMID: 18462017 \t \t Systematic Genetic and Genomic Analysis of Cytochrome P450 Enzyme Activities in Human Liver. Xia Yang, Bin Zhang, Cliona Molony, Eugene Chudin, Ke Hao, Jun Zhu, Christine Suver, Hua Zhong, F. Peter Guengerich, Stephen C. Strom, Erin Schuetz, Thomas H. Rushmore, Roger G. Ulrich, J. Greg Slatter, Eric E. Schadt, Andrew Kasarskis, Pek Yee Lum. Genome Res. 2010 Aug;20(8):1020-36.   "],
      "dataset.creationDate": 1312573531680,
      "dataset.creator": "Fred Guengrich/Steve Strom/ Erin Schuetz/ Merck & Co.",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "The Human Liver Cohort (HLC) study aimed to characterize the genetic architecture of gene expression in human liver using genotyping, gene expression profiling, and enzyme activity measurements of Cytochrom P450. The HLC was assembled from a total of 780 liver samples screened.  These liver samples were acquired from caucasian individuals from three independant tissue collection centers.   DNA samples were genotyped on the Affymetrix 500K SNP and Illumina 650Y SNP genotyping arrays representing a total of 782,476 unique single nucleotide polymorphisms (SNPs). Only the genotype data from those samples which were collected postmortem are accessible in dbGap and here.  These 228 samples represent a subset of the 427 samples included in the Human Liver Cohort Publication (Schadt, Molony et al. 2008).  RNA samples were profiled on a custom Agilent 44,000 feature microarray composed of 39,280 oligonucleotide probes targeting transcripts representing 34,266 known and predicted genes, including high-confidence, noncoding RNA sequences. Each of the liver samples was processed into cytosol and microsomes using a standard differential centrifugation method. The activities of nine P450 enzymes (CYP1A2, 2A6, 2B6, 2C8, 2C9, 2C19, 2D6, 2E1, and 3A4) in isolated microsomes from 398 HLC liver samples were measured in the microsome preparations using probe substrate metabolism assays  expressed as nmol/min/mg protein.  Each was measured with a single substrate except for the CYP3A4 activity that was measured using two substrates, midazolam and testosterone. ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": false,
      "dataset.id": "3738",
      "dataset.last_modified_date": [1309910400000],
      "dataset.layers": "/repo/v1/dataset/3738/layer",
      "dataset.locations": "/repo/v1/dataset/3738/location",
      "dataset.name": "Human Liver Cohort",
      "dataset.number_of_downloads": [57],
      "dataset.number_of_followers": [31],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [16258887],
      "dataset.releaseDate": 1278201600000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    },
    {
      "dataset.Disease": ["Cancer"],
      "dataset.Institution": ["GlaxoSmithKline (GSK)"],
      "dataset.Internal_Name": ["GSK_Cell_Lines"],
      "dataset.Number_of_Samples": [649],
      "dataset.Posting_Restriction": ["unspecified"],
      "dataset.QC_statistician": ["Solly Sieberts"],
      "dataset.Species": ["Human"],
      "dataset.Tissue_Tumor": ["Cell Line"],
      "dataset.Type": ["GCD"],
      "dataset.accessControlList": "/repo/v1/dataset/3742/acl",
      "dataset.citation": ["This data set was generated and is provided for public use by GlaxoSmithKline.  https://cabig.nci.nih.gov/caArray_GSKdata/ "],
      "dataset.creationDate": 1312573543480,
      "dataset.creator": "Richard Wooster",
      "dataset.curator": ["Matt Furia"],
      "dataset.description": "GlaxoSmithKline (GSK) has released the genomic profiling data for over 300 cancer cell lines via the National Cancer Institute?s cancer Bioinformatics Grid? (caBIG). Cancer cell lines can be manipulated in the laboratory and have been used extensively by GSK in the discovery and development of novel cancer therapeutics. These data are available through caArray. ",
      "dataset.eulaId": "3732",
      "dataset.hasClinicalData": true,
      "dataset.hasExpressionData": true,
      "dataset.hasGeneticData": true,
      "dataset.id": "3742",
      "dataset.last_modified_date": [1252627200000],
      "dataset.layers": "/repo/v1/dataset/3742/layer",
      "dataset.locations": "/repo/v1/dataset/3742/location",
      "dataset.name": "Cancer Cell line Panel",
      "dataset.number_of_downloads": [70],
      "dataset.number_of_followers": [51],
      "dataset.parentId": "3731",
      "dataset.pubmed_id": [20290476],
      "dataset.releaseDate": 1250035200000,
      "dataset.status": "Current",
      "dataset.version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 68
}


'Select *' Query for the Layers of a Dataset

These queries are generally of the form:

Code Block
SELECT * FROM layer WHERE parentId == <parentId> [LIMIT <#>] [OFFSET <#>]

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+layer+where+layer.parentId+==+%223733%22'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:34:59 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "layer.accessControlList": "/repo/v1/layer/3880/acl",
      "layer.creationDate": 1312573857573,
      "layer.description": null,
      "layer.id": "3880",
      "layer.locations": "/repo/v1/layer/3880/location",
      "layer.name": "CNV",
      "layer.numSamples": 230,
      "layer.parentId": "3733",
      "layer.platform": "Agilent 244K array comparative genomic hybridization (aCGH) microarrays",
      "layer.previews": "/repo/v1/layer/3880/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "G",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3874/acl",
      "layer.colDesc_age": ["Age at diagnosis.."],
      "layer.colDesc_bcr_event": ["was a biochemical recurrance event detected"],
      "layer.colDesc_bcr_freetime": ["elapsed time before bichemical recurrance"],
      "layer.colDesc_chemotx": ["chemotherapy treatment"],
      "layer.colDesc_clinical_gleason_score": ["clinical tertiary gleason score"],
      "layer.colDesc_clinical_primary_gleason": ["clinical gleason score of the majority of the tumor"],
      "layer.colDesc_clinical_secondary_gleason": ["clinical gleason score of the minority of the tumor"],
      "layer.colDesc_clinical_tnm_stage_t": ["Cancer stage based on the Tumor, Node, Metastasis scoring system"],
      "layer.colDesc_copy_number_cluster": ["copy number cluster size"],
      "layer.colDesc_ethnicity": ["ethnicity of the individual"],
      "layer.colDesc_event": ["Cause of death"],
      "layer.colDesc_expression_array_tissue_source": ["Source of tissue used for expression profiling"],
      "layer.colDesc_extra_capsular_extension": ["extra-capsular extension: cancer extending beyond the prostate capsule"],
      "layer.colDesc_hormtx": ["Hormone treatment"],
      "layer.colDesc_metastatic_site": ["Site in the body where metastatic tumor was detected."],
      "layer.colDesc_metsevent": ["metastatic event"],
      "layer.colDesc_neoadjradtx": ["neo-adjuvant treatment"],
      "layer.colDesc_nomogram_nomopred_extra_capsular_extension": ["probability of extra capsular extension"],
      "layer.colDesc_nomogram_nomopred_lni": ["probability of lymph node involvement"],
      "layer.colDesc_nomogram_nomopred_ocd": ["probability of organ confined disease"],
      "layer.colDesc_nomogram_nomopred_seminal_vesicle_invasion": ["probability of seminal vesicle invasion"],
      "layer.colDesc_nomogram_pfp_postrp": ["nomogram progression-free probability post radical prostatectomy"],
      "layer.colDesc_number_nodes_positive": ["number node-positive nodes"],
      "layer.colDesc_number_nodes_removed": ["Number of cancerous nodes removed"],
      "layer.colDesc_pathologic_gleason_score": ["pathalogic tertiary gleason score"],
      "layer.colDesc_pathologic_primary_gleason": ["pathalogic gleason score of the majority of the tumor"],
      "layer.colDesc_pathologic_secondary_gleason": ["pathalagic gleason score of the minority of the tumor"],
      "layer.colDesc_pathologic_tnm_stage_t": ["pathologic TNM \"T\" stage"],
      "layer.colDesc_pre_treatment_psa": ["Prostate specific antigen level prior to treatment"],
      "layer.colDesc_predxbxpsa": ["PSA prior to diagnostic biopsy"],
      "layer.colDesc_radtxtype": ["radiation treatment type"],
      "layer.colDesc_rp_type": ["Surgical treatment. RP=radical prostatectomy, LP=laproscopic prostatectomy, SALRP=Salvage radical prostatectomy"],
      "layer.colDesc_sample_type": ["Type of sample that was profiled. One of: Benign=benign tumor ,CELL LINE=cancer cell line , MET=metastatic tumor, PRIMARY=primary tumor or XENOGRAFT. "],
      "layer.colDesc_seminal_vesicle_invasion": ["seminal vesicle invasion. Either \"positive\" or \"negative\""],
      "layer.colDesc_sms": ["somatostatin"],
      "layer.colDesc_survtime": ["Survival time post-diagnosis"],
      "layer.colDesc_tnm_stage_n": ["TNM \"N\" stage"],
      "layer.colUnits_age": ["years"],
      "layer.colUnits_bcr_event": ["factor"],
      "layer.colUnits_bcr_freetime": ["years"],
      "layer.colUnits_chemotx": ["factor"],
      "layer.colUnits_clinical_gleason_score": ["factor"],
      "layer.colUnits_clinical_primary_gleason": ["factor"],
      "layer.colUnits_clinical_secondary_gleason": ["factor"],
      "layer.colUnits_clinical_tnm_stage_t": ["factor"],
      "layer.colUnits_copy_number_cluster": ["factor"],
      "layer.colUnits_ethnicity": ["factor"],
      "layer.colUnits_event": ["factor"],
      "layer.colUnits_expression_array_tissue_source": ["factor"],
      "layer.colUnits_extra_capsular_extension": ["factor"],
      "layer.colUnits_hormtx": ["factor"],
      "layer.colUnits_metastatic_site": ["factor"],
      "layer.colUnits_metsevent": ["factor"],
      "layer.colUnits_neoadjradtx": ["factor"],
      "layer.colUnits_nomogram_nomopred_extra_capsular_extension": ["probability"],
      "layer.colUnits_nomogram_nomopred_lni": ["probability"],
      "layer.colUnits_nomogram_nomopred_ocd": ["probability"],
      "layer.colUnits_nomogram_nomopred_seminal_vesicle_invasion": ["probability"],
      "layer.colUnits_nomogram_pfp_postrp": ["probability"],
      "layer.colUnits_number_nodes_positive": ["count"],
      "layer.colUnits_number_nodes_removed": ["count"],
      "layer.colUnits_pathologic_gleason_score": ["factor"],
      "layer.colUnits_pathologic_primary_gleason": ["factor"],
      "layer.colUnits_pathologic_secondary_gleason": ["factor"],
      "layer.colUnits_pathologic_tnm_stage_t": ["factor"],
      "layer.colUnits_pre_treatment_psa": ["ng/mL"],
      "layer.colUnits_predxbxpsa": ["ng/mL"],
      "layer.colUnits_radtxtype": ["factor"],
      "layer.colUnits_rp_type": ["factor"],
      "layer.colUnits_sample_type": ["factor"],
      "layer.colUnits_seminal_vesicle_invasion": ["factor"],
      "layer.colUnits_sms": ["factor"],
      "layer.colUnits_survtime": ["months"],
      "layer.colUnits_tnm_stage_n": ["factor"],
      "layer.creationDate": 1312573848120,
      "layer.description": null,
      "layer.format": ["sageBioCurated"],
      "layer.id": "3874",
      "layer.locations": "/repo/v1/layer/3874/location",
      "layer.name": "Curated phenotypes",
      "layer.numSamples": 261,
      "layer.parentId": "3733",
      "layer.platform": "",
      "layer.previews": "/repo/v1/layer/3874/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "",
      "layer.tissueType": null,
      "layer.type": "C",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3889/acl",
      "layer.colDesc_age": ["Age at diagnosis"],
      "layer.colDesc_bcr_event": ["was a biochemical recurrance event detected"],
      "layer.colDesc_bcr_freetime": ["elapsed time before bichemical recurrance"],
      "layer.colDesc_chemotx": ["chemotherapy treatment"],
      "layer.colDesc_clinical_gleason_score": ["clinical tertiary gleason score"],
      "layer.colDesc_clinical_primary_gleason": ["clinical gleason score of the majority of the tumor"],
      "layer.colDesc_clinical_secondary_gleason": ["clinical gleason score of the minority of the tumor"],
      "layer.colDesc_clinical_tnm_stage_t": ["Cancer stage based on the Tumor, Node, Metastasis scoring system"],
      "layer.colDesc_copy_number_cluster": ["copy number cluster size"],
      "layer.colDesc_ethnicity": ["ethnicity of the individual"],
      "layer.colDesc_event": ["Cause of death"],
      "layer.colDesc_expression_array_tissue_source": ["Source of tissue used for expression profiling"],
      "layer.colDesc_extra_capsular_extension": ["extra-capsular extension: cancer extending beyond the prostate capsule"],
      "layer.colDesc_hormtx": ["Hormone treatment"],
      "layer.colDesc_metastatic_site": ["Site in the body where metastatic tumor was detected."],
      "layer.colDesc_metsevent": ["metastatic event"],
      "layer.colDesc_neoadjradtx": ["neo-adjuvant treatment"],
      "layer.colDesc_nomogram_nomopred_extra_capsular_extension": ["probability of extra capsular extension"],
      "layer.colDesc_nomogram_nomopred_lni": ["probability of lymph node involvement"],
      "layer.colDesc_nomogram_nomopred_ocd": ["probability of organ confined disease"],
      "layer.colDesc_nomogram_nomopred_seminal_vesicle_invasion": ["probability of seminal vesicle invasion"],
      "layer.colDesc_nomogram_pfp_postrp": ["nomogram progression-free probability post radical prostatectomy"],
      "layer.colDesc_number_nodes_positive": ["number node-positive nodes"],
      "layer.colDesc_number_nodes_removed": ["Number of cancerous nodes removed"],
      "layer.colDesc_pathologic_gleason_score": ["pathalogic tertiary gleason score"],
      "layer.colDesc_pathologic_primary_gleason": ["pathalogic gleason score of the majority of the tumor"],
      "layer.colDesc_pathologic_secondary_gleason": ["pathalagic gleason score of the minority of the tumor"],
      "layer.colDesc_pathologic_tnm_stage_t": ["pathologic TNM \"T\" stage"],
      "layer.colDesc_pre_treatment_psa": ["Prostate specific antigen level prior to treatment"],
      "layer.colDesc_predxbxpsa": ["PSA prior to diagnostic biopsy"],
      "layer.colDesc_radtxtype": ["radiation treatment type"],
      "layer.colDesc_rp_type": ["Surgical treatment. RP=radical prostatectomy, LP=laproscopic prostatectomy, SALRP=Salvage radical prostatectomy"],
      "layer.colDesc_sample_type": ["Type of sample that was profiled. One of: Benign=benign tumor ,CELL LINE=cancer cell line , MET=metastatic tumor, PRIMARY=primary tumor or XENOGRAFT. "],
      "layer.colDesc_seminal_vesicle_invasion": ["seminal vesicle invasion. Either \"positive\" or \"negative\""],
      "layer.colDesc_sms": ["somatostatin"],
      "layer.colDesc_survtime": ["Survival time post-diagnosis"],
      "layer.colDesc_tnm_stage_n": ["TNM \"N\" stage"],
      "layer.colUnits_age": ["years"],
      "layer.colUnits_bcr_event": ["factor"],
      "layer.colUnits_bcr_freetime": ["years"],
      "layer.colUnits_chemotx": ["factor"],
      "layer.colUnits_clinical_gleason_score": ["factor"],
      "layer.colUnits_clinical_primary_gleason": ["factor"],
      "layer.colUnits_clinical_secondary_gleason": ["factor"],
      "layer.colUnits_clinical_tnm_stage_t": ["factor"],
      "layer.colUnits_copy_number_cluster": ["factor"],
      "layer.colUnits_ethnicity": ["factor"],
      "layer.colUnits_event": ["factor"],
      "layer.colUnits_expression_array_tissue_source": ["factor"],
      "layer.colUnits_extra_capsular_extension": ["factor"],
      "layer.colUnits_hormtx": ["factor"],
      "layer.colUnits_metastatic_site": ["factor"],
      "layer.colUnits_metsevent": ["factor"],
      "layer.colUnits_neoadjradtx": ["factor"],
      "layer.colUnits_nomogram_nomopred_extra_capsular_extension": ["probability"],
      "layer.colUnits_nomogram_nomopred_lni": ["probability"],
      "layer.colUnits_nomogram_nomopred_ocd": ["probability"],
      "layer.colUnits_nomogram_nomopred_seminal_vesicle_invasion": ["probability"],
      "layer.colUnits_nomogram_pfp_postrp": ["probability"],
      "layer.colUnits_number_nodes_positive": ["count"],
      "layer.colUnits_number_nodes_removed": ["count"],
      "layer.colUnits_pathologic_gleason_score": ["factor"],
      "layer.colUnits_pathologic_primary_gleason": ["factor"],
      "layer.colUnits_pathologic_secondary_gleason": ["factor"],
      "layer.colUnits_pathologic_tnm_stage_t": ["factor"],
      "layer.colUnits_pre_treatment_psa": ["ng/mL"],
      "layer.colUnits_predxbxpsa": ["ng/mL"],
      "layer.colUnits_radtxtype": ["factor"],
      "layer.colUnits_rp_type": ["factor"],
      "layer.colUnits_sample_type": ["factor"],
      "layer.colUnits_seminal_vesicle_invasion": ["factor"],
      "layer.colUnits_sms": ["factor"],
      "layer.colUnits_survtime": ["months"],
      "layer.colUnits_tnm_stage_n": ["factor"],
      "layer.creationDate": 1312573913517,
      "layer.description": null,
      "layer.id": "3889",
      "layer.locations": "/repo/v1/layer/3889/location",
      "layer.name": "QCed phenotypes",
      "layer.numSamples": 261,
      "layer.parentId": "3733",
      "layer.platform": "NA",
      "layer.previews": "/repo/v1/layer/3889/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "QCed",
      "layer.tissueType": null,
      "layer.type": "C",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3886/acl",
      "layer.creationDate": 1312573892719,
      "layer.description": null,
      "layer.id": "3886",
      "layer.locations": "/repo/v1/layer/3886/location",
      "layer.name": "exon expression",
      "layer.numSamples": 184,
      "layer.parentId": "3733",
      "layer.platform": "Affymetrix Human Exon 1.0 ST array",
      "layer.previews": "/repo/v1/layer/3886/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "E",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3883/acl",
      "layer.creationDate": 1312573886176,
      "layer.description": null,
      "layer.id": "3883",
      "layer.locations": "/repo/v1/layer/3883/location",
      "layer.name": "miRNA expression",
      "layer.numSamples": 142,
      "layer.parentId": "3733",
      "layer.platform": "Agilent microRNA V2 arrays",
      "layer.previews": "/repo/v1/layer/3883/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "E",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3877/acl",
      "layer.creationDate": 1312573852943,
      "layer.description": null,
      "layer.id": "3877",
      "layer.locations": "/repo/v1/layer/3877/location",
      "layer.name": "sequencing",
      "layer.numSamples": 50,
      "layer.parentId": "3733",
      "layer.platform": "iPLEX Sequenom ",
      "layer.previews": "/repo/v1/layer/3877/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "G",
      "layer.version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 6
}


'Order By' Query for the Layers of a Dataset

These queries are generally of the form:

Code Block
SELECT * FROM layer WHERE parentId == <parentId> ORDER BY <field name> [ASC|DESC] [LIMIT <#>] [OFFSET <#>]

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+layer+where+layer.parentId+==+%223733%22+ORDER+BY+type'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:02 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "layer.accessControlList": "/repo/v1/layer/3889/acl",
      "layer.colDesc_age": ["Age at diagnosis"],
      "layer.colDesc_bcr_event": ["was a biochemical recurrance event detected"],
      "layer.colDesc_bcr_freetime": ["elapsed time before bichemical recurrance"],
      "layer.colDesc_chemotx": ["chemotherapy treatment"],
      "layer.colDesc_clinical_gleason_score": ["clinical tertiary gleason score"],
      "layer.colDesc_clinical_primary_gleason": ["clinical gleason score of the majority of the tumor"],
      "layer.colDesc_clinical_secondary_gleason": ["clinical gleason score of the minority of the tumor"],
      "layer.colDesc_clinical_tnm_stage_t": ["Cancer stage based on the Tumor, Node, Metastasis scoring system"],
      "layer.colDesc_copy_number_cluster": ["copy number cluster size"],
      "layer.colDesc_ethnicity": ["ethnicity of the individual"],
      "layer.colDesc_event": ["Cause of death"],
      "layer.colDesc_expression_array_tissue_source": ["Source of tissue used for expression profiling"],
      "layer.colDesc_extra_capsular_extension": ["extra-capsular extension: cancer extending beyond the prostate capsule"],
      "layer.colDesc_hormtx": ["Hormone treatment"],
      "layer.colDesc_metastatic_site": ["Site in the body where metastatic tumor was detected."],
      "layer.colDesc_metsevent": ["metastatic event"],
      "layer.colDesc_neoadjradtx": ["neo-adjuvant treatment"],
      "layer.colDesc_nomogram_nomopred_extra_capsular_extension": ["probability of extra capsular extension"],
      "layer.colDesc_nomogram_nomopred_lni": ["probability of lymph node involvement"],
      "layer.colDesc_nomogram_nomopred_ocd": ["probability of organ confined disease"],
      "layer.colDesc_nomogram_nomopred_seminal_vesicle_invasion": ["probability of seminal vesicle invasion"],
      "layer.colDesc_nomogram_pfp_postrp": ["nomogram progression-free probability post radical prostatectomy"],
      "layer.colDesc_number_nodes_positive": ["number node-positive nodes"],
      "layer.colDesc_number_nodes_removed": ["Number of cancerous nodes removed"],
      "layer.colDesc_pathologic_gleason_score": ["pathalogic tertiary gleason score"],
      "layer.colDesc_pathologic_primary_gleason": ["pathalogic gleason score of the majority of the tumor"],
      "layer.colDesc_pathologic_secondary_gleason": ["pathalagic gleason score of the minority of the tumor"],
      "layer.colDesc_pathologic_tnm_stage_t": ["pathologic TNM \"T\" stage"],
      "layer.colDesc_pre_treatment_psa": ["Prostate specific antigen level prior to treatment"],
      "layer.colDesc_predxbxpsa": ["PSA prior to diagnostic biopsy"],
      "layer.colDesc_radtxtype": ["radiation treatment type"],
      "layer.colDesc_rp_type": ["Surgical treatment. RP=radical prostatectomy, LP=laproscopic prostatectomy, SALRP=Salvage radical prostatectomy"],
      "layer.colDesc_sample_type": ["Type of sample that was profiled. One of: Benign=benign tumor ,CELL LINE=cancer cell line , MET=metastatic tumor, PRIMARY=primary tumor or XENOGRAFT. "],
      "layer.colDesc_seminal_vesicle_invasion": ["seminal vesicle invasion. Either \"positive\" or \"negative\""],
      "layer.colDesc_sms": ["somatostatin"],
      "layer.colDesc_survtime": ["Survival time post-diagnosis"],
      "layer.colDesc_tnm_stage_n": ["TNM \"N\" stage"],
      "layer.colUnits_age": ["years"],
      "layer.colUnits_bcr_event": ["factor"],
      "layer.colUnits_bcr_freetime": ["years"],
      "layer.colUnits_chemotx": ["factor"],
      "layer.colUnits_clinical_gleason_score": ["factor"],
      "layer.colUnits_clinical_primary_gleason": ["factor"],
      "layer.colUnits_clinical_secondary_gleason": ["factor"],
      "layer.colUnits_clinical_tnm_stage_t": ["factor"],
      "layer.colUnits_copy_number_cluster": ["factor"],
      "layer.colUnits_ethnicity": ["factor"],
      "layer.colUnits_event": ["factor"],
      "layer.colUnits_expression_array_tissue_source": ["factor"],
      "layer.colUnits_extra_capsular_extension": ["factor"],
      "layer.colUnits_hormtx": ["factor"],
      "layer.colUnits_metastatic_site": ["factor"],
      "layer.colUnits_metsevent": ["factor"],
      "layer.colUnits_neoadjradtx": ["factor"],
      "layer.colUnits_nomogram_nomopred_extra_capsular_extension": ["probability"],
      "layer.colUnits_nomogram_nomopred_lni": ["probability"],
      "layer.colUnits_nomogram_nomopred_ocd": ["probability"],
      "layer.colUnits_nomogram_nomopred_seminal_vesicle_invasion": ["probability"],
      "layer.colUnits_nomogram_pfp_postrp": ["probability"],
      "layer.colUnits_number_nodes_positive": ["count"],
      "layer.colUnits_number_nodes_removed": ["count"],
      "layer.colUnits_pathologic_gleason_score": ["factor"],
      "layer.colUnits_pathologic_primary_gleason": ["factor"],
      "layer.colUnits_pathologic_secondary_gleason": ["factor"],
      "layer.colUnits_pathologic_tnm_stage_t": ["factor"],
      "layer.colUnits_pre_treatment_psa": ["ng/mL"],
      "layer.colUnits_predxbxpsa": ["ng/mL"],
      "layer.colUnits_radtxtype": ["factor"],
      "layer.colUnits_rp_type": ["factor"],
      "layer.colUnits_sample_type": ["factor"],
      "layer.colUnits_seminal_vesicle_invasion": ["factor"],
      "layer.colUnits_sms": ["factor"],
      "layer.colUnits_survtime": ["months"],
      "layer.colUnits_tnm_stage_n": ["factor"],
      "layer.creationDate": 1312573913517,
      "layer.description": null,
      "layer.id": "3889",
      "layer.locations": "/repo/v1/layer/3889/location",
      "layer.name": "QCed phenotypes",
      "layer.numSamples": 261,
      "layer.parentId": "3733",
      "layer.platform": "NA",
      "layer.previews": "/repo/v1/layer/3889/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "QCed",
      "layer.tissueType": null,
      "layer.type": "C",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3874/acl",
      "layer.colDesc_age": ["Age at diagnosis.."],
      "layer.colDesc_bcr_event": ["was a biochemical recurrance event detected"],
      "layer.colDesc_bcr_freetime": ["elapsed time before bichemical recurrance"],
      "layer.colDesc_chemotx": ["chemotherapy treatment"],
      "layer.colDesc_clinical_gleason_score": ["clinical tertiary gleason score"],
      "layer.colDesc_clinical_primary_gleason": ["clinical gleason score of the majority of the tumor"],
      "layer.colDesc_clinical_secondary_gleason": ["clinical gleason score of the minority of the tumor"],
      "layer.colDesc_clinical_tnm_stage_t": ["Cancer stage based on the Tumor, Node, Metastasis scoring system"],
      "layer.colDesc_copy_number_cluster": ["copy number cluster size"],
      "layer.colDesc_ethnicity": ["ethnicity of the individual"],
      "layer.colDesc_event": ["Cause of death"],
      "layer.colDesc_expression_array_tissue_source": ["Source of tissue used for expression profiling"],
      "layer.colDesc_extra_capsular_extension": ["extra-capsular extension: cancer extending beyond the prostate capsule"],
      "layer.colDesc_hormtx": ["Hormone treatment"],
      "layer.colDesc_metastatic_site": ["Site in the body where metastatic tumor was detected."],
      "layer.colDesc_metsevent": ["metastatic event"],
      "layer.colDesc_neoadjradtx": ["neo-adjuvant treatment"],
      "layer.colDesc_nomogram_nomopred_extra_capsular_extension": ["probability of extra capsular extension"],
      "layer.colDesc_nomogram_nomopred_lni": ["probability of lymph node involvement"],
      "layer.colDesc_nomogram_nomopred_ocd": ["probability of organ confined disease"],
      "layer.colDesc_nomogram_nomopred_seminal_vesicle_invasion": ["probability of seminal vesicle invasion"],
      "layer.colDesc_nomogram_pfp_postrp": ["nomogram progression-free probability post radical prostatectomy"],
      "layer.colDesc_number_nodes_positive": ["number node-positive nodes"],
      "layer.colDesc_number_nodes_removed": ["Number of cancerous nodes removed"],
      "layer.colDesc_pathologic_gleason_score": ["pathalogic tertiary gleason score"],
      "layer.colDesc_pathologic_primary_gleason": ["pathalogic gleason score of the majority of the tumor"],
      "layer.colDesc_pathologic_secondary_gleason": ["pathalagic gleason score of the minority of the tumor"],
      "layer.colDesc_pathologic_tnm_stage_t": ["pathologic TNM \"T\" stage"],
      "layer.colDesc_pre_treatment_psa": ["Prostate specific antigen level prior to treatment"],
      "layer.colDesc_predxbxpsa": ["PSA prior to diagnostic biopsy"],
      "layer.colDesc_radtxtype": ["radiation treatment type"],
      "layer.colDesc_rp_type": ["Surgical treatment. RP=radical prostatectomy, LP=laproscopic prostatectomy, SALRP=Salvage radical prostatectomy"],
      "layer.colDesc_sample_type": ["Type of sample that was profiled. One of: Benign=benign tumor ,CELL LINE=cancer cell line , MET=metastatic tumor, PRIMARY=primary tumor or XENOGRAFT. "],
      "layer.colDesc_seminal_vesicle_invasion": ["seminal vesicle invasion. Either \"positive\" or \"negative\""],
      "layer.colDesc_sms": ["somatostatin"],
      "layer.colDesc_survtime": ["Survival time post-diagnosis"],
      "layer.colDesc_tnm_stage_n": ["TNM \"N\" stage"],
      "layer.colUnits_age": ["years"],
      "layer.colUnits_bcr_event": ["factor"],
      "layer.colUnits_bcr_freetime": ["years"],
      "layer.colUnits_chemotx": ["factor"],
      "layer.colUnits_clinical_gleason_score": ["factor"],
      "layer.colUnits_clinical_primary_gleason": ["factor"],
      "layer.colUnits_clinical_secondary_gleason": ["factor"],
      "layer.colUnits_clinical_tnm_stage_t": ["factor"],
      "layer.colUnits_copy_number_cluster": ["factor"],
      "layer.colUnits_ethnicity": ["factor"],
      "layer.colUnits_event": ["factor"],
      "layer.colUnits_expression_array_tissue_source": ["factor"],
      "layer.colUnits_extra_capsular_extension": ["factor"],
      "layer.colUnits_hormtx": ["factor"],
      "layer.colUnits_metastatic_site": ["factor"],
      "layer.colUnits_metsevent": ["factor"],
      "layer.colUnits_neoadjradtx": ["factor"],
      "layer.colUnits_nomogram_nomopred_extra_capsular_extension": ["probability"],
      "layer.colUnits_nomogram_nomopred_lni": ["probability"],
      "layer.colUnits_nomogram_nomopred_ocd": ["probability"],
      "layer.colUnits_nomogram_nomopred_seminal_vesicle_invasion": ["probability"],
      "layer.colUnits_nomogram_pfp_postrp": ["probability"],
      "layer.colUnits_number_nodes_positive": ["count"],
      "layer.colUnits_number_nodes_removed": ["count"],
      "layer.colUnits_pathologic_gleason_score": ["factor"],
      "layer.colUnits_pathologic_primary_gleason": ["factor"],
      "layer.colUnits_pathologic_secondary_gleason": ["factor"],
      "layer.colUnits_pathologic_tnm_stage_t": ["factor"],
      "layer.colUnits_pre_treatment_psa": ["ng/mL"],
      "layer.colUnits_predxbxpsa": ["ng/mL"],
      "layer.colUnits_radtxtype": ["factor"],
      "layer.colUnits_rp_type": ["factor"],
      "layer.colUnits_sample_type": ["factor"],
      "layer.colUnits_seminal_vesicle_invasion": ["factor"],
      "layer.colUnits_sms": ["factor"],
      "layer.colUnits_survtime": ["months"],
      "layer.colUnits_tnm_stage_n": ["factor"],
      "layer.creationDate": 1312573848120,
      "layer.description": null,
      "layer.format": ["sageBioCurated"],
      "layer.id": "3874",
      "layer.locations": "/repo/v1/layer/3874/location",
      "layer.name": "Curated phenotypes",
      "layer.numSamples": 261,
      "layer.parentId": "3733",
      "layer.platform": "",
      "layer.previews": "/repo/v1/layer/3874/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "",
      "layer.tissueType": null,
      "layer.type": "C",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3886/acl",
      "layer.creationDate": 1312573892719,
      "layer.description": null,
      "layer.id": "3886",
      "layer.locations": "/repo/v1/layer/3886/location",
      "layer.name": "exon expression",
      "layer.numSamples": 184,
      "layer.parentId": "3733",
      "layer.platform": "Affymetrix Human Exon 1.0 ST array",
      "layer.previews": "/repo/v1/layer/3886/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "E",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3883/acl",
      "layer.creationDate": 1312573886176,
      "layer.description": null,
      "layer.id": "3883",
      "layer.locations": "/repo/v1/layer/3883/location",
      "layer.name": "miRNA expression",
      "layer.numSamples": 142,
      "layer.parentId": "3733",
      "layer.platform": "Agilent microRNA V2 arrays",
      "layer.previews": "/repo/v1/layer/3883/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "E",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3877/acl",
      "layer.creationDate": 1312573852943,
      "layer.description": null,
      "layer.id": "3877",
      "layer.locations": "/repo/v1/layer/3877/location",
      "layer.name": "sequencing",
      "layer.numSamples": 50,
      "layer.parentId": "3733",
      "layer.platform": "iPLEX Sequenom ",
      "layer.previews": "/repo/v1/layer/3877/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "G",
      "layer.version": "1.0.0"
    },
    {
      "layer.accessControlList": "/repo/v1/layer/3880/acl",
      "layer.creationDate": 1312573857573,
      "layer.description": null,
      "layer.id": "3880",
      "layer.locations": "/repo/v1/layer/3880/location",
      "layer.name": "CNV",
      "layer.numSamples": 230,
      "layer.parentId": "3733",
      "layer.platform": "Agilent 244K array comparative genomic hybridization (aCGH) microarrays",
      "layer.previews": "/repo/v1/layer/3880/preview",
      "layer.processingFacility": null,
      "layer.publicationDate": null,
      "layer.qcBy": "Solly Sieberts",
      "layer.qcDate": null,
      "layer.releaseNotes": null,
      "layer.status": "curated",
      "layer.tissueType": null,
      "layer.type": "G",
      "layer.version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 6
}


'Select *' Query for the all the people who have agreed to the terms in the End User License Agreement for a Dataset

These queries are generally of the form:

Code Block
SELECT * FROM <data type> WHERE <expression> (AND <expression>)* [LIMIT <#>] [OFFSET #]

<expresssion> := <field name> <operator> <value>

<value> should be in quotes for strings, but not numbers (i.e. name == "Smith" AND size > 10)

Curently supported <operators> with their required URL escape codes:

Operator

Value

URL Escape Code

Equal

==

%3D%3D

Does Not equal

!=

!%3D

Greater Than

>

%3E

Less than

<

%3C

Greater than or equals

>=

%3E%3D

Less than or equals

<=

%3C%3D

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query?query=select+*+from+agreement+where+agreement.datasetId+==+%223733%22'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:02 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "results": [
    {
      "agreement.accessControlList": "/repo/v1/agreement/4282/acl",
      "agreement.createdBy": "nicole.deflaux@sagebase.org",
      "agreement.creationDate": 1312590905958,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "4282",
      "agreement.name": "4282",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/4283/acl",
      "agreement.createdBy": "nicole.deflaux@sagebase.org",
      "agreement.creationDate": 1312590977226,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "4283",
      "agreement.name": "SynapseWeb Agreement",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/5065/acl",
      "agreement.createdBy": "david.burdick@sagebase.org",
      "agreement.creationDate": 1312929818017,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "5065",
      "agreement.name": "Synapse Web Agreement by david.burdick_sagebase.org",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/5799/acl",
      "agreement.createdBy": "mike.kellen@sagebase.org",
      "agreement.creationDate": 1313081196450,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "5799",
      "agreement.name": "Synapse Web Agreement by mike.kellen_sagebase.org",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/5803/acl",
      "agreement.createdBy": "matt.furia@sagebase.org",
      "agreement.creationDate": 1313087072184,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "5803",
      "agreement.name": "Synapse Web Agreement by matt.furia_sagebase.org",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/6454/acl",
      "agreement.createdBy": "john.hill@sagebase.org",
      "agreement.creationDate": 1313535706688,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "6454",
      "agreement.name": "Synapse Web Agreement by john.hill_sagebase.org",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/6643/acl",
      "agreement.createdBy": "devUser1@sagebase.org",
      "agreement.creationDate": 1313697590884,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "6643",
      "agreement.name": "6643",
      "agreement.parentId": "3729"
    },
    {
      "agreement.accessControlList": "/repo/v1/agreement/16966/acl",
      "agreement.createdBy": "nicole.deflaux@gmail.com",
      "agreement.creationDate": 1317181315089,
      "agreement.datasetId": "3733",
      "agreement.datasetVersionNumber": -1,
      "agreement.eulaId": "3732",
      "agreement.eulaVersionNumber": -1,
      "agreement.id": "16966",
      "agreement.name": "16966",
      "agreement.parentId": "3729"
    }
  ],
  "totalNumberOfResults": 8
}


Schema

Query Response Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/query/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:02 GMT
Server: Apache-Coyote/1.1
Content-Length: 126
Connection: keep-alive

{
  "properties": {
    "results": {
      "items": {"type": "object"},
      "type": "array"
    },
    "totalNumberOfResults": {"type": "number"}
  },
  "type": "object"
}


REST API

The REST API took inspiration from several successful REST APIs:

Read-Only Examples

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

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset?sort=name&limit=3'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "paging": {"next": "/repo/v1/dataset?offset=4&limit=3&sort=name&ascending=true"},
  "results": [
    {
      "accessControlList": "/repo/v1/dataset/3818/acl",
      "annotations": "/repo/v1/dataset/3818/annotations",
      "creationDate": 1312573730171,
      "creator": "Stephen Friend",
      "description": "Clinical outcomes with responder/non-responder status for standard of care therapies. Partial retrospective, partial prospective. Patient-driven. Minimum full exome sequencing. ",
      "etag": "0",
      "eulaId": "3732",
      "hasClinicalData": true,
      "hasExpressionData": true,
      "hasGeneticData": true,
      "id": "3818",
      "layers": "/repo/v1/dataset/3818/layer",
      "locations": "/repo/v1/dataset/3818/location",
      "name": "AML Nonresponders Cohort",
      "parentId": "3731",
      "releaseDate": 1364947200000,
      "status": "Future",
      "uri": "/repo/v1/dataset/3818",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/dataset/3837/acl",
      "annotations": "/repo/v1/dataset/3837/annotations",
      "creationDate": 1312573770673,
      "creator": "TCGA",
      "description": "The Cancer Genome Atlas is generating multiple levels of genomic information on a panel of 500 AML tumor samples.  For more information, go to: http://tcga-data.nci.nih.gov/tcga/tcgaHome2.jsp  ",
      "etag": "0",
      "eulaId": "3732",
      "hasClinicalData": true,
      "hasExpressionData": true,
      "hasGeneticData": true,
      "id": "3837",
      "layers": "/repo/v1/dataset/3837/layer",
      "locations": "/repo/v1/dataset/3837/location",
      "name": "AML TCGA",
      "parentId": "3731",
      "releaseDate": 1268265600000,
      "status": "Future",
      "uri": "/repo/v1/dataset/3837",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/dataset/3776/acl",
      "annotations": "/repo/v1/dataset/3776/annotations",
      "creationDate": 1312573639366,
      "creator": "Cookson",
      "description": "We have created a global map of the effects of polymorphism on gene expression in 400 children from families recruited through a proband with asthma. We genotyped 408,273 SNPs and identified expression quantitative trait loci from measurements of 54,675 transcripts representing 20,599 genes in Epstein-Barr virus-transformed lymphoblastoid cell lines. We found that 15,084 transcripts (28%) representing 6,660 genes had narrow-sense heritabilities (H2) > 0.3. We executed genome-wide association scans for these traits and found peak lod scores between 3.68 and 59.1. The most highly heritable traits were markedly enriched in Gene Ontology descriptors for response to unfolded protein (chaperonins and heat shock proteins), regulation of progression through the cell cycle, RNA processing, DNA repair, immune responses and apoptosis. SNPs that regulate expression of these genes are candidates in the study of degenerative diseases, malignancy, infection and inflammation. We have created a downloadable database to facilitate use of our findings in the mapping of complex disease loci. ",
      "etag": "0",
      "eulaId": "3732",
      "hasClinicalData": true,
      "hasExpressionData": true,
      "hasGeneticData": true,
      "id": "3776",
      "layers": "/repo/v1/dataset/3776/layer",
      "locations": "/repo/v1/dataset/3776/location",
      "name": "Asthma Human Lymphoblastoid Cell Lines",
      "parentId": "3731",
      "releaseDate": 1238889600000,
      "status": "Future",
      "uri": "/repo/v1/dataset/3776",
      "version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 122
}


Get a Dataset

This returns the primary fields of a dataset and links to get additional info.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset/3733'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
ETag: 0
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "accessControlList": "/repo/v1/dataset/3733/acl",
  "annotations": "/repo/v1/dataset/3733/annotations",
  "creationDate": 1312573506326,
  "creator": "Charles Sawyers",
  "description": "Genetic and epigenetic alterations have been identified that lead to transcriptional Annotation of prostate cancer genomes provides a foundation for discoveries that can impact disease understanding and treatment. Concordant assessment of DNA copy number, mRNA expression, and focused exon resequencing in the 218 prostate cancer tumors represented in this dataset haveidentified the nuclear receptor coactivator NCOA2 as an oncogene in approximately 11% of tumors. Additionally, the androgen-driven TMPRSS2-ERG fusion was associated with a previously unrecognized, prostate-specific deletion at chromosome 3p14 that implicates FOXP1, RYBP, and SHQ1 as potential cooperative tumor suppressors. DNA copy-number data from primary tumors revealed that copy-number alterations robustly define clusters of low- and high-risk disease beyond that achieved by Gleason score.  ",
  "etag": "0",
  "eulaId": "3732",
  "hasClinicalData": true,
  "hasExpressionData": true,
  "hasGeneticData": true,
  "id": "3733",
  "layers": "/repo/v1/dataset/3733/layer",
  "locations": "/repo/v1/dataset/3733/location",
  "name": "MSKCC Prostate Cancer",
  "parentId": "3731",
  "releaseDate": 1234137600000,
  "status": "Current",
  "uri": "/repo/v1/dataset/3733",
  "version": "1.0.0"
}


Get Annotations for a Dataset

This returns the annotations for a dataset.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset/3733/annotations'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
ETag: 0
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "blobAnnotations": {},
  "creationDate": 1312573506326,
  "dateAnnotations": {"last_modified_date": [1243987200000]},
  "doubleAnnotations": {},
  "etag": "0",
  "id": "3733",
  "longAnnotations": {
    "Number_of_Samples": [261],
    "number_of_downloads": [32],
    "number_of_followers": [7],
    "pubmed_id": [20579941]
  },
  "stringAnnotations": {
    "Disease": ["Cancer"],
    "Institution": ["Memorial Sloan Kettering Cancer Center"],
    "Internal_Name": ["Prostate cancer-MSKCC"],
    "Posting_Restriction": ["unspecified"],
    "QC_statistician": ["Solly Sieberts"],
    "Species": ["Human"],
    "Tissue_Tumor": ["Prostate"],
    "Type": ["GCD"],
    "citation": ["Integrative genomic profiling of human prostate cancer. Taylor BS et al., Cancer Cell. 2010 Jul 13;18(1):11-22.  "],
    "curator": ["Matt Furia"]
  },
  "uri": "/repo/v1/dataset/3733/annotations"
}


Get all the Layers for a Dataset

This returns the primary fields for all the layers of a dataset.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset/3733/layer'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "paging": {},
  "results": [
    {
      "accessControlList": "/repo/v1/layer/3880/acl",
      "annotations": "/repo/v1/layer/3880/annotations",
      "creationDate": 1312573857573,
      "description": null,
      "etag": "0",
      "id": "3880",
      "locations": "/repo/v1/layer/3880/location",
      "name": "CNV",
      "numSamples": 230,
      "parentId": "3733",
      "platform": "Agilent 244K array comparative genomic hybridization (aCGH) microarrays",
      "previews": "/repo/v1/layer/3880/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "curated",
      "tissueType": null,
      "type": "G",
      "uri": "/repo/v1/layer/3880",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/layer/3874/acl",
      "annotations": "/repo/v1/layer/3874/annotations",
      "creationDate": 1312573848120,
      "description": null,
      "etag": "0",
      "id": "3874",
      "locations": "/repo/v1/layer/3874/location",
      "name": "Curated phenotypes",
      "numSamples": 261,
      "parentId": "3733",
      "platform": "",
      "previews": "/repo/v1/layer/3874/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "",
      "tissueType": null,
      "type": "C",
      "uri": "/repo/v1/layer/3874",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/layer/3889/acl",
      "annotations": "/repo/v1/layer/3889/annotations",
      "creationDate": 1312573913517,
      "description": null,
      "etag": "0",
      "id": "3889",
      "locations": "/repo/v1/layer/3889/location",
      "name": "QCed phenotypes",
      "numSamples": 261,
      "parentId": "3733",
      "platform": "NA",
      "previews": "/repo/v1/layer/3889/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "QCed",
      "tissueType": null,
      "type": "C",
      "uri": "/repo/v1/layer/3889",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/layer/3886/acl",
      "annotations": "/repo/v1/layer/3886/annotations",
      "creationDate": 1312573892719,
      "description": null,
      "etag": "0",
      "id": "3886",
      "locations": "/repo/v1/layer/3886/location",
      "name": "exon expression",
      "numSamples": 184,
      "parentId": "3733",
      "platform": "Affymetrix Human Exon 1.0 ST array",
      "previews": "/repo/v1/layer/3886/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "curated",
      "tissueType": null,
      "type": "E",
      "uri": "/repo/v1/layer/3886",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/layer/3883/acl",
      "annotations": "/repo/v1/layer/3883/annotations",
      "creationDate": 1312573886176,
      "description": null,
      "etag": "0",
      "id": "3883",
      "locations": "/repo/v1/layer/3883/location",
      "name": "miRNA expression",
      "numSamples": 142,
      "parentId": "3733",
      "platform": "Agilent microRNA V2 arrays",
      "previews": "/repo/v1/layer/3883/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "curated",
      "tissueType": null,
      "type": "E",
      "uri": "/repo/v1/layer/3883",
      "version": "1.0.0"
    },
    {
      "accessControlList": "/repo/v1/layer/3877/acl",
      "annotations": "/repo/v1/layer/3877/annotations",
      "creationDate": 1312573852943,
      "description": null,
      "etag": "0",
      "id": "3877",
      "locations": "/repo/v1/layer/3877/location",
      "name": "sequencing",
      "numSamples": 50,
      "parentId": "3733",
      "platform": "iPLEX Sequenom ",
      "previews": "/repo/v1/layer/3877/preview",
      "processingFacility": null,
      "publicationDate": null,
      "qcBy": "Solly Sieberts",
      "qcDate": null,
      "releaseNotes": null,
      "status": "curated",
      "tissueType": null,
      "type": "G",
      "uri": "/repo/v1/layer/3877",
      "version": "1.0.0"
    }
  ],
  "totalNumberOfResults": 6
}


Get a Clinical Dataset Layer

This returns the metadata for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/3874'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
ETag: 0
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "accessControlList": "/repo/v1/layer/3874/acl",
  "annotations": "/repo/v1/layer/3874/annotations",
  "creationDate": 1312573848120,
  "description": null,
  "etag": "0",
  "id": "3874",
  "locations": "/repo/v1/layer/3874/location",
  "name": "Curated phenotypes",
  "numSamples": 261,
  "parentId": "3733",
  "platform": "",
  "previews": "/repo/v1/layer/3874/preview",
  "processingFacility": null,
  "publicationDate": null,
  "qcBy": "Solly Sieberts",
  "qcDate": null,
  "releaseNotes": null,
  "status": "",
  "tissueType": null,
  "type": "C",
  "uri": "/repo/v1/layer/3874",
  "version": "1.0.0"
}


Get Annotations for a Clinical Dataset Layer

This returns the annotations for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/3874/annotations'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:03 GMT
ETag: 0
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "blobAnnotations": {},
  "creationDate": 1312573848120,
  "dateAnnotations": {},
  "doubleAnnotations": {},
  "etag": "0",
  "id": "3874",
  "longAnnotations": {},
  "stringAnnotations": {
    "colDesc_age": ["Age at diagnosis.."],
    "colDesc_bcr_event": ["was a biochemical recurrance event detected"],
    "colDesc_bcr_freetime": ["elapsed time before bichemical recurrance"],
    "colDesc_chemotx": ["chemotherapy treatment"],
    "colDesc_clinical_gleason_score": ["clinical tertiary gleason score"],
    "colDesc_clinical_primary_gleason": ["clinical gleason score of the majority of the tumor"],
    "colDesc_clinical_secondary_gleason": ["clinical gleason score of the minority of the tumor"],
    "colDesc_clinical_tnm_stage_t": ["Cancer stage based on the Tumor, Node, Metastasis scoring system"],
    "colDesc_copy_number_cluster": ["copy number cluster size"],
    "colDesc_ethnicity": ["ethnicity of the individual"],
    "colDesc_event": ["Cause of death"],
    "colDesc_expression_array_tissue_source": ["Source of tissue used for expression profiling"],
    "colDesc_extra_capsular_extension": ["extra-capsular extension: cancer extending beyond the prostate capsule"],
    "colDesc_hormtx": ["Hormone treatment"],
    "colDesc_metastatic_site": ["Site in the body where metastatic tumor was detected."],
    "colDesc_metsevent": ["metastatic event"],
    "colDesc_neoadjradtx": ["neo-adjuvant treatment"],
    "colDesc_nomogram_nomopred_extra_capsular_extension": ["probability of extra capsular extension"],
    "colDesc_nomogram_nomopred_lni": ["probability of lymph node involvement"],
    "colDesc_nomogram_nomopred_ocd": ["probability of organ confined disease"],
    "colDesc_nomogram_nomopred_seminal_vesicle_invasion": ["probability of seminal vesicle invasion"],
    "colDesc_nomogram_pfp_postrp": ["nomogram progression-free probability post radical prostatectomy"],
    "colDesc_number_nodes_positive": ["number node-positive nodes"],
    "colDesc_number_nodes_removed": ["Number of cancerous nodes removed"],
    "colDesc_pathologic_gleason_score": ["pathalogic tertiary gleason score"],
    "colDesc_pathologic_primary_gleason": ["pathalogic gleason score of the majority of the tumor"],
    "colDesc_pathologic_secondary_gleason": ["pathalagic gleason score of the minority of the tumor"],
    "colDesc_pathologic_tnm_stage_t": ["pathologic TNM \"T\" stage"],
    "colDesc_pre_treatment_psa": ["Prostate specific antigen level prior to treatment"],
    "colDesc_predxbxpsa": ["PSA prior to diagnostic biopsy"],
    "colDesc_radtxtype": ["radiation treatment type"],
    "colDesc_rp_type": ["Surgical treatment. RP=radical prostatectomy, LP=laproscopic prostatectomy, SALRP=Salvage radical prostatectomy"],
    "colDesc_sample_type": ["Type of sample that was profiled. One of: Benign=benign tumor ,CELL LINE=cancer cell line , MET=metastatic tumor, PRIMARY=primary tumor or XENOGRAFT. "],
    "colDesc_seminal_vesicle_invasion": ["seminal vesicle invasion. Either \"positive\" or \"negative\""],
    "colDesc_sms": ["somatostatin"],
    "colDesc_survtime": ["Survival time post-diagnosis"],
    "colDesc_tnm_stage_n": ["TNM \"N\" stage"],
    "colUnits_age": ["years"],
    "colUnits_bcr_event": ["factor"],
    "colUnits_bcr_freetime": ["years"],
    "colUnits_chemotx": ["factor"],
    "colUnits_clinical_gleason_score": ["factor"],
    "colUnits_clinical_primary_gleason": ["factor"],
    "colUnits_clinical_secondary_gleason": ["factor"],
    "colUnits_clinical_tnm_stage_t": ["factor"],
    "colUnits_copy_number_cluster": ["factor"],
    "colUnits_ethnicity": ["factor"],
    "colUnits_event": ["factor"],
    "colUnits_expression_array_tissue_source": ["factor"],
    "colUnits_extra_capsular_extension": ["factor"],
    "colUnits_hormtx": ["factor"],
    "colUnits_metastatic_site": ["factor"],
    "colUnits_metsevent": ["factor"],
    "colUnits_neoadjradtx": ["factor"],
    "colUnits_nomogram_nomopred_extra_capsular_extension": ["probability"],
    "colUnits_nomogram_nomopred_lni": ["probability"],
    "colUnits_nomogram_nomopred_ocd": ["probability"],
    "colUnits_nomogram_nomopred_seminal_vesicle_invasion": ["probability"],
    "colUnits_nomogram_pfp_postrp": ["probability"],
    "colUnits_number_nodes_positive": ["count"],
    "colUnits_number_nodes_removed": ["count"],
    "colUnits_pathologic_gleason_score": ["factor"],
    "colUnits_pathologic_primary_gleason": ["factor"],
    "colUnits_pathologic_secondary_gleason": ["factor"],
    "colUnits_pathologic_tnm_stage_t": ["factor"],
    "colUnits_pre_treatment_psa": ["ng/mL"],
    "colUnits_predxbxpsa": ["ng/mL"],
    "colUnits_radtxtype": ["factor"],
    "colUnits_rp_type": ["factor"],
    "colUnits_sample_type": ["factor"],
    "colUnits_seminal_vesicle_invasion": ["factor"],
    "colUnits_sms": ["factor"],
    "colUnits_survtime": ["months"],
    "colUnits_tnm_stage_n": ["factor"],
    "format": ["sageBioCurated"]
  },
  "uri": "/repo/v1/layer/3874/annotations"
}


Get the Eula for a Clinical Dataset

This returns the eula for a dataset.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/eula/3732'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:04 GMT
ETag: 0
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "accessControlList": "/repo/v1/eula/3732/acl",
  "agreement": "Copyright 2011 Sage Bionetworks\n\nLicensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions andlimitations under the License.\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of this License; and\n\nYou must cause any modified files to carry prominent notices stating that You changed the files; and\n\nYou must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\n\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work an
  "annotations": "/repo/v1/eula/3732/annotations",
  "creationDate": 1312573504012,
  "etag": "0",
  "id": "3732",
  "name": "SageBioCurationEula",
  "parentId": "3730",
  "uri": "/repo/v1/eula/3732"
}


Get preview data for a Clinical Dataset Layer

This returns the preview data for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/3874/preview'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:04 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "paging": {},
  "results": [{
    "accessControlList": "/repo/v1/preview/3876/acl",
    "annotations": "/repo/v1/preview/3876/annotations",
    "creationDate": 1312573851825,
    "etag": "0",
    "headers": [
      "phenotype_id",
      "sample_type",
      "metastatic_site",
      "ethnicity",
      "predxbxpsa",
      "age",
      "clinical_primary_gleason",
      "clinical_secondary_gleason",
      "clinical_gleason_score",
      "pre_treatment_psa",
      "clinical_tnm_stage_t",
      "neoadjradtx",
      "chemotx",
      "hormtx",
      "radtxtype",
      "rp_type",
      "sms",
      "extra_capsular_extension",
      "seminal_vesicle_invasion",
      "tnm_stage_n",
      "number_nodes_removed",
      "number_nodes_positive",
      "pathologic_tnm_stage_t",
      "pathologic_primary_gleason",
      "pathologic_secondary_gleason",
      "pathologic_gleason_score",
      "bcr_freetime",
      "bcr_event",
      "metsevent",
      "survtime",
      "event",
      "nomogram_pfp_postrp",
      "nomogram_nomopred_extra_capsular_extension",
      "nomogram_nomopred_lni",
      "nomogram_nomopred_ocd",
      "nomogram_nomopred_seminal_vesicle_invasion",
      "copy_number_cluster",
      "expression_array_tissue_source\r"
    ],
    "id": "3876",
    "name": "3876",
    "parentId": "3874",
    "previewBlob": null,
    "previewString": "phenotype_id\tsample_type\tmetastatic_site\tethnicity\tpredxbxpsa\tage\tclinical_primary_gleason\tclinical_secondary_gleason\tclinical_gleason_score\tpre_treatment_psa\tclinical_tnm_stage_t\tneoadjradtx\tchemotx\thormtx\tradtxtype\trp_type\tsms\textra_capsular_extension\tseminal_vesicle_invasion\ttnm_stage_n\tnumber_nodes_removed\tnumber_nodes_positive\tpathologic_tnm_stage_t\tpathologic_primary_gleason\tpathologic_secondary_gleason\tpathologic_gleason_score\tbcr_freetime\tbcr_event\tmetsevent\tsurvtime\tevent\tnomogram_pfp_postrp\tnomogram_nomopred_extra_capsular_extension\tnomogram_nomopred_lni\tnomogram_nomopred_ocd\tnomogram_nomopred_seminal_vesicle_invasion\tcopy_number_cluster\texpression_array_tissue_source\r\nPCA0004\tPRIMARY\tNA\tWhite Non Hispanic\t27.5\t68.93\t3\t2\t5\t11.8\tT2B\tNA\tNA\tNA\tNA\tRP\tNegative\tESTABLISHED\tNegative\tNormal_N0\t13\t0\tT3A\t3\t4\t7\t152.55\tNO\tNO\t152.55\tNO\tNA\t37.937846\t3.593974\t55.082939\tNA\t1\tNA\r\nPCA0006\tPRIMARY\tNA\tWhite Non Hispanic\t15.7\t56.64\t3\t3\t6\t8.2\tT2B\tNA\tNA\tNeoadjuvant HORM\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t4\t0\tT2C\t3\t3\t6\t160.96\tNO\tNO\t160.96\tNO\tNA\tNA\tNA\tNA\tNA\t4\tNA\r\nPCA0016\tPRIMARY\tNA\tWhite Non Hispanic\t12\t67.36\t3\t3\t6\t12\tT2B\tNA\tNA\tNeoadjuvant HORM\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t2\t0\tT2C\t4\t4\t8\t74.22\tNO\tNO\t74.22\tNO\t99\tNA\tNA\tNA\t97.11015465\t2\tNA\r\nPCA0019\tPRIMARY\tNA\tWhite Non Hispanic\t6.6\t68.12\t3\t4\t7\t6.6\tT1C\tNA\tNA\tNA\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t1\t0\tT2C\t3\t3\t6\t110.33\tBCR_Algorithm\tNO\t123.67\tNO\tNA\tNA\tNA\tNA\t79.85545652\t2\tNA\r\nPCA0023\tPRIMARY\tNA\tBlack Non Hispanic\t4.3\t60.57\t4\t3\t7\t3.88\tT1C\tNA\tNA\tPostHORM\tNA\tRP\tPositive\tNONE\tNegative\tNormal_N0\t2\t0\tT2C\t4\t5\t9\t10.61\tBCR_Algorithm\tNO\t72.84\tDEATH FROM OTHER CANCER\t79.85546\t19.190208\t2.138938\t77.240045\t99\t4\tNA\r\n",
    "rows": [
      {
        "age": "68.93",
        "bcr_event": "NO",
        "bcr_freetime": "152.55",
        "chemotx": "NA",
        "clinical_gleason_score": "5",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "2",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "1",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "ESTABLISHED",
        "hormtx": "NA",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "37.937846",
        "nomogram_nomopred_lni": "3.593974",
        "nomogram_nomopred_ocd": "55.082939",
        "nomogram_nomopred_seminal_vesicle_invasion": "NA",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "13",
        "pathologic_gleason_score": "7",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "4",
        "pathologic_tnm_stage_t": "T3A",
        "phenotype_id": "PCA0004",
        "pre_treatment_psa": "11.8",
        "predxbxpsa": "27.5",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "152.55",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "56.64",
        "bcr_event": "NO",
        "bcr_freetime": "160.96",
        "chemotx": "NA",
        "clinical_gleason_score": "6",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "4",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "Neoadjuvant HORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "NA",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "4",
        "pathologic_gleason_score": "6",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "3",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0006",
        "pre_treatment_psa": "8.2",
        "predxbxpsa": "15.7",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "160.96",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "67.36",
        "bcr_event": "NO",
        "bcr_freetime": "74.22",
        "chemotx": "NA",
        "clinical_gleason_score": "6",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "2",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "Neoadjuvant HORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "97.11015465",
        "nomogram_pfp_postrp": "99",
        "number_nodes_positive": "0",
        "number_nodes_removed": "2",
        "pathologic_gleason_score": "8",
        "pathologic_primary_gleason": "4",
        "pathologic_secondary_gleason": "4",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0016",
        "pre_treatment_psa": "12",
        "predxbxpsa": "12",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "74.22",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "68.12",
        "bcr_event": "BCR_Algorithm",
        "bcr_freetime": "110.33",
        "chemotx": "NA",
        "clinical_gleason_score": "7",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "4",
        "clinical_tnm_stage_t": "T1C",
        "copy_number_cluster": "2",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "NA",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "79.85545652",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "1",
        "pathologic_gleason_score": "6",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "3",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0019",
        "pre_treatment_psa": "6.6",
        "predxbxpsa": "6.6",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "123.67",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "60.57",
        "bcr_event": "BCR_Algorithm",
        "bcr_freetime": "10.61",
        "chemotx": "NA",
        "clinical_gleason_score": "7",
        "clinical_primary_gleason": "4",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T1C",
        "copy_number_cluster": "4",
        "ethnicity": "Black Non Hispanic",
        "event": "DEATH FROM OTHER CANCER",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "PostHORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "19.190208",
        "nomogram_nomopred_lni": "2.138938",
        "nomogram_nomopred_ocd": "77.240045",
        "nomogram_nomopred_seminal_vesicle_invasion": "99",
        "nomogram_pfp_postrp": "79.85546",
        "number_nodes_positive": "0",
        "number_nodes_removed": "2",
        "pathologic_gleason_score": "9",
        "pathologic_primary_gleason": "4",
        "pathologic_secondary_gleason": "5",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0023",
        "pre_treatment_psa": "3.88",
        "predxbxpsa": "4.3",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Positive",
        "survtime": "72.84",
        "tnm_stage_n": "Normal_N0"
      }
    ],
    "uri": "/repo/v1/preview/3876"
  }],
  "totalNumberOfResults": 1
}


Get preview data as a map for a Clinical Dataset Layer

This returns the preview data for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/3874/preview'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:04 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "paging": {},
  "results": [{
    "accessControlList": "/repo/v1/preview/3876/acl",
    "annotations": "/repo/v1/preview/3876/annotations",
    "creationDate": 1312573851825,
    "etag": "0",
    "headers": [
      "phenotype_id",
      "sample_type",
      "metastatic_site",
      "ethnicity",
      "predxbxpsa",
      "age",
      "clinical_primary_gleason",
      "clinical_secondary_gleason",
      "clinical_gleason_score",
      "pre_treatment_psa",
      "clinical_tnm_stage_t",
      "neoadjradtx",
      "chemotx",
      "hormtx",
      "radtxtype",
      "rp_type",
      "sms",
      "extra_capsular_extension",
      "seminal_vesicle_invasion",
      "tnm_stage_n",
      "number_nodes_removed",
      "number_nodes_positive",
      "pathologic_tnm_stage_t",
      "pathologic_primary_gleason",
      "pathologic_secondary_gleason",
      "pathologic_gleason_score",
      "bcr_freetime",
      "bcr_event",
      "metsevent",
      "survtime",
      "event",
      "nomogram_pfp_postrp",
      "nomogram_nomopred_extra_capsular_extension",
      "nomogram_nomopred_lni",
      "nomogram_nomopred_ocd",
      "nomogram_nomopred_seminal_vesicle_invasion",
      "copy_number_cluster",
      "expression_array_tissue_source\r"
    ],
    "id": "3876",
    "name": "3876",
    "parentId": "3874",
    "previewBlob": null,
    "previewString": "phenotype_id\tsample_type\tmetastatic_site\tethnicity\tpredxbxpsa\tage\tclinical_primary_gleason\tclinical_secondary_gleason\tclinical_gleason_score\tpre_treatment_psa\tclinical_tnm_stage_t\tneoadjradtx\tchemotx\thormtx\tradtxtype\trp_type\tsms\textra_capsular_extension\tseminal_vesicle_invasion\ttnm_stage_n\tnumber_nodes_removed\tnumber_nodes_positive\tpathologic_tnm_stage_t\tpathologic_primary_gleason\tpathologic_secondary_gleason\tpathologic_gleason_score\tbcr_freetime\tbcr_event\tmetsevent\tsurvtime\tevent\tnomogram_pfp_postrp\tnomogram_nomopred_extra_capsular_extension\tnomogram_nomopred_lni\tnomogram_nomopred_ocd\tnomogram_nomopred_seminal_vesicle_invasion\tcopy_number_cluster\texpression_array_tissue_source\r\nPCA0004\tPRIMARY\tNA\tWhite Non Hispanic\t27.5\t68.93\t3\t2\t5\t11.8\tT2B\tNA\tNA\tNA\tNA\tRP\tNegative\tESTABLISHED\tNegative\tNormal_N0\t13\t0\tT3A\t3\t4\t7\t152.55\tNO\tNO\t152.55\tNO\tNA\t37.937846\t3.593974\t55.082939\tNA\t1\tNA\r\nPCA0006\tPRIMARY\tNA\tWhite Non Hispanic\t15.7\t56.64\t3\t3\t6\t8.2\tT2B\tNA\tNA\tNeoadjuvant HORM\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t4\t0\tT2C\t3\t3\t6\t160.96\tNO\tNO\t160.96\tNO\tNA\tNA\tNA\tNA\tNA\t4\tNA\r\nPCA0016\tPRIMARY\tNA\tWhite Non Hispanic\t12\t67.36\t3\t3\t6\t12\tT2B\tNA\tNA\tNeoadjuvant HORM\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t2\t0\tT2C\t4\t4\t8\t74.22\tNO\tNO\t74.22\tNO\t99\tNA\tNA\tNA\t97.11015465\t2\tNA\r\nPCA0019\tPRIMARY\tNA\tWhite Non Hispanic\t6.6\t68.12\t3\t4\t7\t6.6\tT1C\tNA\tNA\tNA\tNA\tRP\tNegative\tNONE\tNegative\tNormal_N0\t1\t0\tT2C\t3\t3\t6\t110.33\tBCR_Algorithm\tNO\t123.67\tNO\tNA\tNA\tNA\tNA\t79.85545652\t2\tNA\r\nPCA0023\tPRIMARY\tNA\tBlack Non Hispanic\t4.3\t60.57\t4\t3\t7\t3.88\tT1C\tNA\tNA\tPostHORM\tNA\tRP\tPositive\tNONE\tNegative\tNormal_N0\t2\t0\tT2C\t4\t5\t9\t10.61\tBCR_Algorithm\tNO\t72.84\tDEATH FROM OTHER CANCER\t79.85546\t19.190208\t2.138938\t77.240045\t99\t4\tNA\r\n",
    "rows": [
      {
        "age": "68.93",
        "bcr_event": "NO",
        "bcr_freetime": "152.55",
        "chemotx": "NA",
        "clinical_gleason_score": "5",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "2",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "1",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "ESTABLISHED",
        "hormtx": "NA",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "37.937846",
        "nomogram_nomopred_lni": "3.593974",
        "nomogram_nomopred_ocd": "55.082939",
        "nomogram_nomopred_seminal_vesicle_invasion": "NA",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "13",
        "pathologic_gleason_score": "7",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "4",
        "pathologic_tnm_stage_t": "T3A",
        "phenotype_id": "PCA0004",
        "pre_treatment_psa": "11.8",
        "predxbxpsa": "27.5",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "152.55",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "56.64",
        "bcr_event": "NO",
        "bcr_freetime": "160.96",
        "chemotx": "NA",
        "clinical_gleason_score": "6",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "4",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "Neoadjuvant HORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "NA",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "4",
        "pathologic_gleason_score": "6",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "3",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0006",
        "pre_treatment_psa": "8.2",
        "predxbxpsa": "15.7",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "160.96",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "67.36",
        "bcr_event": "NO",
        "bcr_freetime": "74.22",
        "chemotx": "NA",
        "clinical_gleason_score": "6",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T2B",
        "copy_number_cluster": "2",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "Neoadjuvant HORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "97.11015465",
        "nomogram_pfp_postrp": "99",
        "number_nodes_positive": "0",
        "number_nodes_removed": "2",
        "pathologic_gleason_score": "8",
        "pathologic_primary_gleason": "4",
        "pathologic_secondary_gleason": "4",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0016",
        "pre_treatment_psa": "12",
        "predxbxpsa": "12",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "74.22",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "68.12",
        "bcr_event": "BCR_Algorithm",
        "bcr_freetime": "110.33",
        "chemotx": "NA",
        "clinical_gleason_score": "7",
        "clinical_primary_gleason": "3",
        "clinical_secondary_gleason": "4",
        "clinical_tnm_stage_t": "T1C",
        "copy_number_cluster": "2",
        "ethnicity": "White Non Hispanic",
        "event": "NO",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "NA",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "NA",
        "nomogram_nomopred_lni": "NA",
        "nomogram_nomopred_ocd": "NA",
        "nomogram_nomopred_seminal_vesicle_invasion": "79.85545652",
        "nomogram_pfp_postrp": "NA",
        "number_nodes_positive": "0",
        "number_nodes_removed": "1",
        "pathologic_gleason_score": "6",
        "pathologic_primary_gleason": "3",
        "pathologic_secondary_gleason": "3",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0019",
        "pre_treatment_psa": "6.6",
        "predxbxpsa": "6.6",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Negative",
        "survtime": "123.67",
        "tnm_stage_n": "Normal_N0"
      },
      {
        "age": "60.57",
        "bcr_event": "BCR_Algorithm",
        "bcr_freetime": "10.61",
        "chemotx": "NA",
        "clinical_gleason_score": "7",
        "clinical_primary_gleason": "4",
        "clinical_secondary_gleason": "3",
        "clinical_tnm_stage_t": "T1C",
        "copy_number_cluster": "4",
        "ethnicity": "Black Non Hispanic",
        "event": "DEATH FROM OTHER CANCER",
        "expression_array_tissue_source\r": "NA\r",
        "extra_capsular_extension": "NONE",
        "hormtx": "PostHORM",
        "metastatic_site": "NA",
        "metsevent": "NO",
        "neoadjradtx": "NA",
        "nomogram_nomopred_extra_capsular_extension": "19.190208",
        "nomogram_nomopred_lni": "2.138938",
        "nomogram_nomopred_ocd": "77.240045",
        "nomogram_nomopred_seminal_vesicle_invasion": "99",
        "nomogram_pfp_postrp": "79.85546",
        "number_nodes_positive": "0",
        "number_nodes_removed": "2",
        "pathologic_gleason_score": "9",
        "pathologic_primary_gleason": "4",
        "pathologic_secondary_gleason": "5",
        "pathologic_tnm_stage_t": "T2C",
        "phenotype_id": "PCA0023",
        "pre_treatment_psa": "3.88",
        "predxbxpsa": "4.3",
        "radtxtype": "NA",
        "rp_type": "RP",
        "sample_type": "PRIMARY",
        "seminal_vesicle_invasion": "Negative",
        "sms": "Positive",
        "survtime": "72.84",
        "tnm_stage_n": "Normal_N0"
      }
    ],
    "uri": "/repo/v1/preview/3876"
  }],
  "totalNumberOfResults": 1
}


Get the locations for a Clinical Dataset Layer

This returns all the locations metadata for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/3874/location'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:06 GMT
Server: Apache-Coyote/1.1
Content-Length: 704
Connection: keep-alive

{
  "paging": {},
  "results": [{
    "accessControlList": "/repo/v1/location/3875/acl",
    "annotations": "/repo/v1/location/3875/annotations",
    "contentType": null,
    "creationDate": 1312573849176,
    "etag": "0",
    "id": "3875",
    "md5sum": "b513a23fc54b7b0d65312e1a900af5a6",
    "name": "3875",
    "parentId": "3874",
    "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918906&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=Rb%2BXDamGfltAbWKGZsifuo0qdgA%3D",
    "type": "awss3",
    "uri": "/repo/v1/location/3875",
    "versionComment": null,
    "versionLabel": "0.0.0",
    "versionNumber": 1,
    "versionUrl": "/repo/v1/location/3875/version/1",
    "versions": "/repo/v1/location/3875/version"
  }],
  "totalNumberOfResults": 1
}


Get the awss3 for a Clinical Dataset Layer

This returns the location data for a dataset layer.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/3875'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:06 GMT
ETag: 0
Server: Apache-Coyote/1.1
Content-Length: 653
Connection: keep-alive

{
  "accessControlList": "/repo/v1/location/3875/acl",
  "annotations": "/repo/v1/location/3875/annotations",
  "contentType": null,
  "creationDate": 1312573849176,
  "etag": "0",
  "id": "3875",
  "md5sum": "b513a23fc54b7b0d65312e1a900af5a6",
  "name": "3875",
  "parentId": "3874",
  "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918906&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=Rb%2BXDamGfltAbWKGZsifuo0qdgA%3D",
  "type": "awss3",
  "uri": "/repo/v1/location/3875",
  "versionComment": null,
  "versionLabel": "0.0.0",
  "versionNumber": 1,
  "versionUrl": "/repo/v1/location/3875/version/1",
  "versions": "/repo/v1/location/3875/version"
}


An example to fetch the file using curl:

Code Block
curl -o local/path/to/file.zip 'https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918906&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=Rb%2BXDamGfltAbWKGZsifuo0qdgA%3D'

An example to conditionally fetch the file using curl:

Code Block
curl -i -H If-None-Match:b513a23fc54b7b0d65312e1a900af5a6 'https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918906&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=Rb%2BXDamGfltAbWKGZsifuo0qdgA%3D'

HTTP/1.1 304 Not Modified
x-amz-id-2: h3qt9NfdRw7utcyVMCZF/dNRto9ZpmKY56w69HNpuMkNsaDv9MgduGY9L3zBQWl
x-amz-request-id: 3AADDC9EF832ADD2
Date: Tue, 07 Jun 2011 18:40:15 GMT
Last-Modified: Tue, 05 Apr 2011 00:42:50 GMT
ETag: "b513a23fc54b7b0d65312e1a900af5a6"
Server: AmazonS3

Get the awss3 for a Clinical Dataset Layer for HTTP method HEAD

This returns the location data for a dataset layer with the S3 URL presigned for a HEAD request instead of the default GET.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/3875?method=HEAD'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
ETag: 0
Server: Apache-Coyote/1.1
Content-Length: 653
Connection: keep-alive

{
  "accessControlList": "/repo/v1/location/3875/acl",
  "annotations": "/repo/v1/location/3875/annotations",
  "contentType": null,
  "creationDate": 1312573849176,
  "etag": "0",
  "id": "3875",
  "md5sum": "b513a23fc54b7b0d65312e1a900af5a6",
  "name": "3875",
  "parentId": "3874",
  "path": "https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918907&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=UO%2FtfA18HQxed317Nq4YU7ZjPnQ%3D",
  "type": "awss3",
  "uri": "/repo/v1/location/3875",
  "versionComment": null,
  "versionLabel": "0.0.0",
  "versionNumber": 1,
  "versionUrl": "/repo/v1/location/3875/version/1",
  "versions": "/repo/v1/location/3875/version"
}


An example double check that Synapse's MD5 matches the one in S3 using curl:

Code Block
curl -I -H If-Match:b513a23fc54b7b0d65312e1a900af5a6 'https://s3.amazonaws.com/stagingdata.sagebase.org/3875/0.0.0/mskcc_prostate_cancer.phenotype.zip?Expires=1317918907&AWSAccessKeyId=AKIAJQBSYCAUPIYF5WTA&Signature=UO%2FtfA18HQxed317Nq4YU7ZjPnQ%3D'

HTTP/1.1 200 OK
x-amz-id-2: h3qt9NfdRw7utcyVMCZF/dNRto9ZpmKY56w69HNpuMkNsaDv9MgduGY9L3zBQWl
x-amz-request-id: 3AADDC9EF832ADD2
Date: Tue, 07 Jun 2011 18:40:15 GMT
Last-Modified: Tue, 05 Apr 2011 00:42:50 GMT
ETag: "b513a23fc54b7b0d65312e1a900af5a6"
Accept-Ranges: bytes
Content-Type: application/binary
Content-Length: 30681
Server: AmazonS3

Get storage usage

Login required to get the storage usage associated with the current user.

Get aggregated storage usage

Gets aggregated totals over a list of aggregation dimensions.  The list of aggregation dimensions are concatenated by comma and assigned to the query parameter 'aggregation'.  The list of valid aggregating dimensions are defined in StorageUsageDimension (See Synapse Entity Types).  Except for USER_ID and ENTITY_ID, which are reserved for administrators, any combination of aggregations is accepted.  The following example aggregates over STORAGE_PROVIDER and CONTENT_TYPE.

Request

Code Block
languagebash
curl -i -H sessionToken:<yourSessionToken> -H Accept:application/json https://repo-staging.sagebase.org/repo/v1/storageSummary?aggregation=STORAGE_PROVIDER,CONTENT_TYPE

Response

Expand
title[Click to show]
Code Block
languagebash
{
    "summaryList": [
        {
            "aggregatedCount": 1, 
            "aggregatedSize": 14330, 
            "dimensionList": [
                {
                    "dimension": "STORAGE_PROVIDER", 
                    "value": "awss3"
                }, 
                {
                    "dimension": "CONTENT_TYPE", 
                    "value": "application/pdf"
                }
            ]
        }, 
        {
            "aggregatedCount": 2, 
            "aggregatedSize": 55298, 
            "dimensionList": [
                {
                    "dimension": "STORAGE_PROVIDER", 
                    "value": "awss3"
                }, 
                {
                    "dimension": "CONTENT_TYPE", 
                    "value": "image/png"
                }
            ]
        }, 
        {
            "aggregatedCount": 1, 
            "aggregatedSize": 6956953, 
            "dimensionList": [
                {
                    "dimension": "STORAGE_PROVIDER", 
                    "value": "awss3"
                }, 
                {
                    "dimension": "CONTENT_TYPE", 
                    "value": "text/plain"
                }
            ]
        }
    ], 
    "totalCount": 4, 
    "totalSize": 7026581
}

 

Get detailed storage usage

To see details, the following URL fetches the list of storage items for the current user.

Request

Code Block
languagebash
curl -i -H sessionToken:<yourSessionToken> -H Accept:application/json https://repo-staging.sagebase.org/repo/v1/storageDetails

Response

Expand
title[Click to show]
Code Block
languagebash
{
    "paging": {
        "previous": "/repo/v1/storageDetails?offset=1&limit=100"
    }, 
    "results": [
        {
            "contentMd5": "2f1f4348a5452110ad9490609dd4dcb8", 
            "contentSize": 29129, 
            "contentType": "image/png", 
            "id": "134053", 
            "isAttachment": true, 
            "location": "/1439206/1439207/Austria.png", 
            "nodeId": "syn1439206", 
            "storageProvider": "awss3", 
            "userId": "1439205"
        }, 
        {
            "contentMd5": "27faaf994136363f2885bd9acb1a4472", 
            "contentSize": 26169, 
            "contentType": "image/png", 
            "id": "134054", 
            "isAttachment": true, 
            "location": "/1439206/1439209/Switzerland.png", 
            "nodeId": "syn1439206", 
            "storageProvider": "awss3", 
            "userId": "1439205"
        }, 
        {
            "contentMd5": "7d96b9ebe9bb283b33bf6ff143cd4ab7", 
            "contentSize": 14330, 
            "contentType": "application/pdf", 
            "id": "134055", 
            "isAttachment": true, 
            "location": "/1439206/1439214/Trees-In-MangoDB.pdf", 
            "nodeId": "syn1439206", 
            "storageProvider": "awss3", 
            "userId": "1439205"
        }, 
        {
            "contentMd5": "efd1c2a7b2f7b8f3db618e673e7915c2", 
            "contentSize": 6956953, 
            "contentType": "text/plain", 
            "id": "134056", 
            "isAttachment": false, 
            "location": "/1439215/1439218/Digester.txt", 
            "nodeId": "syn1439215", 
            "storageProvider": "awss3", 
            "userId": "1439205"
        }
    ], 
    "totalNumberOfResults": 4
}

Note that the results are paginated.

Get detailed storage usage for an entity

To see the list of storage items for a particular entity, use the following URL.

Request

Code Block
languagebash
curl -i -H sessionToken:<yourSessionToken> -H Accept:application/json https://repo-staging.sagebase.org/repo/v1/storageDetails/entity/<entityID>

Response

Expand
title[Click to show]
Code Block
Code Block
languagebash
{
    "paging": {
        "previous": "/repo/v1/storageDetails?offset=1&limit=100"
    }, 
    "results": [
        {
            "contentMd5": "2f1f4348a5452110ad9490609dd4dcb8", 
            "contentSize": 29129, 
            "contentType": "image/png", 
            "id": "134053", 
            "isAttachment": true, 
            "location": "/1439206/1439207/Austria.png", 
            "nodeId": "syn1439206", 
            "storageProvider": "awss3", 
            "userId": "1439205"
        }, 
        {
            "contentMd5": "27faaf994136363f2885bd9acb1a4472", 
            "contentSize": 26169, 
            "contentType": "image/png", 
            "id": "134054", 
            "isAttachment": true, 
            "location": "/1439206/1439209/Switzerland.png", 
            "nodeId": "syn1439206", 
            "storageProvider": "awss3", 
            "
uri
userId": "
/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
1439205"
        }, 
        {
            "
id
contentMd5":
"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
 "7d96b9ebe9bb283b33bf6ff143cd4ab7", 
            "contentSize": 14330, 
            "
type
contentType": "
E
application/pdf", 
            "
uri
id": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
134055", 
      
},
      
{
"isAttachment": true, 
            "
id
location":
"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA
 "/1439206/1439214/Trees-In-MangoDB.pdf", 
            "
type
nodeId": "
G
syn1439206", 
            "
uri
storageProvider": "
/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
awss3", 
 
}
    
]
 
}
 

Get Annotations for a Dataset

Request

 
curl
 
-i
 
-H
 
Accept:application/json
 "userId"
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":[
: "1439205"
        },
    ], 
    "totalNumberOfResults": 3
}

Get the descendants of an entity

Note that the query for descendants is based on secondary indices which are eventually consistent.  You may not be able to see the complete list of descendants immediately.

Get all the descendants of an entity

Get all the descendants of an entity. The results are paginated. Use the optional query parameter limit to set the maximum page size. The default page size is 20. To fetch the next page, find the last entity (descendant) on the current page and use its ID to set the query parameter lastEntityId. Here is an example:

Code Block
languagebash
titleRequest for getting the first page
curl -i -H sessionToken:<yourToken> -H Accept:application/json 'https://repo.prod.sagebase.org/repo/v1/entity/<entityID>/descendants&limit=2'
Code Block
languagebash
titleResponse for getting the first page
{
    "idList": [
        {
            "id": "Cancersyn111"
      ],  }, 
   "Tumor / Tissue Type":[  {
       "Glioblastoma"     "id": "syn112"
],       "Species":[ }
    ]
}

 "Human"
      ],
 
Code Block
languagebash
titleRequest for getting the second page
curl -i -H sessionToken:<yourToken> -H Accept:application/json 'https://repo.prod.sagebase.org/repo/v1/entity/<entityID>/descendants?limit=20&lastEntityId=syn112'
Code Block
languagebash
titleResponse for getting the second page
{
    "InstitutionidList": [
         "TCGA"{
      ],       "Reference / PubMed ID":[
         "18772890"id": "syn113"
     ]
   }, 
  "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
{        "id": "syn114"
        }, 
        {
            "resultsid":[
 "syn115"
        }
    ]
{
         "name":"Pediatric AML TARGET",
         "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA/annotations",
         "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA",
}

Get the descendants of a specific generation

Get all the descendants that are exactly n generations away. The children is generation 1. Children's children are generation 2. So on and so forth. The results are paginated in the same manner. To fetch the next page, find the last entity (descendant) on the current page and use its ID to set the query parameter lastEntityId.  Here is an example:

Code Block
languagebash
titleRequest for getting the descendants of the 2nd generation
curl -i -H sessionToken:<yourToken> -H Accept:application/json 'https://repo.prod.sagebase.org/repo/v1/entity/<entityID>/descendants/2'
Code Block
languagebash
titleResponse for getting the descendants of the 2nd generation
{
    "idList": [
        "version":"0.0.1",{
         "description":null,
         "statusid": "In Transitionsyn114",
         "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA"}, 
        "etag":"1703131409",{
         "creator":"Soheil Meshinchi",
         "creationDateid":1296182253120,
         "releaseDate":null,
   syn115"
     "layers":[   }
    ]
}

 

References

Find reference to any version of an entity

Request

Code Block
curl -i  -H {sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/entity/6/referencedby'

Response

Expand
title[Click to show]
Code Block
{
  "paging": {},
  "results": [{
    "id": "
agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
9599",
    "name": "Analysis Step",
    
"type": "
C
step"
,

  }],
  "totalNumberOfResults": 1
}


Find reference to a specific version of an entity

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H   "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
            Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/entity/6/version/1/referencedby'

Response

Expand
title[Click to show]
Code Block
{
  "paging": {},
  
"results": [{
    
"id": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
9599",

    
"type
"name": "
E
Analysis Step",

    
"
uri
type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
step"
  }],
  "totalNumberOfResults": 1
}


Schemas

Query Results Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json  {
               "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
               "type":"G",
      'https://repo-staging.sagebase.org/repo/v1/query/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
Content-Length: 126
Connection: keep-alive

{
  "properties": {
    "results": {
      "items": 
{"
uri
type": "
/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" }
object"},
      
]
"type": "array"
    
},
    
"totalNumberOfResults": {"type": "number"}
  
},
  "
name
type": "object"
Flint HS Mice", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA/annotations", "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA", "version":"0.0.1",

}


Project Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/project/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "
description
accessControlList":
null, "status
 {"type": "
Future
string"},
    
"uri
"annotations": {"type":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA"
 "string"},
    
"
etag
creationDate":
"1025901212", "creator":"Jonathan Flint"
 {"type": "number"},
    
"
creationDate
creator":
1296182255070, "releaseDate":null, "layers":[
 {"type": "string"},
    "description": {"type": "string"},
    "etag": {"type": "string"},
    
"id
"id": {"type": "
agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
string"},
    "name": {"type": "string"},
    
"parentId": {"type": "
C
string"},
    "uri": {"type": "string"}
  
},
  "
uri
type": "
/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
object"
}


Eula Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/eula/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "accessControlList": {"type": "string"},
    
"agreement": {"type": "
E
string"},
    "agreementBlob": {
      
"uri
"items": {"type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
string"},
      "type": "array"
    },
    
{ "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
"annotations": {"type": "string"},
    
"creationDate": {"type": "
G
number"},
    
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA" }
"etag": {"type": "string"},
    "id": 
] },
{"type": "string"},
    "name": {"type": "string"},
    
"name
"parentId": {"type": "
Glioblastoma TCGA
string"},
    
"annotations
"uri": {"type":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
 "string"}
  },
  
"
id
type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA
object"
, "version":"0.0.1", "description":null, "status":"Available", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA"

}


Agreement Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/agreement/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "accessControlList": {"type": "string"},
    
"etag
"annotations": {"type": "
456728335
string"},
    "createdBy": 
"creator":null
{"type": "string"},
    
"creationDate":
1296182238229,
 
"releaseDate":null,
{"type": "number"},
    "
layers
datasetId":
[
 
{
"id
"type": "
agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
string"},
    
"datasetVersionNumber": {"type": "
C
number"},
    
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
"etag": {"type": "string"},
    
{
"eulaId": {"type": "string"},
    "eulaVersionNumber": {"type": "number"},
    "id": {"
id
type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
string"},
    "name": {"type": "string"},
    
"parentId": {"type": "
E
string"},
    "uri": {"type": "string"}
  
},
  "
uri
type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
object"
}


Dataset Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: 
}
Wed, 05 Oct 2011 16:35:07 GMT
{
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    
"id
"accessControlList": {"type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA
string"},
    "annotations": {"type": "string"},
    
"creationDate": {"type": "
G
number"},
    "creator": {"type": "string"},
    
"uri
"description": {"type": "
/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
string"},
    "etag": 
}
{"type": "string"},
    "eulaId": 
] } ],
{"type": "string"},
    "
totalNumberOfResults
hasClinicalData":
10,
 
{"
paging
type":
{
 "boolean"},
    "hasExpressionData": {"
next
type":
"/repo/v1/dataset?offset=4&limit=3" } }

Create a Dataset

Request:

Code Block

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

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/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":[
      {
         "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
         "type":"C",
         "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
      },
      {
         "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
         "type":"E",
         "uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
      },
      {
         "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
         "type":"G",
         "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
      }
   ]
}

Add Annotations to a Dataset

First get the empty annotations container for your newly created dataset

Request

Code Block

curl -i http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations

Response

Code Block

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":{

   }
}

Request

Code Block
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"]
 "boolean"},
    "hasGeneticData": {"type": "boolean"},
    "id": {"type": "string"},
    "layers": {"type": "string"},
    "locations": {"type": "string"},
    "name": {"type": "string"},
    "parentId": {"type": "string"},
    "releaseDate": {"type": "number"},
    "status": {"type": "string"},
    "uri": {"type": "string"},
    "version": {"type": "string"}
  },
  "type": "object"
}


Layer Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/layer/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "accessControlList": {"type": "string"},
    "annotations": {"type": "string"},
    "creationDate": {"type": "number"},
    "description": {"type": "string"},
    "etag": {"type": "string"},
    "id": {"type": "string"},
    "locations": {"type": "string"},
    "name": {"type": "string"},
    "numSamples": {"type": "number"},
    "parentId": {"type": "string"},
    "platform": {"type": "string"},
    "previews": {"type": "string"},
    "processingFacility": {"type": "string"},
    "publicationDate": {"type": "number"},
    "qcBy": {"type": "string"},
    "qcDate": {"type": "number"},
    "releaseNotes": {"type": "string"},
    "status": {"type": "string"},
    "tissueType": {"type": "string"},
    "type": {"type": "string"},
    "uri": {"type": "string"},
    "version": {"type": "string"}
  },
  "type": "object"
}


Layer Preview Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/preview/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "accessControlList": {"type": "string"},
    "annotations": {"type": "string"},
    "creationDate": {"type": "number"},
    "etag": {"type": "string"},
    "headers": {
      "items": {"type": "string"},
      "type": "array"
    },
    "
floatAnnotations
id": {"type": "string"},
    "name": {"type": 
"Number of Samples":[500] },
"string"},
    "parentId": {"type": "string"},
    "
dateAnnotations
previewBlob": {
      "items": 
{"
Publication Date
type":
["2011-01-15"] } }' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations

Response

Code Block
HTTP/1.1 200 OK ETag: -1638393853 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww",
 "string"},
      "type": "array"
    },
    "previewString": {"type": "string"},
    "
creationDate
rows":
null,
 {
      
"uri
"items": {"type":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww/annotations",
 "object"},
      "
etag
type": "
-1638393853",
array"
    },
    "
stringAnnotations
uri": {"type": "string"}
  },
  
"Experimental Design Templates":[ "exp-122887", "exp-97765" ] }, "floatAnnotations":{ "Number of Samples":[ 500.0 ]
"type": "object"
}


Dataset or Layer Locations Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/location/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
Content-Length: 532
Connection: keep-alive

{
  "properties": {
    "accessControlList": {"type": "string"},
    "annotations": {"type": "string"},
    "
dateAnnotations
contentType": {
"Publication Date
"type":
[
 "string"},
    
1295049600000 ] } }

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 '{
"creationDate": {"type": "number"},
    "etag": {"type": "string"},
    "
name
id": {"
test dataset"
type": "string"},
   
"annotations
 "md5sum": {"type":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
 "string"},
    "name": {"
id
type": "
agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
string"},
    "parentId": {"
version
type": "
0.0.1
string"},
    "
creator
path": {"type"
updated
: 
creator
"string"},
    "
description
type": {"type"
I just added a description", "creationDate":1296595870715
: "string"},
    "uri": {"type": "string"},
    "
status
versionComment": {"
not curated"
type": "string"},
   
"uri
 "versionLabel": {"type":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
 "string"},
    "versionNumber": {"
etag
type": "
1309185941
number"},
    "
releaseDate
versionUrl":
1254355200000,
 
{"
layers
type":
[
 "string"},
    "versions": {"type": "string"}
  
},
  
"
id
type": "
agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
object"
, "type":"C", "uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw" }, { "id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"

}


Annotations Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i  -H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/annotations/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  "properties": {
    "blobAnnotations": {"type": "object"},
    "creationDate": {"type": "number"},
    
"dateAnnotations": {"type": "
E
object"},
    
"uri
"doubleAnnotations": {"type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA
object"},
    "etag": {"type": "string"},
    "id": 
{"type": "string"},
    
"id
"longAnnotations": {"type": "
agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA
object"},
    
"stringAnnotations": {"type": "
G
object"},
    
"uri
"uri": {"type": "
/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA
string"}
  },
  "type": "object"
}


Access Control List Schema

The JsonSchema is an emerging standard similar to DTDs for XML.

Request

Code Block
curl -i   ]
}
' http://localhost:8080-H sessionToken:YourSessionToken -H Accept:application/json 'https://repo-staging.sagebase.org/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw

...

acl/schema'

Response

Expand
title[Click to show]
Code Block
HTTP/1.1 200 OK
ETag: -852418664
Content-Type: application/json
Transfer-Encoding: chunked

Date: Wed, 05 Oct 2011 16:35:07 GMT
Server: 
Jetty(6.1.x)
Apache-Coyote/1.1
transfer-encoding: chunked
Connection: keep-alive

{
  
"
name
properties":
"test dataset",
 {
    "
annotations
createdBy":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
 {"type": "string"},
    "
version
creationDate":
"0.0.1", "creator
 {"type": "
updated creator
number"},
    "
description
etag": {"type"
I just added a description"
: "string"},
    "
creationDate
id":
1296595870715,
 
{"
status
type": "
not curated
string"},
    "
uri
modifiedBy":
"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw", "etag":"-852418664"
 {"type": "string"},
    "
releaseDate
modifiedOn":
1254355200000,
 
{"
layers":[ {
type": "number"},
    
"
id
resourceAccess":
"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
 {
      "
type
items":
"C",
 {
        "
uri
properties":
"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
 {
     
},
     "accessType": {
  
{
          "
id
items":
"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
 {"type": "string"},
            "type": "
E
array"
,

         
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
 },
     
},
     "groupName": 
{"type": "string"}
        
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
},
        "type": "
G
object"
,

      },
      "
uri
type": "
/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA
array"
    },
 
}
   
] }

Delete a Dataset

Request

Code Block

curl -i -X DELETE http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw

Response

Code Block
HTTP/1.1 204 No Content Server: Jetty(6.1.x)
"uri": {"type": "string"}
  },
  "type": "object"
}