Skip to main content

setSecurityInfo

FileShareArrayWrapper setSecurityInfo(SecurityInfoRequestDto)

PUT /api/2.0/files/share

Set sharing rights in batch

Grants, changes or withdraws the access of the listed accounts and groups on every file and folder named in the request at once, and returns the resulting rights. Entry identifiers come from a listing operation, and the accounts and groups come from the portal's own account and group lists; an access of None withdraws the rights instead of granting them. The caller must be allowed to change the access of every listed entry - the creator of the room, a member with the rights to manage it, or a portal administrator - and a read-only member or a guest is refused even when the payload changes nothing. A subject the caller is not allowed to share with, such as a guest that belongs to another member, is skipped without an error, and an empty share collection makes the call do nothing and answer with an empty list. Repeating the same request leaves the same rights in place. The answer holds one record per listed subject for each entry that was actually processed, so it is shorter than the request when something was skipped and worth comparing against it. For a single room prefer PUT api/2.0/files/rooms/{id}/share, which also invites members by email.

Parameters​

NameInTypeDescriptionNotes
SecurityInfoRequestDtobodySecurityInfoRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The rights of the listed accounts and groups on every entry that was processedFileShareArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, an email in share is malformed or longer than 255 characters, share invites more addresses by email than the portal allows at once, or sharingMessage is longer than 255 characters--
403The caller may not change the sharing of a listed entry, a listed subject cannot be given the requested access on it, or a listed private room has an account in share that has not set up its encryption keys--
500An id is a number that is not a 32-bit integer--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
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​

FileShareArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json