FortiMonitor is a holistic, SaaS-based digital experience and network performance monitoring solution which combines monitoring, network incident management, automation, and network configuration management into a single source of truth

This article describes how to create immediate maintenance via API.


FortiMonitor, Maintenance via API.


FortiMonitor offers API functionality and with that, users can perform different operations.

For example, creating/deleting/viewing instances, fetching and creating users' details, creating/viewing maintenance, etc.


To view the API collection and how it works, refer to the document.


Creating immediate maintenance via API can be quite handy.

Below is an example, of the JSON query which can be executed through the FortiMonitor's swagger-based API page. 


The mandatory fields are:

1) Name.

2) Target (if it's for a specific instance).

3) Either use "Duration" (describes for how long the maintenance should be active) or use "original_end_time" (parameter value must be in UTC, following the format: YYYY-MM-DD HH:MM:SS).

JSON request body: 


  "description": "test-maintenance", 
  "disrupt_active_outages": true, 
  "duration": 10, 
  "exclude_from_availability": true, 
  "individual_targets": null, 
  "monitoring": "no_alerts", 
  "name": "Test-API", 
  "notification_schedule": null, 
  "original_end_time": null, 
  "original_start_time": null, 
  "pause_all_checks": null, 
  "recurrence_interval": 1, 
  "recurrence_type": null, 
  "show_in_public_report": true, 
  "tags": null, 
  "targets": ["<server_id>"], 
  "weekdays": null


With the above example, if by entering the server_id, users should be able to add immediate maintenance which will be active for 10 minutes.


If using Postman or invoking the API through code, refer to the documentation for more details.