Changes for page Human Data Gateway

Last modified by alexisdurieux on 2022/02/01 14:13

From version 2.1
edited by eapapp
on 2021/07/26 13:54
Change comment: There is no comment for this version
To version 1.1
edited by eapapp
on 2021/07/26 13:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,31 +2,34 @@
2 2  
3 3  You can now browse KnowledgeGraph datasets through the data proxy as an authenticated user via the datasets API: [[https:~~/~~/data-proxy.ebrains.eu/api/docs#/datasets>>https://data-proxy.ebrains.eu/api/docs#/datasets]]
4 4  
5 -To get access to datasets protected by the HDG, use the (% style="background-color:lightgray" %)datasets/{dataset_id}(%%) endpoint.
5 +To get access to datasets protected by the HDG, use the {{code}}datasets/{dataset_id}{{/code}} endpoint.
6 6  
7 -1. First perform a (% style="background-color:lightgray" %)POST /datasets/{dataset_id}(%%) request to start the HDG flow.
7 +1. First perform a {{code}}POST /datasets/{dataset_id}{{/code}} request to start the HDG flow.
8 8  1. An e-mail is then sent to the user with the terms of use to validate the access.
9 9  1. Once the access has been validated, the user is redirected by default to the KnowledgeGraph page of the dataset. This redirection can be customized for third-party integration.
10 10  
11 -**Note:** For publicly available datasets, the (% style="background-color:lightgray" %)datasets/{dataset_id}(%%) endpoint can be used via GET, without the extra validation round.
11 +**Note:** For publicly available datasets, (% id="cke_bm_564S" style="display:none" %) (%%)the {{code}}datasets/{dataset_id}{{/code}} endpoint can be used via GET, without the extra validation round.
12 12  
13 13  == Example of programmatic integration for a third party ==
14 14  
15 15  1. A user wants to access a KG dataset in your third-party application.
16 -1. The third-party application calls (% style="background-color:lightgray" %)GET /datasets/{dataset_id}(%%) with the user token in order to get information about the dataset or download it.
16 +1. The third-party application calls {{code}}GET /datasets/{dataset_id}{{/code}} with the user token in order to get information about the dataset or download it.
17 17  (% start="1" style="list-style-type:upper-alpha" %)
18 18  11. The dataset is not protected ~-~-> A successful response is sent.
19 -11. The dataset is protected ~-~-> A 401 response is sent back. In the 401 json response, a (% style="background-color:lightgray" %)can_request_access(%%) field is specified. If true, it means that it is possible to request access to that dataset using (% style="background-color:lightgray" %)POST /datasets/{dataset_id}(%%).
20 -1. The third-party application asks the user if they want to request access, and then sends (% style="background-color:lightgray" %)POST /datasets/{dataset_id}?redirect_uri=https://mythirdpartyapp.eu/{dataset_id}(%%).
19 +11. The dataset is protected ~-~-> A 401 response is sent back. In the 401 json response, a {{code}}can_request_access{{/code}} field is specified. If true, it means that it is possible to request access to that dataset using {{code}}POST /datasets/{dataset_id}{{/code}}.
20 +1. The third-party application asks the user if they want to request access, and then sends {{code}}POST /datasets/{dataset_id}?redirect_uri=https://mythirdpartyapp.eu/{dataset_id}{{/code}}.
21 21  1. If the request is successful, an e-mail is sent to the user.
22 -1. Once the user has clicked on the e-mail link, access is granted and the user is redirected to (% style="background-color:lightgray" %)https://mythirdpartyapp.eu/{dataset_id}(%%).
23 -1. (% style="background-color:lightgray" %)GET /datasets/{dataset_id}(%%) now answers with successful responses.
22 +1. Once the user has clicked on the e-mail link, access is granted and the user is redirected to {{code}}https://mythirdpartyapp.eu/{dataset_id}{{/code}}.
23 +1. {{code}}GET /datasets/{dataset_id}{{/code}} now answers with successful responses.
24 24  
25 +
25 25  == Front-end implementation ==
26 26  
27 -An actual implementation of this flow is available at (% style="background-color:lightgray" %)data-proxy.ebrains.eu/datasets/{dataset_id}(%%).
28 +An actual implementation of this flow is available at {{code}}data-proxy.ebrains.eu/datasets/{dataset_id}{{/code}}.
28 28  
29 29  
30 30  == What datasets are available? ==
31 31  
32 32  Datasets that are released in KnowledgeGraph v2 or v3 are available.
34 +
35 +