KSC Open API  13.1
Kaspersky Security Center API description
Task start conditions

The parameter TASK_ADDITIONAL_PARAMS (paramParams) in the task properties (Task settings format) might contain the parameter KLPRTS_START_CONDITION (paramParams) for some specific schedule types, with additional conditions to start the task.
Sample:

    +---TASK_ADDITIONAL_PARAMS
        +---KLPRTS_START_CONDITION
            +---KLPRTS_START_CONDITION_TYPE = (paramInt) StartCondition enum description
            +---KLPRTS_START_CONDITION_VALUE = (paramInt) or (string) - see below
            +---KLPRTS_START_CONDITION_VALUE2 = (paramString) - see below
            +---KLPRTS_START_CONDITION_VALUE_EX = (paramInt) - see below
    


The meaning of the parameters are described below.
KLPRTS_START_CONDITION_TYPE - Type start conditions. See StartCondition enum description for valid values.

The meaning of the other parameters (KLPRTS_START_CONDITION_VALUE, KLPRTS_START_CONDITION_VALUE2, KLPRTS_START_CONDITION_VALUE_EX) depends on the value of KLPRTS_START_CONDITION_TYPE:

Parameter nameKLPRTS_START_CONDITION_TYPE = KlAkTsk_TSC_AV_DB_UPDATEDKLPRTS_START_CONDITION_TYPE = KlAkTsk_TSC_VIRUS_ATTACKKLPRTS_START_CONDITION_TYPE = KlAkTsk_TSC_TASK_COMPLETED.
KLPRTS_START_CONDITION_VALUENot applicableVirus outbreak source: 1 - file system protection, 2 - mail protection, 3 - perimeter protection. Type: paramIntServer's ID of a group or global task. Type: paramString up to 100 Unicode characters PRTS_TASK_TARGET_COMPUTERS_TYPE.
KLPRTS_START_CONDITION_VALUE2Not applicableNot applicableTask storage's ID of a group or global task. Type: paramString up to 100 Unicode characters.
KLPRTS_START_CONDITION_VALUE_EXnot applicablenot applicableresult of a task execution. May contain 4 (Task is completed) or 3 (Task failed). See Task states. Type: paramInt.

Tasks compatibility for "KlAkTsk_TSC_TASK_COMPLETED"

  • If task to start has "PRTS_TASK_TARGET_COMPUTERS_TYPE" == 2, then the condition "KlAkTsk_TSC_TASK_COMPLETED" does not apply.
  • Conditional task (KLPRTS_START_CONDITION_VALUE) must be selected across tasks in a group (or parent groups) of controlled task or from the list of a task for selected computers.
    Note:
    For client's tasks, use the following parameters instead of KLPRTS_START_CONDITION:
        +---"EVENT_TYPE" = "KLPRCI_TaskState"
        +---"EVENT_BODY_FILTER" - Params
            +---"KLPRCI_TASK_TS_ID" - Task ID in KLPRTS::TasksStorage
            +---"KLPRCI_newState" - See Task states