Example query 4: Find all cases with a given age at diagnosis and a particular disease

Use the following query to return all cases that have an age at diagnosis of between 10 and 50 and also have the disease "Kidney Chromophobe". This query specifies values for multiple metadata fields: hasAgeAtDiagnosis and hasDiseaseType. To conjoin multiple criteria in the query, simply list them consecutively, as in this example.

Request

POST /datasets/tcga/v0/query HTTP/1.1
Host: cgc-datasets-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9304ea9d9273156740f74
{
   "entity":"cases",
   "hasAgeAtDiagnosis": {
       "filter": {
        "gt": 10,
        "lt": 50}
   },
   "hasDiseaseType": "Kidney Chromophobe"
}

Response

This request returns the following response:

{
  "count": 55,
  "_embedded": {
    "cases": [
      {
        "id": "02971234-5149-4750-ABCD-483E0BEC6AC5",
        "label": "02971234-5149-4750-ABCD-483E0BEC6AC5",
        "_links": {
          "self": {
            "href": "api.sbgenomics.com/datasets/tcga/v0/cases/02971234-5149-4750-ABCD-483E0BEC6AC5"
          }
        }
      },
      {
        "id": "04E9A63A-D742-456B-7890-BF9D79AA2091",
        "label": "04E9A63A-D742-456B-7890-BF9D79AA2091",
        "_links": {
          "self": {
            "href": "api.sbgenomics.com/datasets/tcga/v0/cases/04E9A63A-D742-456B-7890-BF9D79AA2091"
          }
        }
      },
      {
        "id": "0B77657A-789C-456B-B9F2-5DE72E182016",
        "label": "0B77657A-789C-456B-B9F2-5DE72E182016",
        "_links": {
          "self": {
            "href": "api.sbgenomics.com/datasets/tcga/v0/cases/0B77657A-789C-456B-B9F2-5DE72E182016"
          }
        }
      },
      {
        "id": "0BDE80B4-123A-443E-B386-B44D9D5E3DC2",
        "label": "0BDE80B4-123A-443E-B386-B44D9D5E3DC2",
        "_links": {
          "self": {
            "href": "api.sbgenomics.com/datasets/tcga/v0/cases/0BDE80B4-123A-443E-B386-B44D9D5E3DC2"
          }
        }
      },
  
        <snip>
  
    ]
  }
}

For each case matching the query, the following information is listed:

Language