Moogsoft Docs

deleteMaintenanceWindows

A Graze API POST request that deletes maintenance windows that match the specified filter.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint deleteMaintenanceWindows takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

filter

String

Yes

An SQL-like filter to match maintenance windows that you want to delete.

See Filter Search Data for more information on creating SQL-like filters and examples.

Response

Endpoint deleteMaintenanceWindows returns the following response:

Examples

The following examples demonstrate typical use of endpoint deleteMaintenanceWindows:

Request examples

Example cURL request to delete maintenance windows that match the filter where the maintenance window ID is 3 or 4:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/deleteMaintenanceWindows" -H "Content-Type: application/json; charset=UTF-8" -d '{"filter":"id in (3,4)"}'curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/deleteMaintenanceWindow" -H "Content-Type: application/json; charset=UTF-8" -d '{"id"[123]}'

Example cURL request to delete maintenance windows that match the filter where the host is "CSF_RD_243:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/deleteMaintenanceWindows" -H "Content-Type: application/json; charset=UTF-8" -d '{"filter":"host matches \"CSF_RD_243\""}'

Response example