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 service.create(object/array services)

This method allows to create new services.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.


(object/array) services to create.

Additionally to the standard service properties, the method accepts the following parameters.

Parameter Type Description
dependencies array Service dependencies.

Each service dependency has the following parameters:
- dependsOnServiceid - (string) ID of an service the service depends on, that is, the child service.
- soft - (integer) type of service dependency.
parentid string ID of a hard-linked parent service.
times array Service times to be created for the service.

Return values

(object) Returns an object containing the IDs of the created services under the serviceids property. The order of the returned IDs matches the order of the passed services.


Creating an service

Create an service that will be switched to problem state, if at least one child has a problem. SLA calculation will be on and the minimum acceptable SLA is 99.99%.


           "jsonrpc": "2.0",
           "method": "service.create",
           "params": {
               "name": "Server 1",
               "algorithm": 1,
               "showsla": 1,
               "goodsla": 99.99,
               "sortorder": 1
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1


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


CService::create() in ui/include/classes/api/services/CService.php.