Integrating Describo Online into owncloud - Arkisto-Platform/describo-online GitHub Wiki
This follows on from Integrating Describo into another service.
Setting up a new session
Assuming you've deployed the owncloud application (or something like it) you can have describo automatically connect to the owncloud service and load a specified folder. To do that the session data you POST to describo must be as follows:
email: the email address of the user for whom to create a sessionname: the users' name,user_id: the owncloud user id for the user,url: the webdav endpoint of the owncloud service,access_token: the oauth token you've already retrieved from owncloud - describo will use it as isfolder: the folder path that describo should open relative to the users' home directory e.g/{path}/{to}/{folder}
And the form it should be POST'ed in is:
POST: {
"email": email,
"name": name,
"service": {
"owncloud": {
"user_id": user_id,
"url": url,
"access_token": access_token,
"folder": folder
}
}
}
Here's an example:
api_1 | {
api_1 | "email": "[email protected]",
api_1 | "name": "admin",
api_1 | "service": {
api_1 | "owncloud": {
api_1 | "user_id": "admin",
api_1 | "url": "http://owncloud_server:8080/remote.php/dav",
api_1 | "access_token": "Wlo1gQDHbc6Bq ... Fzotchp1koMpj",
api_1 | "folder": "/ro-crate test"
api_1 | }
api_1 | }
api_1 | }
Updating an existing session
To update the owncloud data in an existing session (for example, the access_token) PUT the same data as above to https://{describo-online}/api/session/application/{sessionId} (notice the sessionId param on the end).