docs: sessions API documentation

Signed-off-by: chandi Langecker <git@chandi.it>
This commit is contained in:
chandi Langecker
2022-09-26 16:20:06 +02:00
parent ed125e9439
commit 6684730dd7
2 changed files with 76 additions and 1 deletions

View File

@@ -1049,6 +1049,81 @@ Make a request to see the json schema of system
##### 200 Success
## Sessions
### PUT /sessions/create - creates a new session
#### Request body
| Parameter | Type | Description |
| --------- | ------- | ---------------------------------------------------- |
| boardId | Integer | The id of the opened board |
```json
{
"boardId": 123
}
```
#### Response
##### 200 Success
```json
{
"token":"LCGVgzFZBTMXPfcSVuWmrqLR0j8ZG5o1PpVLeHgTHZ5+4jOJNxlzUZ6ZfPbTTpqB"
}
```
### POST /sessions/sync - notifies the server, that the session is still open
#### Request body
| Parameter | Type | Description |
| --------- | ------- | ---------------------------------------------------- |
| boardId | Integer | The id of the opened board |
| token | String | The session token from the /sessions/create response |
```json
{
"boardId": 123,
"token":"LCGVgzFZBTMXPfcSVuWmrqLR0j8ZG5o1PpVLeHgTHZ5+4jOJNxlzUZ6ZfPbTTpqB"
}
```
#### Response
##### 200 Success
(empty response)
##### 404 Not Found
the provided token is invalid or expired
### POST /sessions/close - closes the session
#### Request body
| Parameter | Type | Description |
| --------- | ------- | ---------------------------------------------------- |
| boardId | Integer | The id of the opened board |
| token | String | The session token from the /sessions/create response |
```json
{
"boardId": 123,
"token":"LCGVgzFZBTMXPfcSVuWmrqLR0j8ZG5o1PpVLeHgTHZ5+4jOJNxlzUZ6ZfPbTTpqB"
}
```
#### Response
##### 200 Success
(empty response)
# OCS API
The following endpoints are available through the Nextcloud OCS endpoint, which is available at `/ocs/v2.php/apps/deck/api/v1.0/`.