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.

service.update

Description

object service.update(object/array itServices)

This method allows to update existing IT services.

Parameters

(object/array) IT service properties to be updated.

The serviceid property must be defined for each IT service, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

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

Parameter Type Description
dependencies array Service dependencies to replace the current service dependencies.

Each service dependency has the following parameters:
- dependsOnServiceid - (string) ID of an IT service the service depends on, that is, the child IT service.
- soft - (integer) type of service dependency; refer to the service dependency object page for more information on dependency types.
parentid string ID of a hard-linked parent IT service.
times array Service times to replace the current service times.

Return values

(object) Returns an object containing the IDs of the updated IT services under the serviceids property.

Examples

Setting the parent of an IT service

Make IT service "3" the hard-linked parent of service "5".

Request:

{
           "jsonrpc": "2.0",
           "method": "service.update",
           "params": {
               "serviceid": "5",
               "parentid": "3"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "serviceids": [
                   "5"
               ]
           },
           "id": 1
       }

See also

Source

CService::update() in frontends/php/include/classes/api/services/CService.php.