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 or JSON 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 match the filter where the description is "MyMaintenanceWindow":
curl -G -u graze:graze -k -v "https://localhost/graze/v1/findMaintenanceWindows" --data-urlencode 'filter=description matches "MyMaintenanceWindow"' --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": "{ \"column\": \"source\", \"op\": 10, \"value\": \"LON_DB_375\", \"type\": \"LEAF\" }", "duration": 3600, "recurring_period": 1, "name": "Server Maintenance", "updated_by": 3, "id": 2, "start_date_time": 1567812600 }, { "del_flag": false, "forward_alerts": true, "last_updated": 1567611914, "timezone": "Europe/London", "description": "Server maintenance scheduled every weekend", "recurring_period_units": 3, "filter": "{ \"column\": \"description\", \"op\": 10, \"value\": \"maintenance\", \"type\": \"LEAF\" }", "duration": 7200, "recurring_period": 1, "name": "Service Maintenance Window", "updated_by": 3, "id": 1, "start_date_time": 1567897200 } ] }