# Restore a previously trashed configuration Restores a configuration from the trash back to active state. ## Endpoint **POST** `/dcapi/configuration/trash/restore` ## Request URL `https://{server-hostname}:8383/dcapi/configuration/trash/restore` ## Scope `Configurations.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (`string`, Mandatory): `application/restoreTrashConfigStatus.v1+json` ## Sample Request ```bash curl --request POST \ --url https://appdomain/dcapi/configuration/trash/restore \ --header 'Accept: application/restoreTrashConfigStatus.v1+json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP code 200 Response Body - `application/json` `JSON object` - **status** (`string`): Localised message containing the restored collection name and success confirmation ### HTTP code 400 Response Body - `application/json` `JSON object` - **error_code** (`string`): SERVICE_NOT_AVAILABLE: the configuration has been deprecated and cannot be restored - **error_description** (`string`): Message indicating the deprecated configuration cannot be restored ### HTTP code 401 Response Body - `application/json` `JSON object` - **errorCode** (`long`): Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required) - **errorMsg** (`string`): Authentication failure reason ### HTTP code 413 Response Body - `application/json` `JSON object` - **error_code** (`string`): INTERNAL_SERVER_ERROR: insufficient storage space to restore the configuration files - **error_description** (`string`): Message indicating insufficient disk space to restore the configuration ### HTTP code 500 Response Body - `application/json` `JSON object` - **error_code** (`string`): CONFIG_INTERNAL_ERROR: unexpected failure during the restore operation - **error_description** (`string`): Message describing the unexpected server error during restore ## Possible Response Codes - **200**: HTTP code - **400**: HTTP code - **401**: HTTP code - **413**: HTTP code - **500**: HTTP code ## Sample Responses ### HTTP 200 Configuration restored successfully from trash ```json { "status": "'Firewall_Policy_Win11' has been restored successfully." } ``` ### HTTP 400 Configuration has been deprecated and cannot be restored ```json { "error_description": "Configuration has been deprecated and cannot be restored", "error_code": "SERVICE_NOT_AVAILABLE" } ``` ### HTTP 401 User lacks write role or scope ```json { "error_description": "Access denied - You are not allowed to access the requested resource.", "error_code": "UAC_UNAUTHORIZED" } ``` ### HTTP 413 Insufficient storage space to restore ```json { "error_description": "Insufficient storage space to restore the configuration", "error_code": "INTERNAL_SERVER_ERROR" } ``` ### HTTP 500 Unexpected failure during restore ```json { "error_description": "Unexpected failure during the restore operation", "error_code": "CONFIG_INTERNAL_ERROR" } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.