Get file permission
POST /api/v1/files/{fileId}/permissions/{permId} HTTP/1.1
- Path parameters
| Parameter | Description |
|---|---|
fileId | The ID of the file. |
permId | The user’s login or groupId. |
Response structure
| Path | Type | Description |
|---|---|---|
permission | Object | Permission object |
links[] | Array | Links for this permission |
permission.id | String | The user’s login or groupId for this permission. |
permission.email | String | The user’s email for this permission |
permission.fsPermId | String | The user’s id or group’s id if it’s a group permission |
permission.parentShareId | String | Shared parent folder |
permission.parentShareFilename | String | Parent share filename |
permission.shareUserFirstName | String | Share user first name |
permission.shareUserLastName | String | Share user last name |
permission.shareUserMiddleName | String | Share user middle name |
permission.shareUserAvatarId | String | Share user avatar id |
permission.role | String | The primary role for this user/group |
permission.isGroup | Boolean | Group permission indicator |
permission.groupName | String | Permission group name |
permission.login | String | Permission user login |
permission.isDeleted | Boolean | The user was deleted |
links[].rel | String | Link type |
links[].href | String | Link reference |
- Example request
curl 'http://localhost:8080/api/v1/files/189379374/permissions/testsrvdocs2@tacos.devoffice.ru' -i -X GET \
-H 'X-co-auth-token: 325c10bc178bbdf951ab52d1b85b3811'
- Example response
HTTP/1.1 200 OK
X-co-request-id: 62426443314135556475375371674549
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.ncloudtech.cloudoffice.permission+json;v=1;charset=UTF-8
Content-Length: 601
{
"permission": {
"id": "testsrvdocs2@tacos.devoffice.ru",
"email": "testsrvdocs2@tacos.devoffice.ru",
"fsPermId": "d97ad43a5bb14c7fa0564e637f0529d6",
"isGroup": false,
"login": "testsrvdocs2@tacos.devoffice.ru",
"role": "editor",
"shareUserAvatarId": "8bd73b29-b7a8-4adb-b703-0d005c235f80",
"shareUserFirstName": "a",
"shareUserLastName": "s",
"shareUserMiddleName": "d",
"isDeleted": false
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/testsrvdocs2@tacos.devoffice.ru"
}
]
}