跳到主要内容

startStorageEncryption

BooleanWrapper startStorageEncryption(StorageEncryptionRequestDto)

POST /api/2.0/settings/encryption/start

Start the storage encryption

Queues encryption of everything the installation keeps in its local storage, or decryption of it when the data is already encrypted: the saved encryption state decides the direction, so the same call encrypts a decrypted installation and decrypts an encrypted one. It covers the whole server, not one portal, and only a server installation with the feature switched on can run it, with neither the portal storage nor the CDN pointing at a third-party provider: reset those first with DELETE api/2.0/settings/storage and DELETE api/2.0/settings/storage/cdn. No backup may be running, and the backup schedules of all portals are dropped as part of starting. The caller needs the permission to edit portal settings, that is the portal owner or a DocSpace admin, and an unrestricted access space. This is a long, disruptive operation: every portal is put into the encryption state and stays unavailable until it ends, so do not repeat the call while it runs, and follow it with GET api/2.0/settings/encryption/progress instead. The password is generated on the server and never returned by the API. Pass notifyUsers=true to mail every user before the portals go down. The response is true once the job is queued, and false where encryption is switched off, nothing being started then.

Parameters​

NameInTypeDescriptionNotes
StorageEncryptionRequestDtobodyStorageEncryptionRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200True when the encryption job has been queued; false in a build where storage encryption is switched offBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
402The portal pricing plan does not include storage encryption--
403The caller may not edit portal settings, or this installation does not allow storage encryption--
415Storage encryption is not available on this installation, or the storage or the CDN of the current portal is a third-party provider--
500A backup of one of the portals is still running--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
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