Maintenance Window

Allows a user to create a schedule to disable all Anomaly Alerts, Whitelist Alerts, Incidents, etc.

Maintenance Window Update API

This API can be used to add or remove a maintenance window for a given system and a given set of instances. No project name needs to be specified; the update is performed on all corresponding projects.

API/api/v1/update-maintenance-window (GET or POST)
InputcustomerName: the user to run the API as (must be the system owner or an administrator)

licenseKey: the license key of the user specified by customerName

ownerName: the owner of the system to run the API for (must match customerName unless user specified by customerName is an administrator)

input: JSON with the following attributes:

  • systemId: the system key (Refer: How to find the system id?)
  • instanceSet: set of instance names
  • windowStart: the start time of the maintenance window, in milliseconds
  • windowEnd: the end time of the maintenance window, in milliseconds
  • delete: optional; if set to true, will delete the corresponding maintenance window(s) instead of creating them (default is false)
OutputJSON object; success=true if the task was successfully sent; otherwise, check message parameter for error information. If success=true, statusKey parameter will also be returned. This string can be used to check the progress of the operation (see below)

Please Note: This schedule will be applicable only to instances in the instanceSet attribute, across all the projects in the system.

Example API call:

parametervalue
customerNameuser
licenseKeyfedcba9876543210fedcba9876543210fedcba98
ownerNameuser
input{ “systemId”:”0123abcd0123abcd0123abcd0123abcd0123abcd”, “instanceSet”:[“ip-1-2-3-4”, “ip-100-0-0-0”], “windowStart”:1658448000000, “windowEnd”:1658451600000, “delete”:false }

Example return value:

attributevalue
successtrue
message(empty string)
statusKeyabcdzyxw12349876

How to find the system id?

Go to settings and click on the edit icon next to the system name in the list. A pop up opens up where you can read system id.

Checking the status

A successful result from the above API only indicates that the task was successfully added to the queue. To check the status of the operation, including any errors that may have been encountered, use the following API:

API/api/v1/update-maintenance-window-status (GET or POST)
InputstatusKey: the statusKey returned by the API above
OutputIf corresponding task found, JSON object with following attributes:

  • statusKey: the statusKey given
  • statusState: “success”, “fail”, or “in_progress”
  • statusMessage: error message, or message indicating result

If corresponding task not found, JSON object with following attributes:

  • success: equal to false
  • message: error message

Example API call: https://app.insightfinder.com/api/v1/update-maintenance-window-status?statusKey=abcdzyxw12349876

Example return value:

attributevalue
statusKeyabcdzyxw12349876
statusStatesuccess
statusMessageMade 1 update.