{"_id":"588b69c52966b2230009cc21","project":"55faf11ba62ba1170021a9a7","__v":0,"version":{"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","__v":37,"createdAt":"2015-09-17T16:58:03.490Z","releaseDate":"2015-09-17T16:58:03.490Z","categories":["55faf11ca62ba1170021a9ab","55faf8f4d0e22017005b8272","55faf91aa62ba1170021a9b5","55faf929a8a7770d00c2c0bd","55faf932a8a7770d00c2c0bf","55faf94b17b9d00d00969f47","55faf958d0e22017005b8274","55faf95fa8a7770d00c2c0c0","55faf96917b9d00d00969f48","55faf970a8a7770d00c2c0c1","55faf98c825d5f19001fa3a6","55faf99aa62ba1170021a9b8","55faf99fa62ba1170021a9b9","55faf9aa17b9d00d00969f49","55faf9b6a8a7770d00c2c0c3","55faf9bda62ba1170021a9ba","5604570090ee490d00440551","5637e8b2fbe1c50d008cb078","5649bb624fa1460d00780add","5671974d1b6b730d008b4823","5671979d60c8e70d006c9760","568e8eef70ca1f0d0035808e","56d0a2081ecc471500f1795e","56d4a0adde40c70b00823ea3","56d96b03dd90610b00270849","56fbb83d8f21c817002af880","573c811bee2b3b2200422be1","576bc92afb62dd20001cda85","5771811e27a5c20e00030dcd","5785191af3a10c0e009b75b0","57bdf84d5d48411900cd8dc0","57ff5c5dc135231700aed806","5804caf792398f0f00e77521","58458b4fba4f1c0f009692bb","586d3c287c6b5b2300c05055","58ef66d88646742f009a0216","58f5d52d7891630f00fe4e77"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"58458b4fba4f1c0f009692bb","project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-12-05T15:44:15.650Z","from_sync":false,"order":6,"slug":"datasets-hub","title":"DATASETS HUB"},"parentDoc":null,"user":"5613e4f8fdd08f2b00437620","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-27T15:39:49.644Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":40,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"On this page:\",\n  \"body\": \"* [Overview](#section-overview)\\n* [Search by term](#section-search-by-term)\\n * [Path](#term-path)\\n * [Header fields](#term-header-fields))\\n * [Query parameters](#term-query-parameters)\\n * [Example request](#term-example-request)\\n * [Example response](#term-example-response)\\n* [Search by URI](#section-search-by-uri)\\n * [Path](#uri-path)\\n * [Header fields](#uri-header-fields)\\n * [Query parameters](#uri-query-parameters)\\n * [Example request](#uri-example-request)\\n * [Example response](#uri-example-response)\"\n}\n[/block]\n##Overview\n\nSearch through datasets using the Datasets API by issuing `GET` requests. On this page, we'll introduce the structure of two types of search requests: [search by term](#section-search-by-term) and [search by Unique Resource Identifier (URI)](#section-search-by-uri). First, search by term to find all exact matches for your free-text search across all databases. Then, use the URIs obtained in the initial search to obtain further details, including individual members matching the designated resource.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n##Search by term\n\nThis is a free-text search by term for exact matches in the metadata across all databases. Use search terms fro metadata for this request. Learn more about [metadata for datasets](doc:about-metadata-for-datasets).\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"term-path\"></a>\n###Path\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://cgc-datasets-api.sbgenomics.com/search\",\n      \"language\": \"text\",\n      \"name\": \"Path\"\n    }\n  ]\n}\n[/block]\n<a name=\"term-header-fields\"></a>\n###Header fields\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`X-SBG-Auth-Token`\\nrequired\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Your CGC [authentication token](doc:get-your-authentication-token)\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"term-query-parameters\"></a>\n###Query parameters\n[block:parameters]\n{\n  \"data\": {\n    \"0-2\": \"Data matching this search `term` will be returned. Note that the `term` must be an exact complete string for the results to match.\",\n    \"0-0\": \"`term`\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Datatype\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"string\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"term-example-request\"></a>\n###Example request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /search?term=brca HTTP/1.1\\nHost: cgc-datasets-api.sbgenomics.com\\nX-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96\",\n      \"language\": \"http\",\n      \"name\": \"Example request\"\n    }\n  ]\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"term-example-response\"></a>\n###Example response\n\nThis will return a list of results from datasets accessible through the CGC, grouped by the dataset to which they belong, as shown below.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"tcga\\\": [\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2002/07/owl#NamedIndividual\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/disease_type/brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2014/11/tcga#Utility\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/disease_type/brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2000/01/rdf-schema#Resource\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/disease_type/brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2014/11/tcga#Diagnosis\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/disease_type/brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2014/11/tcga#DiseaseType\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/disease_type/brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2002/07/owl#NamedIndividual\\\",\\n      \\\"label\\\": \\\"TCGA-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/investigation/tcga-brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2014/11/tcga#Utility\\\",\\n      \\\"label\\\": \\\"TCGA-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/investigation/tcga-brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2000/01/rdf-schema#Resource\\\",\\n      \\\"label\\\": \\\"TCGA-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/investigation/tcga-brca\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2014/11/tcga#Investigation\\\",\\n      \\\"label\\\": \\\"TCGA-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/tcga/investigation/tcga-brca\\\"\\n    }\\n  ],\\n  \\\"ccle\\\": [\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2002/07/owl#NamedIndividual\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/disease_type_abbr/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Clinical\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/disease_type_abbr/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#DiseaseTypeAbbreviation\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/disease_type_abbr/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/disease_type_abbr/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2000/01/rdf-schema#Resource\\\",\\n      \\\"label\\\": \\\"BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/disease_type_abbr/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2002/07/owl#NamedIndividual\\\",\\n      \\\"label\\\": \\\"CCLE-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/investigation/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Investigation\\\",\\n      \\\"label\\\": \\\"CCLE-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/investigation/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\\\",\\n      \\\"label\\\": \\\"CCLE-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/investigation/03\\\"\\n    },\\n    {\\n      \\\"type\\\": \\\"http://www.w3.org/2000/01/rdf-schema#Resource\\\",\\n      \\\"label\\\": \\\"CCLE-BRCA\\\",\\n      \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/investigation/03\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nFor each result, the response lists:\n  * **Its `type`:** This is an URI assigned to a property within a [CGC-hosted database's namespace](http://docs.cancergenomicscloud.org/docs/sparql-basics#section-uniform-resource-identifiers) or within the [RDF Schema namespace defined by W3C](https://www.w3.org/TR/rdf-schema/#ch_summary) which contains the result.\n  * **Its `label`:** This is a human-readable form of a result.\n  * **Its `uri`:** This is an URI assigned to an entity and its ID within a [CGC-hosted database's namespace](http://docs.cancergenomicscloud.org/docs/sparql-basics#section-uniform-resource-identifiers).\n\nNote if your search term does not match any results, empty brackets `[]` are returned.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n##Search by URI\n\nStart from a free-text [search by term](#section-search-by-term) request, as described above. Use an `uri` obtained in the response as the starting point to obtain further details, including individual members matching the designated resource. Note that this `uri` must be in a [URL-encoded format](http://www.w3schools.com/tags/ref_urlencode.asp).\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"uri-path\"></a>\n###Path\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://cgc-datasets-api.sbgenomics.com/describe\",\n      \"language\": \"text\",\n      \"name\": \"Path\"\n    }\n  ]\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"uri-header-fields\"></a>\n\n###Header fields\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`X-SBG-Auth-Token`\\nrequired\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Your CGC [authentication token](doc:get-your-authentication-token)\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"uri-query-parameters\"></a>\n\n###Query parameters\n[block:parameters]\n{\n  \"data\": {\n    \"0-2\": \"Use an `uri` obtained via a [search by term](#section-search-by-term) request. Note that only exact results will be returned. This `uri` must be in a [URL-encoded format](http://www.w3schools.com/tags/ref_urlencode.asp).\",\n    \"0-0\": \"`uri`\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Datatype\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"string\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"uri-example-request\"></a>\n###Example request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /describe?uri=https%3A%2F%2Fwww.sbgenomics.com%2Fccle%2Finvestigation%2F03 HTTP/1.1\\nHost: cgc-datasets-api.sbgenomics.com\\nX-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96\",\n      \"language\": \"http\",\n      \"name\": \"Example request\"\n    }\n  ]\n}\n[/block]\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n<a name=\"uri-example-response\"></a>\n###Example response\n\nThis will return a list of results from datasets accessible through the CGC, as shown below.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"tcga\\\": {},\\n  \\\"uri\\\": \\\"https://www.sbgenomics.com/ccle/investigation/03\\\",\\n  \\\"ccle\\\": {\\n    \\\"http://www.w3.org/2000/01/rdf-schema#label\\\": [\\n      \\\"CCLE-BRCA\\\"\\n    ],\\n    \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#hasInvestigation\\\": [\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-AU565\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-20\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-474\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-483\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-549\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-120\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-148\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-51\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-85-1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAMA-1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-DU4475\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-EFM-19\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-EFM-192A\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1143\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1143BL\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1187\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1395\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1419\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1428\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1500\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1569\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1599\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1806\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1937\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1954\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1954BL\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC202\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC2157\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC2218\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC38\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC70\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HDQ-P1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HMC-1-8\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs274.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs281.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs343.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs578T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs606.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs739.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs742.T\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-JIMT-1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-KPL-1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MCF7\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-134-VI\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-157\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-175-VII\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-231\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-361\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-415\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-435S\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-436\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-453\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-468\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-SK-BR-3\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-T-47D\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-UACC-812\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-UACC-893\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-ZR-75-1\\\",\\n      \\\"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-ZR-75-30\\\"\\n    ],\\n    \\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\\\": [\\n      \\\"http://www.w3.org/2002/07/owl#NamedIndividual\\\",\\n      \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Investigation\\\",\\n      \\\"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\\\",\\n      \\\"http://www.w3.org/2000/01/rdf-schema#Resource\\\"\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nFor each result, the response lists the URIs for the individual members of each property which matches your search terms. For instance, the cell line `https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-AU565` is returned for `https://www.sbgenomics.com/ontologies/2016/5/ccle#hasInvestigation`.\n\nNote if your search term does not match any results, empty brackets `{}` are returned.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>","excerpt":"<a href=\"query-datasets\" style=\"color:#132c56\">QUERY DATASETS</a> > <a href=\"about-the-datasets-api\" style=\"color:#132c56\">About the Datasets API</a> > Search via the Datasets API","slug":"search-via-the-datasets-api","type":"basic","title":"↳Search via the Datasets API"}

↳Search via the Datasets API

<a href="query-datasets" style="color:#132c56">QUERY DATASETS</a> > <a href="about-the-datasets-api" style="color:#132c56">About the Datasets API</a> > Search via the Datasets API

[block:callout] { "type": "warning", "title": "On this page:", "body": "* [Overview](#section-overview)\n* [Search by term](#section-search-by-term)\n * [Path](#term-path)\n * [Header fields](#term-header-fields))\n * [Query parameters](#term-query-parameters)\n * [Example request](#term-example-request)\n * [Example response](#term-example-response)\n* [Search by URI](#section-search-by-uri)\n * [Path](#uri-path)\n * [Header fields](#uri-header-fields)\n * [Query parameters](#uri-query-parameters)\n * [Example request](#uri-example-request)\n * [Example response](#uri-example-response)" } [/block] ##Overview Search through datasets using the Datasets API by issuing `GET` requests. On this page, we'll introduce the structure of two types of search requests: [search by term](#section-search-by-term) and [search by Unique Resource Identifier (URI)](#section-search-by-uri). First, search by term to find all exact matches for your free-text search across all databases. Then, use the URIs obtained in the initial search to obtain further details, including individual members matching the designated resource. <div align="right"><a href="#top">top</a></div> ##Search by term This is a free-text search by term for exact matches in the metadata across all databases. Use search terms fro metadata for this request. Learn more about [metadata for datasets](doc:about-metadata-for-datasets). <div align="right"><a href="#top">top</a></div> <a name="term-path"></a> ###Path [block:code] { "codes": [ { "code": "http://cgc-datasets-api.sbgenomics.com/search", "language": "text", "name": "Path" } ] } [/block] <a name="term-header-fields"></a> ###Header fields [block:parameters] { "data": { "0-0": "`X-SBG-Auth-Token`\nrequired", "h-0": "Name", "h-1": "Description", "0-1": "Your CGC [authentication token](doc:get-your-authentication-token)" }, "cols": 2, "rows": 1 } [/block] <div align="right"><a href="#top">top</a></div> <a name="term-query-parameters"></a> ###Query parameters [block:parameters] { "data": { "0-2": "Data matching this search `term` will be returned. Note that the `term` must be an exact complete string for the results to match.", "0-0": "`term`", "h-0": "Name", "h-1": "Datatype", "h-2": "Description", "0-1": "string" }, "cols": 3, "rows": 1 } [/block] <div align="right"><a href="#top">top</a></div> <a name="term-example-request"></a> ###Example request [block:code] { "codes": [ { "code": "GET /search?term=brca HTTP/1.1\nHost: cgc-datasets-api.sbgenomics.com\nX-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96", "language": "http", "name": "Example request" } ] } [/block] <div align="right"><a href="#top">top</a></div> <a name="term-example-response"></a> ###Example response This will return a list of results from datasets accessible through the CGC, grouped by the dataset to which they belong, as shown below. [block:code] { "codes": [ { "code": "{\n \"tcga\": [\n {\n \"type\": \"http://www.w3.org/2002/07/owl#NamedIndividual\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/disease_type/brca\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2014/11/tcga#Utility\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/disease_type/brca\"\n },\n {\n \"type\": \"http://www.w3.org/2000/01/rdf-schema#Resource\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/disease_type/brca\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2014/11/tcga#Diagnosis\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/disease_type/brca\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2014/11/tcga#DiseaseType\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/disease_type/brca\"\n },\n {\n \"type\": \"http://www.w3.org/2002/07/owl#NamedIndividual\",\n \"label\": \"TCGA-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/investigation/tcga-brca\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2014/11/tcga#Utility\",\n \"label\": \"TCGA-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/investigation/tcga-brca\"\n },\n {\n \"type\": \"http://www.w3.org/2000/01/rdf-schema#Resource\",\n \"label\": \"TCGA-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/investigation/tcga-brca\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2014/11/tcga#Investigation\",\n \"label\": \"TCGA-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/tcga/investigation/tcga-brca\"\n }\n ],\n \"ccle\": [\n {\n \"type\": \"http://www.w3.org/2002/07/owl#NamedIndividual\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/disease_type_abbr/03\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Clinical\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/disease_type_abbr/03\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2016/5/ccle#DiseaseTypeAbbreviation\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/disease_type_abbr/03\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/disease_type_abbr/03\"\n },\n {\n \"type\": \"http://www.w3.org/2000/01/rdf-schema#Resource\",\n \"label\": \"BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/disease_type_abbr/03\"\n },\n {\n \"type\": \"http://www.w3.org/2002/07/owl#NamedIndividual\",\n \"label\": \"CCLE-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/investigation/03\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Investigation\",\n \"label\": \"CCLE-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/investigation/03\"\n },\n {\n \"type\": \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\",\n \"label\": \"CCLE-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/investigation/03\"\n },\n {\n \"type\": \"http://www.w3.org/2000/01/rdf-schema#Resource\",\n \"label\": \"CCLE-BRCA\",\n \"uri\": \"https://www.sbgenomics.com/ccle/investigation/03\"\n }\n ]\n}", "language": "json" } ] } [/block] For each result, the response lists: * **Its `type`:** This is an URI assigned to a property within a [CGC-hosted database's namespace](http://docs.cancergenomicscloud.org/docs/sparql-basics#section-uniform-resource-identifiers) or within the [RDF Schema namespace defined by W3C](https://www.w3.org/TR/rdf-schema/#ch_summary) which contains the result. * **Its `label`:** This is a human-readable form of a result. * **Its `uri`:** This is an URI assigned to an entity and its ID within a [CGC-hosted database's namespace](http://docs.cancergenomicscloud.org/docs/sparql-basics#section-uniform-resource-identifiers). Note if your search term does not match any results, empty brackets `[]` are returned. <div align="right"><a href="#top">top</a></div> ##Search by URI Start from a free-text [search by term](#section-search-by-term) request, as described above. Use an `uri` obtained in the response as the starting point to obtain further details, including individual members matching the designated resource. Note that this `uri` must be in a [URL-encoded format](http://www.w3schools.com/tags/ref_urlencode.asp). <div align="right"><a href="#top">top</a></div> <a name="uri-path"></a> ###Path [block:code] { "codes": [ { "code": "http://cgc-datasets-api.sbgenomics.com/describe", "language": "text", "name": "Path" } ] } [/block] <div align="right"><a href="#top">top</a></div> <a name="uri-header-fields"></a> ###Header fields [block:parameters] { "data": { "0-0": "`X-SBG-Auth-Token`\nrequired", "h-0": "Name", "h-1": "Description", "0-1": "Your CGC [authentication token](doc:get-your-authentication-token)" }, "cols": 2, "rows": 1 } [/block] <div align="right"><a href="#top">top</a></div> <a name="uri-query-parameters"></a> ###Query parameters [block:parameters] { "data": { "0-2": "Use an `uri` obtained via a [search by term](#section-search-by-term) request. Note that only exact results will be returned. This `uri` must be in a [URL-encoded format](http://www.w3schools.com/tags/ref_urlencode.asp).", "0-0": "`uri`", "h-0": "Name", "h-1": "Datatype", "h-2": "Description", "0-1": "string" }, "cols": 3, "rows": 1 } [/block] <div align="right"><a href="#top">top</a></div> <a name="uri-example-request"></a> ###Example request [block:code] { "codes": [ { "code": "GET /describe?uri=https%3A%2F%2Fwww.sbgenomics.com%2Fccle%2Finvestigation%2F03 HTTP/1.1\nHost: cgc-datasets-api.sbgenomics.com\nX-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96", "language": "http", "name": "Example request" } ] } [/block] <div align="right"><a href="#top">top</a></div> <a name="uri-example-response"></a> ###Example response This will return a list of results from datasets accessible through the CGC, as shown below. [block:code] { "codes": [ { "code": "{\n \"tcga\": {},\n \"uri\": \"https://www.sbgenomics.com/ccle/investigation/03\",\n \"ccle\": {\n \"http://www.w3.org/2000/01/rdf-schema#label\": [\n \"CCLE-BRCA\"\n ],\n \"https://www.sbgenomics.com/ontologies/2016/5/ccle#hasInvestigation\": [\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-AU565\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-20\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-474\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-483\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-BT-549\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-120\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-148\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-51\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAL-85-1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-CAMA-1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-DU4475\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-EFM-19\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-EFM-192A\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1143\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1143BL\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1187\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1395\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1419\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1428\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1500\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1569\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1599\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1806\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1937\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1954\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC1954BL\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC202\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC2157\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC2218\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC38\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HCC70\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HDQ-P1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-HMC-1-8\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs274.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs281.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs343.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs578T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs606.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs739.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-Hs742.T\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-JIMT-1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-KPL-1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MCF7\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-134-VI\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-157\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-175-VII\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-231\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-361\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-415\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-435S\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-436\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-453\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-MDA-MB-468\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-SK-BR-3\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-T-47D\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-UACC-812\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-UACC-893\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-ZR-75-1\",\n \"https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-ZR-75-30\"\n ],\n \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\": [\n \"http://www.w3.org/2002/07/owl#NamedIndividual\",\n \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Investigation\",\n \"https://www.sbgenomics.com/ontologies/2016/5/ccle#Utility\",\n \"http://www.w3.org/2000/01/rdf-schema#Resource\"\n ]\n }\n}", "language": "json" } ] } [/block] For each result, the response lists the URIs for the individual members of each property which matches your search terms. For instance, the cell line `https://www.sbgenomics.com/ccle/ccle_cell_line/CCLE-AU565` is returned for `https://www.sbgenomics.com/ontologies/2016/5/ccle#hasInvestigation`. Note if your search term does not match any results, empty brackets `{}` are returned. <div align="right"><a href="#top">top</a></div>