Skip to main content

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​

NameInTypeDescriptionNotes
fileIdpathInteger (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 codeDescriptionTypeResponse headers
200The portal members who can read the file, ordered by display nameMentionArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller cannot read the file--
404The file id resolves to nothing--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

MentionArrayWrapper

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
fileIdpathStringThe 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