跳到主要内容

startBackup

BackupProgressWrapper startBackup(StartBackupRequestDto)

POST /api/2.0/backup/startbackup

Start the backup

Queues a backup of the current portal and returns straight away: the archive itself is written by the separate backup worker service, which picks the job up from an integration event, so the response reports a progress of 0 and the Created status, and its taskId is the handle to poll with GET api/2.0/backup/getbackupprogress. The caller needs the portal settings permission, and dump - a backup of the whole server instead of this one portal - additionally requires the space access permission and is rejected outside a standalone installation. The keys expected in storageParams depend on storageType: Documents takes an integer folderId, ThridpartyDocuments takes a provider-specific non-integer folderId, Local takes filePath and works on a standalone installation only, ThirdPartyConsumer takes module together with the settings of that consumer, and DataStore takes no keys at all; the subdir key is added by the operation itself and must not be sent. A portal that has already used up the free backups of the current calendar month is charged through the paid backup service instead, and the call is rejected with 402 when that service is not available to it.

Parameters​

NameInTypeDescriptionNotes
StartBackupRequestDtobodyStartBackupRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The state of the queued backup jobBackupProgressWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, the folder ID does not match the storage type, a dump was requested on a portal that is not a standalone installation, or storageParams repeats a key--
402The portal already uses more storage than its plan allows and the backup goes to Documents, or the free backups of the current month are used up and the paid backup service is not available to this portal or cannot be charged--
403No permissions to perform this action--
404The target folder or the backup quota was not found--
500A key or value of storageParams is null, ThridpartyDocuments storage has no folderId, or Local storage has no filePath or was requested on a portal that is not a standalone installation--
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​

BackupProgressWrapper

Authorization​

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

HTTP request headers​

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