跳到主要内容

setPublicSettings

setPublicSettings(SetPublicDto)

PUT /api/2.0/files/roomtemplate/public

Set room template public access

Switches the room template named by id between shared with everyone and private, rewriting its whole recipient list in the process. With public true the Everyone group is granted read access, so every member allowed to create rooms can build one from the template with POST api/2.0/files/rooms/fromtemplate; with false that access is taken away. In both cases every other account and group the template was shared with — including the addresses passed as share when it was created — loses access, so this is not a way to add a single recipient to an existing list. Only the account that owns the template may call it: a portal administrator who does not own it is refused, and so is a member invited to the source room. The identifier has to resolve to a room template; an ordinary room or an unknown value is answered as missing, and an identifier below 1 is rejected as an invalid request. Repeating the call with the same value changes nothing, and nothing is returned; read the current state with GET api/2.0/files/roomtemplate/{id}/public.

Parameters​

NameInTypeDescriptionNotes
SetPublicDtobodySetPublicDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The recipient list of the template has been rewritten to match the requested access; nothing is returned-X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no id, or id is less than 1--
403The caller is not allowed to change who the template is shared with--
404id does not identify a room template--
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​

null (empty response body)

Authorization​

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

HTTP request headers​

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