跳到主要内容

externalShare

BooleanWrapper externalShare(DisplayRequestDto)

PUT /api/2.0/files/settings/external

Change the external sharing ability

Turns external (public) links on or off for the whole portal and returns the value that is now stored. Only the portal owner and a DocSpace administrator may change it: a room administrator, a member or a guest is refused, and so is an unauthenticated caller. Turning it off also turns sharing on social networks off, so a following read of externalShareSocialMedia reports false without a separate call. This operation sets one flag; to write the whole external-sharing policy in one request - the default link type, the sections the restriction applies to and whether existing links are blocked at once - use PUT api/2.0/files/settings/externalsharingsettings. The value is published as externalShare by GET api/2.0/files/settings. Sending the same value again is safe. The response is the value read back from the portal rather than a success flag. External links are allowed in a new portal. Turning them off does not delete the links that already exist - whether those stop working at once is decided by the blockExistingLinksOnRestrict field of the settings operation named above.

Parameters​

NameInTypeDescriptionNotes
DisplayRequestDtobodyDisplayRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200true if external links may be created in this portalBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not a DocSpace administrator--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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