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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (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] |
| count | query | Integer (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] |
| startIndex | query | Integer (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 code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The accounts and groups that hold rights on the file, the owner first | FileShareArrayWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | A parameter has the wrong type, or the count is outside its allowed range | - | - |
| 403 | The caller is a guest or may not read the file | - | - |
| 404 | The file does not exist | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
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:
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | String | 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: 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