Skip to main content

getUsersWithFilesShared

EmployeeFullArrayWrapper getUsersWithFilesShared(id, employeeStatus, activationStatus, excludeShared, includeShared, invitedByMe, inviterId, area, employeeTypes, count, startIndex, filterSeparator, filterValue)

GET /api/2.0/people/file/{id}

Search users for a file

Returns the accounts that are relevant to the file with the ID given in the route, and reports for each of them whether it already has access to that file. The caller only needs read access to the file, not the right to manage its access, but a guest may not call it at all; an ID that matches no file answers 404. The call is read-only, works without a filter - leaving filterValue empty returns every matching account rather than nothing - and is paged by count and startIndex, with the number of matches in the total count of the response. Pass excludeShared to keep only the accounts that have no access yet, includeShared to keep only those that already have it, and neither to get both kinds with the shared field telling them apart. A DocSpace administrator additionally sees the guests that are not related to the caller. To search users and groups together, or to build an access dialog that needs the right to manage sharing, use GET api/2.0/accounts/file/{id}/search instead.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The ID of the room, folder or file the search is run against, taken from the route. It is an integer for an entry stored in DocSpace and a provider-specific string for an entry in a connected third-party storage.[required] [example: 1234]
employeeStatusqueryEmployeeStatusKeeps only the accounts in the given state: Active for working accounts, Terminated for disabled ones and Pending for open invitations. Omit it to search every state.[optional] [example: Active] [enum: 1, 2, 4, 5, 7]
activationStatusqueryEmployeeActivationStatusKeeps only the accounts whose activation is in the given state: NotActivated, Activated, Pending or AutoGenerated. Omit it to search every state.[optional] [example: Activated] [enum: 0, 1, 2, 4]
excludeSharedqueryBooleanKeeps only the accounts that do not have access to the entry yet, which is the set to offer when granting access. It takes precedence over includeShared, and every returned entry has shared set to false.[optional] [example: false]
includeSharedqueryBooleanKeeps only the accounts that already have access to the entry, which is the set to offer when changing or revoking access. Every returned entry has shared set to true, and the flag is ignored when excludeShared is also set.[optional] [example: false]
invitedByMequeryBooleanKeeps only the accounts invited by the caller when true, and only those invited by somebody else when false. Omit it to search regardless of who sent the invitation.[optional] [example: false]
inviterIdqueryUUID (uuid)Keeps only the accounts invited by the account with this ID. Omit it to search regardless of who sent the invitation.[optional] [example: 00000000-0000-0000-0000-000000000000]
areaqueryAccountSearchAreaThe part of the portal to search in: All, the default, searches members and guests together, People leaves the guests out, and Guests returns guests only - and for a caller who is not a DocSpace administrator, only the guests that caller is related to.[optional] [example: All] [enum: 0, 1, 2]
employeeTypesqueryListKeeps only the accounts of the listed types, combined as alternatives. An empty list, which is the default, searches every type.[optional] [example: [RoomAdmin, Guest]]
countqueryInteger (int32)The size of the page. It defaults to 100, which is also the largest value the operation accepts.[optional] [example: 25] [min: 1] [max: 100]
startIndexqueryInteger (int32)The number of matches to skip before the page starts. It defaults to 0, and the total number of matches is reported in the total count of the response.[optional] [example: 0]
filterSeparatorqueryStringThe character that splits filterValue into several terms, of which any one may match. Omit it to split the value on spaces instead, in which case every term has to match.[optional] [example: ,]
filterValuequeryStringThe text to match against the first name, the last name and the email, case-insensitively. Omit it to get every account the caller may offer access to.[optional] [example: John]

Responses​

Status codeDescriptionTypeResponse headers
200The matching accounts, each with its access state for the fileEmployeeFullArrayWrapperX-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 cannot read the file--
404No file has the specified ID--
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​

EmployeeFullArrayWrapper

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 ID of the room, folder or file the search is run against, taken from the route. It is an integer for an entry stored in DocSpace and a provider-specific string for an entry in a connected third-party storage.[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