跳到主要内容

saveThirdPartyBackup

ThirdPartyFolderWrapper saveThirdPartyBackup(ThirdPartyBackupRequestDto)

POST /api/2.0/files/thirdparty/backup

Connect the third-party backup storage

Connects the third-party storage account the portal writes its backups to, and returns the folder that stands for its root. Only a portal administrator may call it, and the portal-wide third-party switch has to be on; other callers are refused. The account is portal-wide and single: a second call does not add another one but re-authenticates and retitles the existing one, which makes the operation safe to repeat with the same body. The credentials follow the same rules as in POST api/2.0/files/thirdparty - an authorization code in token for the OAuth services, login with password and, where the server address is not fixed, url for the WebDAV family and SharePoint - and are verified against the service before anything is stored, so a wrong password leaves the previous account untouched. The account is deliberately absent from GET api/2.0/files/thirdparty; read it back with GET api/2.0/files/thirdparty/backup and remove it with DELETE api/2.0/files/thirdparty/{providerId}.

Parameters​

NameInTypeDescriptionNotes
ThirdPartyBackupRequestDtobodyThirdPartyBackupRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The root folder of the backup storage accountThirdPartyFolderWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, providerKey names no known storage service, or, while no backup account is connected yet, the token or password the service needs is missing--
403The caller is not a DocSpace administrator, the portal-wide third-party switch is off or no storage service is enabled, the service rejects the credentials, or, while no backup account is connected yet, the title is empty once invalid characters are removed--
500The storage service cannot be reached or fails while the credentials are checked--
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​

ThirdPartyFolderWrapper

Authorization​

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

HTTP request headers​

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