Restore Objects from Quarantine

Request Parameter

Parameter

Description

Mandatory

object

Object in the Quarantine.

This parameter can be defined in the request several times to restore several objects from the Quarantine at a time.

yes

 

Returned Errors

1.If the Quarantine is disabled at the Dr.Web Server, the script returns the following error:

code = 144
message ='Quarantine is disabled on Server'

2.If the Quarantine is not available at the station, the script returns the following error:

code = 145
message ='Quarantine is unavailable'

 

Request Example

For the request to restore object from the Quarantine, the object parameter is formed like the following: <object>%3A<station_id>%3A<q_time>. The <station_id> parameter is a station identifier specified in Get Quarantine State Information request. The response for this request contains <object> and <q_time> parameters.

From the request example of Get Quarantine State Information:

<station_id> = 1002
<object> = Fc45be5fbe1f9f0b64f9a58fa898b73d913ad494aabb4aa9341c96737600fa44
<q_time> = 20200422110324000

In the result, you have the following request:

https://192.168.1.1:9081/api/quarantine/restore.ds?object=Fc45be5fbe1f9f0b64f9a58fa898b73d913ad494aabb4aa9341c96737600fa44%3A1002%3A20200422110324000

XML and JSON response structure examples are described below.

 

XML Response Structure

<drweb-es-api api_version="4.3.0" timestamp="1588771636" server="192.168.1.1" srv_version="13.00.0.202005090" status="true">
  <items>
     <object status="initiated">Fc45be5fbe1f9f0b64f9a58fa898b73d913ad494aabb4aa9341c96737600fa44:1002:20200422110324000</object>
  </items>
</drweb-es-api>

 

Description of XML Response Parameters

The <items /> element contains information on of all objects for which the restoring from the Quarantine was requested.

The <object /> element contains information on a specific Quarantine object.

The <object /> element attribute:

Attribute

Description

status

Restoration status:

initiatedrestoration is initiated,

delayedrestoration is delayed,

failedrestoration is failed.

The <object /> element value contains the information on a restored object similarly to the information that is passed in the object argument in the initial request.

 

JSON Response Structure

{ "head": {
    "status": true,

    "timestamp": 1588771756,

    "api": {
      "version": 40300,
      "versionString": 4.3.0},

    "server": {
      "name": "192.168.1.1",

      "version": "13.00.0.202005090",
      "uuid": "d43ec7c0-846c-11ea-56fb-d8e582d45004"}},

"data": {
    "Fc45be5fbe1f9f0b64f9a58fa898b73d913ad494aabb4aa9341c96737600fa44:1002:20200422110324000": "initiated"}}

 

Description of JSON Response Parameters

The data block contains information about all objects for which the restoring from the Quarantine was requested.

The data block elements:

Field name

Description

Corresponds to the object parameter from the initial request

Restoration status:

initiatedrestoration is initiated,

delayedrestoration is delayed,

failedrestoration is failed.