ESET Online Help

Search
Select the category
Select the topic

ESET PROTECT Cloud API

Using the API with Swagger

Swagger UI provides complete pre-fabricated API calls:

OAuth

Automation

Device Management

Incident Management


note

To avoid connection problems, use the API based on location of your ESET PROTECT / ESET Inspect server (EU, US, JPN).

Automation API calls support following client tasks:

Isolate computer from network

End computer isolation from network

On-Demand Scan

Shut down computer

Stop managing (Uninstall ESET Management Agent)

Software Uninstall (Third-party antivirus software)

Operating system update

Run command

Kill process by PID

 


important

REST APIs support only manual trigger type, which means starting ASAP. You cannot create tasks with other trigger types (for example, starting periodically) in REST API. GetDeviceTasks record does not display any other trigger types other than manual.

 

You can define task type via task.action.name attribute:

task.action.name

task

StartNetworkIsolation

Isolate computer from network

EndNetworkIsolation

End computer isolation from network

OnDemandScan

On-demand scan

ShutdownComputer

Shut down computer

StopManaging

Stop managing (Uninstall ESET Management Agent)

ThirdPartyAVRemove

Software Uninstall (Third-party antivirus software)

SystemUpdate

Operating system update

RunCommand

Run command

KillProcessByPid

Kill process by pid

 

In case of OnDemandScan and ShutdownComputer, you can configure additional task settings via task.action.params:

{

  "@type": "type.googleapis.com/Era.Common.DataDefinition.Task.OS.ShutdownComputer",

  "restart": false,

  "actions": {

    "cancelAction": false,

    "postpone": "OneHour"

  }

}


example

restart—if true, computer is restarted, if false computer is shutdown.

actions—allowed actions for device users, postpone and cancel.

cancelActiontrue if user will be able to cancel the action or false if not.

postpone—option to postpone action; possible postpone options are:

  Cannot (Default value)

  OneHour

  ThreeHours

  FiveHours

  OneDay

  ThreeDays

  SevenDays

  FifteenDays

  TwentyDays

  ThirtyDays

 

OnDemandScan parameters:

{

  "@type": "type.googleapis.com/Era.Common.DataDefinition.Task.ESS.OnDemandScan",

  "scanProfile": "InDepth",

  "customProfileName": "",

  "scanTargets": [

    ""

  ],

  "cleaningEnabled": false,

  "shutdownEnabled": false,

  "shutdownLocked": false,

  "powerActions": {

    "cancelAction": false

    "postpone": "OneHour",

  }

}


example

cleaningEnabledtrue if cleaning is enabled.

customProfileName—custom profile name for custom scan profile.

scanProfile—scan profile that will be used during the scan; possible scan profiles are:

  InDepth

  InDepth

  Smart

  ContextMenu

  MyProfile

  Custom

scanTargets—list of scan targets. Empty list or an item equals 'eset://AllTargets', which means the full scan.

shutdownEnabledtrue if shutdown is enabled after scan completion.

shutdownLockedtrue if shutdown is enforced after scan (cannot be canceled).

powerActions—allowed actions for device users, postpone and cancel; possible postpone options are:

  Cannot (Default value)

  OneHour

  ThreeHours

  FiveHours

  OneDay

  ThreeDays

  SevenDays

  FifteenDays

  TwentyDays

  ThirtyDays

You can see the result of OnDemandScan in task_runs[:]result. Example of scan result:

"result": {

  "scannedTargets": "",

  "scanned": 0,

  "infected": 0,

  "cleaned": 0,

  "severity": "LOG_INFORMATION",

  "@type": "type.googleapis.com/Era.Common.DataDefinition.Task.OnDemandScanResult"

}


example

scannedTargets—list of scanned targets separated by semicolon.

scanned—the number of scanned files.

infected—the number of infected files.

cleaned—the number of cleaned files.

severity—severity of scan task.

 

SystemUpdate parameters:

{

  "@type": "type.googleapis.com/Era.Common.DataDefinition.Task.OS.SystemUpdate",

  "acceptEula": false,

  "installOptionalUpdates": false,

  "allowReboot": false,

  "rebootActions": {

    "cancelAction": false,

    "postpone": "OneHour"

  }

}


example

acceptEula—true if automatic EULA acceptance is allowed if it is requested by any of the updates (only Windows platform).

installOptionalUpdates—true if optional updates should be also installed (only Windows platform).

allowReboot—true if reboot is allowed if it is requested by any of the updates.

cancelAction—true if user will be able to cancel the reboot action or false if not.

  postpone—option to postpone reboot action; possible postpone options are:

  Cannot (Default value)

  OneHour

  ThreeHours

  FiveHours

  OneDay

  ThreeDays

  SevenDays

  FifteenDays

  TwentyDays

  ThirtyDays

 

RunCommand parameters:

{

  "@type": "type.googleapis.com/Era.Common.DataDefinition.Task.OS.RunCommand",

  "commandLine": "",

  "currentDirectory": ""

}


example

commandLine—platform dependent command line that will be put into script file and executed.

currentDirectory—working directory for script file.

 

KillProcessByPid parameters:

{

  "@type": "type.googleapis.com/eset.dotnod.os_integration.v1.KillProcessByPidRequest",

  "pid": 0,

  "executableHashSha1": "",

  "executableHashSha2_256": ""

}


example

pid - Local process id as seen by operating system.

executableHashSha1 - SHA1 hash of process executable. At least one of the executable_hash_sha1 or executable_hash_sha2_256 must be set, otherwise 400 BAD REQUEST is thrown.

executableHashSha2_256 - SHA2-256 hash of process executable. At least one of the executable_hash_sha1 or executable_hash_sha2_256 must be set, otherwise 400 BAD REQUEST is thrown.

 

Task examples


important

Use the following examples with your own UUIDs and task settings. Device domain calls provide the UUID of groups and devices.

arrow_down_businessOn-demand scan
arrow_down_businessShut down computer
arrow_down_businessIsolate computer from network
arrow_down_businessEnd computer isolation from network
arrow_down_businessStop managing (Uninstall ESET Management Agent)
arrow_down_businessSoftware Uninstall (Third-party antivirus software)
arrow_down_businessOperating System Update
arrow_down_businessRun Command
arrow_down_businessKill process by PID