Modify permission role
PUT /api/v1/files/{fileId}/permissions/{permId} HTTP/1.1
Generates Notification file’s permissions changed.
- Path parameters
| Parameter | Description |
|---|---|
fileId | The ID of the file. |
permId | The user’s login or groupId. |
- Request fields
| Path | Type | Description |
|---|---|---|
id | String | The user’s login or groupId for this permission. |
fsPermId | String | The user’s id or groupId for this permission. |
email | String | The user’s email for this permission. |
role | String | The primary role for this user/group. |
isGroup | Boolean | Group permission indicator. |
- Request parameters
| Parameter | Description |
|---|---|
sendEmail | Should server send email |
- Response structure
See Get Permission Response structure.
- Example request
curl 'http://localhost:8080/api/v1/files/189413843/permissions/testsrvdocs2@tacos.devoffice.ru' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'X-co-auth-token: 02d8e21739b77e7543163824140607ad' \
-d '{
"id" : "testsrvdocs2@tacos.devoffice.ru",
"email" : "testsrvdocs2@tacos.devoffice.ru",
"fsPermId" : "07169c7868a343e5835c4c5db8255087",
"isGroup" : false,
"role" : "viewer"
}'
- Example response
HTTP/1.1 200 OK
X-co-request-id: 556169754172596c454c7a6234666e6f
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.ncloudtech.cloudoffice.permission+json;v=1;charset=UTF-8
Content-Length: 519
{
"permission": {
"id": "testsrvdocs2@tacos.devoffice.ru",
"email": "testsrvdocs2@tacos.devoffice.ru",
"fsPermId": "07169c7868a343e5835c4c5db8255087",
"isGroup": false,
"role": "viewer",
"shareUserAvatarId": "8bd73b29-b7a8-4adb-b703-0d005c235f80",
"shareUserFirstName": "a",
"shareUserLastName": "s",
"shareUserMiddleName": "s"
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/testsrvdocs2@tacos.devoffice.ru"
}
]
}