diff --git a/docs/API-Nextcloud.md b/docs/API-Nextcloud.md index 8c657d78a..a8a59d2af 100644 --- a/docs/API-Nextcloud.md +++ b/docs/API-Nextcloud.md @@ -1,5 +1,20 @@ # Nextcloud APIs +## Available sharees + +When sharing a board to a user, group or circle, the possible sharees can be obtained though the files_sharing API. + +API endpoint: https://nextcloud.local/index.php/apps/files_sharing/api/v1/sharees + +### Parameters +- format: **The response format** +- perPage: **Limit response number** +- itemType: **List of types. Currently supported are** + - 0 user + - 1 group + - 7 circle + + ## Comments Comments are stored using the Nextcloud Comments API. You can use the WebDAV endpoint of Nextcloud to fetch, update and delete comments. diff --git a/docs/API.md b/docs/API.md index dc0a11759..d8aada7a3 100644 --- a/docs/API.md +++ b/docs/API.md @@ -65,6 +65,12 @@ curl -u admin:admin -X GET \ The board list endpoint supports setting an `If-Modified-Since` header to limit the results to entities that are changed after the provided time. +#### Request parameters + +| Parameter | Type | Description | +| --------- | ------- | ---------------------------- | +| options | Bool | **Optional** Enhance boards with details about labels, stacks and users | + #### Response ##### 200 Success @@ -288,6 +294,64 @@ Returns an array of board items ##### 200 Success +### POST /boards/{boardId}/acl - Add new acl rule + +#### Request body + +| Parameter | Type | Description | +| --------- | ------ | ---------------------------------------------------- | +| type | Integer | Type of the participant | +| participant | String | The uid of the participant | +| permissionEdit | Bool | Setting if the participant has edit permissions | +| permissionShare | Bool | Setting if the participant has sharing permissions | +| permissionManage | Bool | Setting if the participant has management permissions | + +##### Supported participant types: +- 0 User +- 1 Group +- 7 Circle + +#### Response + +##### 200 Success + +```json +[{ + "participant": { + "primaryKey": "userid", + "uid": "userid", + "displayname": "User Name" + }, + "type": 0, + "boardId": 1, + "permissionEdit": true, + "permissionShare": false, + "permissionManage": true, + "owner": false, + "id": 1 +}] +``` + +### PUT /boards/{boardId}/acl/{aclId} - Update an acl rule + +#### Request parameters + +| Parameter | Type | Description | +| --------- | ------ | ---------------------------------------------------- | +| permissionEdit | Bool | Setting if the participant has edit permissions | +| permissionShare | Bool | Setting if the participant has sharing permissions | +| permissionManage | Bool | Setting if the participant has management permissions | + +#### Response + +##### 200 Success + +### DELETE /boards/{boardId}/acl/{aclId} - Delete an acl rule + +#### Response + +##### 200 Success + ## Stacks ### GET /board/{boardId}/stacks - Get stacks