Changes for page 2 Application Programming Interface (API)
Last modified by maaike on 2022/07/06 10:10
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - 2 ApplicationProgramming Interface (API)1 +Programming Interface Application (API) - Content
-
... ... @@ -2,10 +2,15 @@ 2 2 3 3 The EBRAINS Knowledge Graph provides convenient tools and APIs for the implementation of queries into your scripts. 4 4 5 - Tobeable to access the Knowledge Graph (KG) programmatically, you only requirean EBRAINS account. Registerfor an account here: [[https:~~/~~/ebrains.eu/register/>>https://ebrains.eu/register/]] and log in.5 +=== Request permission === 6 6 7 - ===WritingKnowledge Graphqueries ===7 +To be able to access the Knowledge Graph (KG) programmatically, you require: 8 8 9 +1. An EBRAINS account. Register for an account here: [[https:~~/~~/ebrains.eu/register/>>https://ebrains.eu/register/]] 10 +1. Register and request credentials for your KG client by emailing support@ebrains.eu 11 + 12 +=== Writting Knowledge Graph queries === 13 + 9 9 A query for the Knowledge Graph is defined declaratively in JSON-LD and always executed against a specific data structure (e.g. a "Dataset version") allowing the graph to be traversed. 10 10 11 11 In the snippet below, we can see that we first define the semantical context for the query with //"@context",// which belongs to the namespace "//https:~/~/schema.hbp.eu/graphQuery/".// ... ... @@ -52,7 +52,7 @@ 52 52 (% class="wikigeneratedid" id="HSelectanexperimentalapproach" %) 53 53 **Select an experimental approach** 54 54 55 -Similar to the faceted filters in the Knowledge Graph Search UI, we can refine our query by defining the experimental approach of our interest, for example electrophysiology. 60 +Similar to the facetted filters in the Knowledge Graph Search UI, we can refine our query by defining the experimental approach of our interest, for example electrophysiology. 56 56 57 57 To ensure that all dataset versions with electrophysiology are queried, and none of the dataset versions without electrophysiology, we make this property required and we apply a filter to the label we are searching for (i.e. electrophysiology). 58 58 ... ... @@ -61,7 +61,7 @@ 61 61 (% class="wikigeneratedid" id="HSelectspecies" %) 62 62 **Select species** 63 63 64 - We canalsorefine our querytoonly include dataset versionsthat usemice(mus musculus) ina similar wayas the faceted filters in the Search UI.69 +Similarly, we can refine our query for mice only. 65 65 66 66 [[image:QBstep3.png||alt="Step 3: Select species" height="543" width="700"]] 67 67 ... ... @@ -70,11 +70,8 @@ 70 70 **Access detailed metadata** 71 71 72 72 (% class="wikigeneratedid" id="H" %) 73 - The Knowledge Graph Search UI has visualised the basic metadata. In many cases, more metadata is stored in the KG than is readily accessible via the Search UI andwe can use this to our advantagewhen refining our query.78 +Following 74 74 75 -(% class="wikigeneratedid" %) 76 -For example, we can filter datasets with data from male subjects by making this a required feature in the query. 77 - 78 78 ==== [[image:QB4.png||alt="Step 4: Access detailed metadata" height="432" width="700"]] ==== 79 79 80 80 ==== ====