getGroupsWithFilesShared
GroupArrayWrapper getGroupsWithFilesShared(id, excludeShared, count, startIndex, filterValue)
GET /api/2.0/group/file/{id}
Search groups for a file
Returns the 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 call is read-only and, unlike the account search, works without a filter: leaving filterValue empty returns every group instead of nothing, and a value narrows the result by group name. The result is paged by count and startIndex, with the number of matching groups in the total count of the response. Pass excludeShared to keep only the groups that have no access to the file yet, which is the set to offer when adding new ones; without it every matching group comes back and shared tells them apart. To search users and groups together, use GET api/2.0/accounts/file/{id}/search.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (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] |
| excludeShared | query | Boolean | Keeps only the groups that do not have access to the entry yet, which is the set to offer when granting access. Every returned entry then has shared set to false; without the flag every matching group comes back and shared tells them apart. | [optional] [example: false] |
| count | query | Integer (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] |
| startIndex | query | Integer (int32) | The number of matching groups 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] |
| filterValue | query | String | The text to match against the group name. Omit it to get every group the caller may grant access to. | [optional] [example: Marketing] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The matching groups, each with its access state for the file | GroupArrayWrapper | 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 | No permissions to perform this action | - | - |
| 404 | No file has the specified ID | - | - |
| 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 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