Request Parameters
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 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
From the returned XML on the Get the Quarantine State request, take the following parameters:
<object> = 8f7b2c47-8e9b-11e9-5812-dcfdccec8a94
<station_id> = 2091ada3-ed5e-e611-3392-f0b9022a5484
<q_time> = 20190614115718980
For the request to restore object from the Quarantine, the object parameter is formed like the following: <object>:<station_id>:<q_time>.
In the result, you have the following request:
http://192.168.1.1:9080/api/quarantine/restore.ds?object=8f7b2c47-8e9b-11e9-5812-dcfdccec8a94%3A2091ada3-ed5e-e611-3392-f0b9022a5484%3A20190614115718980
|
XML and JSON response structure examples are described below.
XML Response
<drweb-es-api api_version="4.3.0" timestamp="1560533442" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
<items>
<object status="delayed">8f7b2c47-8e9b-11e9-5812-dcfdccec8a94:2091ada3-ed5e-e611-3392-f0b9022a5484:20190614115718980</object>
</items>
</drweb-es-api>
|
Description of XML Response Parameters
The <items /> element contains information on 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. Can take the following values:
•initiated—restoration is initiated, •delayed—restoration is delayed, •failed—restoration 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
{ "head": {
"status": true,
"timestamp": 1560535448,
"api": {
"version": 40300,
"versionString": 4.3.0},
"server": {
"name": "192.168.1.1",
"version": "12.00.0.201909260",
"uuid": "76b05bc0-8691-11e9-63e5-7036cecd07fa"}},
"data": {
"8f7b2c47-8e9b-11e9-5812-dcfdccec8a94:2091ada3-ed5e-e611-3392-f0b9022a5484:20190614115718980": "delayed"}}
|
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. Can take the following values:
•initiated—restoration is initiated, •delayed—restoration is delayed, •failed—restoration is failed. |
|