跳到主要内容

resetStorageToDefault

resetStorageToDefault()

DELETE /api/2.0/settings/storage

Reset the storage settings

Drops the third-party storage configuration of the current portal, module and saved credentials alike, and starts an asynchronous migration of the portal data back into the built-in local storage. The portal moves into the migrating state and stays unavailable until the transfer ends, so follow it with GET api/2.0/settings/storage/progress; the call itself returns as soon as the migration has been handed to the storage service and gives back no body. The caller needs the permission to edit portal settings, which in practice means the portal owner or a DocSpace admin, on a server installation with an unrestricted access space. This is a mutating and slow operation rather than a destructive one: documents are copied back rather than deleted, but the credentials of the previous storage are gone from the settings and have to be sent again with PUT api/2.0/settings/storage to switch back. Repeating the call while a migration is running starts another one, so poll instead. Resetting the storage is also the step that makes POST api/2.0/settings/encryption/start possible, since encryption only covers the local storage.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The storage configuration has been cleared and migration back to the local storage has started-X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller may not edit portal settings, or this installation does not allow changing the storage--
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: Not defined
  • Accept: application/json