跳到主要内容

getFileSecurityInfo

FileShareArrayWrapper getFileSecurityInfo(id, count, startIndex)

GET /api/2.0/files/file/{id}/share

Get file sharing rights

Lists the accounts and groups that hold rights on one file, one entry per subject, with the level each of them has, whether the caller may still change that level, and which of them owns the file. The owner comes first, then room managers, groups, ordinary members, guests, and last the accounts that have not accepted their invitation yet, each of those ranked by access level and by name. External links are left out and are listed by GET api/2.0/files/file/{id}/links instead, while a PDF form kept in a form-filling room also reports the link of that room, because the form is filled out through it. startIndex and count page through the subjects, and their total number is reported in the response headers rather than in the body. Listing takes the right to change the sharing of the file, which its creator, the manager of its room and a portal administrator acting as room manager have, while inside a public room reading the file is enough; a member who may read but not share is answered with an empty list although the header still counts the subjects, and a caller with no access, a guest included, is refused. A file that does not exist, or was deleted permanently, is answered as missing. The call is read-only; for several entries at once use POST api/2.0/files/share.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The file the operation addresses. Take the identifier from a listing such as GET api/2.0/files/{folderId}: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.[required] [example: 10]
countqueryInteger (int32)How many entries at most to answer with, in the operations of this file that return a list; an operation that answers with a single object is not affected by it.[optional] [example: 25] [min: 1] [max: 100]
startIndexqueryInteger (int32)How many entries of such a list to skip before answering, used together with count to walk through it page by page.[optional] [example: 0]

Responses​

Status codeDescriptionTypeResponse headers
200The accounts and groups that hold rights on the file, the owner firstFileShareArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400A parameter has the wrong type, or the count is outside its allowed range--
403The caller is a guest or may not read the file--
404The file does not exist--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

FileShareArrayWrapper

Third-party storage​

For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:

NameInTypeDescriptionNotes
idpathStringThe file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.[required] [example: sbox-42-L1JlcG9ydC5kb2N4]

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json