Skip to main content

Get all file permissions

POST /api/v1/files/{fileId}/permissions HTTP/1.1
  1. Path parameters
ParameterDescription
fileIdThe ID of the file.
  1. Response structure
PathTypeDescription
[]ArrayArray of permission objects. See get permission Response structure
[].permission.idStringThe user’s login or groupId for this permission
[].permission.emailStringThe user’s email for this permission
[].permission.fsPermIdStringThe user’s id or group’s id if it’s a group permission
[].permission.parentShareIdStringShared parent folder
[].permission.parentShareFilenameStringParent share filename
[].permission.shareUserFirstNameStringShare user first name
[].permission.shareUserLastNameStringShare user last name
[].permission.shareUserMiddleNameStringShare user middle name
[].permission.shareUserAvatarIdStringShare user avatar id
[].permission.roleStringThe primary role for this user/group. See roles in [resource-info]
[].permission.isGroupBooleanGroup permission indicator
[].permission.groupNameStringPermission group name
[].permission.loginStringPermission user login
[].permission.isDeletedBooleanThe user was deleted
[].links[].relStringLink type
[].links[].hrefStringLink reference
  1. Example request
curl 'http://localhost:8080/api/v1/files/189397622/permissions' -i -X GET \
-H 'X-co-auth-token: 59afe3f300e866b841303729538db9fa'
  1. Example response
HTTP/1.1 200 OK
X-co-request-id: 306244376c546b4a7353417a514d4e79
Content-Type: application/vnd.ncloudtech.cloudoffice.permissionlist+json;v=1;charset=UTF-8
Content-Length: 1201
[
{
"permission": {
"id": "testsrvdocs@tacos.devoffice.ru",
"email": "testsrvdocs@tacos.devoffice.ru",
"fsPermId": "5177189d266a4862ad93b1cda2f5ac2b",
"isGroup": false,
"login": "testsrvdocs@tacos.devoffice.ru",
"role": "owner",
"shareUserFirstName": "r",
"shareUserLastName": "t",
"shareUserMiddleName": "f",
"isDeleted": false
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/testsrvdocs@tacos.devoffice.ru"
}
]
},
{
"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-0d6c234f80",
"shareUserFirstName": "a",
"shareUserLastName": "s",
"shareUserMiddleName": "d",
"isDeleted": false
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/files/testsrvdocs2@tacos.devoffice.ru"
}
]
}
]