getSharedUsers
MentionArrayWrapper getSharedUsers(fileId)
GET /api/2.0/files/file/{fileId}/sharedusers
Get users to mention in a file
Lists the portal members who can read the file, which is what an editor client offers when somebody types a mention. The set holds the readers of the file plus everyone who reads it by role rather than by share - the portal owner, the DocSpace administrators and the author of the file - while the caller themselves, the subjects standing behind external links and deactivated accounts are left out. It is ordered by display name as the portal renders it. A guest receives a single entry, the owner of the file, because a guest is not a portal member and may not learn who else works on the document. The caller needs read access to the file, and an unknown file id is reported as missing. The call only reads. A caller who reached the file through an external link instead of an account is answered with nothing at all. For the users to offer when protecting a document use GET api/2.0/files/file/{fileId}/protectusers.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| fileId | 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] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The portal members who can read the file, ordered by display name | MentionArrayWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | The caller cannot read the file | - | - |
| 404 | The file id resolves to nothing | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 400 | Bad Request. | 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 |
|---|---|---|---|---|
| fileId | 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