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.

maintenance.exists

Description

boolean maintenance.exists(object filter)

This method checks if at least one maintenance that matches the given filter criteria exists.

Parameters

(object) Criteria to search by.

The following parameters are supported as search criteria.

Parameter Type Description
maintenanceid string/array IDs of the maintenances
name string/array Names of the maintenances

Return values

(boolean) Returns true if at least one maintenance that matches the given filter criteria exists.

Examples

Checking maintenance by name

Check if maintenance with the name "Sunday maintenance" already exists.

Request:

{
           "jsonrpc": "2.0",
           "method": "maintenance.exists",
           "params": {
               "name": "Sunday maintenance"
           },
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": true,
           "id": 1
       }
Copy
✔ Copied

Source

CMaintenance::exists() in frontends/php/api/classes/CMaintenance.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.