This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.



object task.create(object task)

This method allows to create new task.


(object) A task to create.

The method accepts the following parameters.

Parameter Type Description
integer Task type.

Possible values:
6 - Check now.
string/array IDs of items and low-level discovery rules.

Item or discovery rule must of the following type:
0 - Zabbix agent;
1 - SNMPv1 agent;
3 - simple check;
4 - SNMPv2 agent;
5 - Zabbix internal;
6 - SNMPv3 agent;
8 - Zabbix aggregate;
10 - external check;
11 - database monitor;
12 - IPMI agent;
13 - SSH agent;
14 - TELNET agent;
15 - calculated;
16 - JMX agent.

Return values

(object) Returns an object containing the IDs of the created tasks under the taskids property. One task is created for each item and low-level discovery rule. The order of the returned IDs matches the order of the passed itemids.


Creating a task

Create a task check now for two items. One is an item, the other is a low-level discovery rule.


           "jsonrpc": "2.0",
           "method": "task.create",
           "params": {
               "type": "6",
               "itemids": ["10092", "10093"],
           "auth": "700ca65537074ec963db7efabda78259",
           "id": 1


           "jsonrpc": "2.0",
           "result": {
               "taskids": [
           "id": 1


CTask::create() in frontends/php/include/classes/api/services/CTask.php.