Changes for page 2 Application Programming Interface (API)
Last modified by maaike on 2022/07/06 10:10
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Programming Interface Application(API)1 +2 Application Programming Interface (API) - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. oschmid1 +XWiki.maaike - Content
-
... ... @@ -2,13 +2,11 @@ 2 2 3 3 The EBRAINS Knowledge Graph provides convenient tools and APIs for the implementation of queries into your scripts. 4 4 5 -=== Request permission === 6 - 7 7 To be able to access the Knowledge Graph (KG) programmatically, you only require an EBRAINS account. Register for an account here: [[https:~~/~~/ebrains.eu/register/>>https://ebrains.eu/register/]] and log in. 8 8 9 9 === Writing Knowledge Graph queries === 10 10 11 -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. 9 +A query for the Knowledge Graph is defined declaratively in JSON-LD and is always executed against a specific data structure (e.g. a "Dataset version"), allowing the graph to be traversed. 12 12 13 13 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/".// 14 14 ... ... @@ -63,7 +63,7 @@ 63 63 (% class="wikigeneratedid" id="HSelectspecies" %) 64 64 **Select species** 65 65 66 - Similarly, we can refine our queryfor miceonly.64 +We can also refine our query to only include dataset versions that use mice (mus musculus) in a similar way as the faceted filters in the Search UI. 67 67 68 68 [[image:QBstep3.png||alt="Step 3: Select species" height="543" width="700"]] 69 69 ... ... @@ -72,8 +72,11 @@ 72 72 **Access detailed metadata** 73 73 74 74 (% class="wikigeneratedid" id="H" %) 75 - Following73 +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. We can use this to our advantage when refining our query. 76 76 75 +(% class="wikigeneratedid" %) 76 +For example, we can filter datasets with data from male subjects by making this a required feature in the query (set the label of "biologicalSex" to "male). 77 + 77 77 ==== [[image:QB4.png||alt="Step 4: Access detailed metadata" height="432" width="700"]] ==== 78 78 79 79 ==== ====