findMaintenanceWindows
A Graze API GET request that returns maintenance windows that match a filter.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint findMaintenanceWindows
returns the following response:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
A valid |
|
String |
Yes |
SQL-like filter to match maintenance windows that you want to find. For example: See Filter Search Data for more information on creating SQL-like filters. |
|
Number |
No |
Maximum number of windows to return. Default is 100. |
Response
Endpoint findMaintenanceWindows
returns the following response:
Successful requests return a JSON object containing the following:
Name |
Type |
Description |
---|---|---|
|
Object |
A list of objects containing details of the maintenance windows that match the filter. |
Examples
The following examples demonstrate typical use of endpoint findMaintenanceWindows
:
Request example
Example cURL request to return the first two maintenance windows that matches the filter where the description is "Maintenance":
curl -G -u graze:graze -k -v "https://localhost/graze/v1/findMaintenanceWindows" --data-urlencode 'filter=description matches "Maintenance"' --data-urlencode 'limit=2'
Response example
A successful request returns two maintenance windows:
{ "windows": [ { "del_flag": false, "forward_alerts": false, "last_updated": 1567721780, "timezone": "Europe/London", "description": "Maintenance of server LON_DB_375", "recurring_period_units": 4, "filter": "(source IN (LON_DB_375))", "duration": 3600, "recurring_period": 1, "name": "Server Maintenance", "updated_by": 3, "id": 1, "start_date_time": 1567812600 }, { "del_flag": false, "forward_alerts": false, "last_updated": 1574074779, "timezone": "Europe/London", "description": "New Maintenance Window", "recurring_period_units": 0, "filter": "(severity IN (0, 1, 2, 3, 4, 5)) AND (owner IN (3))", "duration": 3600, "recurring_period": 0, "name": "New Maintenance Window", "updated_by": 3, "id": 2, "start_date_time": 1574074744 } ] }