Skip to main content

createRestoreQuarantineItemTask

This method creates a new task to restore items from the quarantine.

Important

This main section of this article article contains information for the 1.1 version of the method. You can find information for version 1.0 here.

Parameters

Parameter

Type

Optional

Description

quarantineItemsIds

Array

No

The list of IDs for the quarantined items. You can restore maximum 100 items once.

locationToRestore

String

Yes

The absolute path to the folder where the items will be restored. If the parameter is not set, the original location will be used.

addExclusionInPolicy

Boolean

Yes

Exclude the files to be restored from future scans. Exclusions do not apply to items with the Default Policy assigned. The default value for this parameter is False.

Return value

This method returns an array of parent task ids of the created tasks.

Example

Request:

{
       "params": {
           "quarantineItemsIds": [
               "63896b87b7894d0f367b23c6",
               "65896b87b7894d0f367b23c6"
           ],
           "locationToRestore": "C:\RestoreDirectory"
           "addExclusionInPolicy": true
       },
       "jsonrpc": "2.0",
       "method": "createRestoreQuarantineItemTask",
       "id": "5399c9b5-0b46-45e4-81aa-889952433d86"
  }

Response:

{
      "id": "5399c9b5-0b46-45e4-81aa-889952433d86",
      "jsonrpc":"2.0",
      "result": [
          "652feab6b9684f3ba80685d5",
          "652feab6b9684f3ba80685d5"
      ]
}

Version 1.0

Parameters

Parameter

Type

Optional

Description

quarantineItemsIds

Array

No

The list of IDs for the quarantined items. You can restore maximum 100 items once.

locationToRestore

String

Yes

The absolute path to the folder where the items will be restored. If the parameter is not set, the original location will be used.

addExclusionInPolicy

Boolean

Yes

Exclude the files to be restored from future scans. Exclusions do not apply to items with the Default Policy assigned. The default value for this parameter is False.

Return value

This method returns a Boolean which is True when the task was successfully created.

Example

Request:

{
       "params": {
           "quarantineItemsIds": [
               "63896b87b7894d0f367b23c6",
               "65896b87b7894d0f367b23c6"
           ],
           "locationToRestore": "C:\RestoreDirectory"
           "addExclusionInPolicy": true
       },
       "jsonrpc": "2.0",
       "method": "createRestoreQuarantineItemTask",
       "id": "5399c9b5-0b46-45e4-81aa-889952433d86"
  }

Response:

  {
      "id": "5399c9b5-0b46-45e4-81aa-889952433d86",
      "jsonrpc":"2.0",
      "result": True
  }