Skip to main content

getAccountsEntriesWithFilesShared

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

GET /api/2.0/accounts/file/{id}/search

Search accounts for a file

Searches the portal users and groups that can be given access 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 has to be allowed to manage the access of that file, and the ID has to belong to an existing file, so the operation answers 403 for a file the caller cannot share and 404 for an ID that matches nothing. The search is read-only and needs filterValue: while it is empty the operation returns an empty list and a total of 0 instead of every account, so it cannot be used to enumerate the portal. filterValue is matched case-insensitively against the first name, the last name and the email; without filterSeparator it is split on spaces and every term has to match, and with a separator it is split on that separator and any term may match. Matching groups are streamed first and users after them, both paged together by count and startIndex, while the number of matches is reported 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.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The ID of the room, folder or file whose access 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 users in the given account state: Active for a working account, Terminated for a disabled one and Pending for one that has not accepted its invitation yet. Omit it to search every state.[optional] [example: Active] [enum: 1, 2, 4, 5, 7]
activationStatusqueryEmployeeActivationStatusKeeps only the users whose activation is in the given state: NotActivated for an account that has never been activated, Activated for one that completed the activation, Pending for one whose invitation is still open, and AutoGenerated for an account created by the portal itself. 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 adding new members. 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 users invited by the caller when true, and only the users invited by somebody else when false. Omit it to search regardless of who sent the invitation.[optional] [example: false]
inviterIdqueryUUID (uuid)Keeps only the users 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 users 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, counting groups and users together. 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, counted over the groups and users together. 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 search for, matched case-insensitively against the first name, the last name and the email. It is required in practice: while it is empty the search returns nothing at all rather than every account.[optional] [example: John]

Responses​

Status codeDescriptionTypeResponse headers
200The matching users and groups, each with its access state for the fileAccountEntryArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400A parameter has the wrong type, or the count is outside its allowed range--
403No permissions to perform this action--
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​

AccountEntryArrayWrapper

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 whose access 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