Wiki source code of Interacting with the Drive

Last modified by messines on 2023/01/27 13:53

Show last authors
1 == REST API ==
2
3 The drive is based on Seafile. Seafile comes with a restful API which allows you to interact with the content and libraries. You can find the documentation for the Seafile API here: [[https:~~/~~/download.seafile.com/published/web-api/home.md>>url:https://download.seafile.com/published/web-api/home.md]]
4
5 The Collaboratory.Drive is protected using OpenID Connect. The authentication is done by using [[access tokens>>url:https://tools.ietf.org/html/rfc6750#section-2.1]]. You need to have an application which the user logs into to obtain a token for the user. This application will need an OpenID Connect client to be registered. You can find instructions here: [[Creating Your OpenID Connect Client>>doc:Collabs.the-collaboratory.Documentation IAM.FAQ.OIDC Clients explained.WebHome]].
6
7 (% class="box infomessage" %)
8 (((
9 In order to read from the Collaboratory.Drive, you currently need the **`collab.drive`** and** `email`** scopes.
10 )))
11
12 To authenticate to the API, you add an `Authorization` header to the HTTP request with the content `Bearer {TOKEN}`.
13
14 curl -H "Authorization: Bearer $access_token" https:~/~/drive.ebrains.eu/api2/...
15
16 (% class="wikigeneratedid" id="HH4Won27tAppearinToC" %)
17