KSC Open API
Kaspersky Security Center API description
wstring GroupTaskControlApi::CommitImportedTask ( wstring  wstrId,
boolean  bCommit 
)

Completes import of task.

Performs actual import of task, which was initiated earlier by GroupTaskControlApi::ImportTask method. This method works with task data, which was already processed and analyzed. At time of calling this method, one should have appropriate rights for task creation. In case of group task, there should be write access to that group. If imported task is task for specified hosts, there should be read access to that hosts. If task is query-based task, there should be read access to related query. For additional info on task import options, see pExtraData parameter of GroupTaskControlApi::ImportTask method.

Parameters:
wstrId(wstring) Identifier of blob with task data. Use GroupTaskControlApi::ImportTask method to get its value
bCommit(boolean) Whether to commit or not. If bCommit is true, method will perform its work and complete import operation by creating new task and returning its identifier. If bCommit is false, method will cleanup old data and import will be cancelled.
Returns:
(wstring) Unique identifier of new task if bCommit was set to true, and empty string otherwise
Exceptions:
KLERR::Error*Method must throw KLERR::Error* exception with code KLSTD::STDE_NOACCESS. For possible reasons, see detailed method description above
KLERR::Error*Method must throw KLERR::Error* exception with code KLSTD::STDE_NOTFOUND in case object with identifier wstrId not found: either identifier is not correct (check that it identifier string, which was returned by GroupTaskControlApi::ImportTask method), or object lifetime reached limit
KLERR::Error*Method must throw KLERR::Error* exception with code KLSTD::STDE_NOMEMORY in case of insufficient memory for storing required task data