getMaintenanceWindows
A Graze API GET request that returns maintenance windows based on how many should be returned. Only returns active recurring windows and scheduled maintenance windows, not expired or deleted maintenance windows.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getMaintenanceWindows
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Number of the first maintenance window to return, 0 to start at the first, 10 to start at the 11th. |
| Number | Yes | Maximum number of maintenance windows to return. |
Response
Endpoint getMaintenanceWindows
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| Array | An array of objects containing the details of the returned maintenance windows. |
Examples
The following examples demonstrate typical use of endpoint getMaintenanceWindows
:
Request example
Example cURL request to return the first 20 maintenance windows:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getMaintenanceWindows" --data-urlencode 'start=0' --data-urlencode 'limit=20'
Response example
Example successful response returning details of one maintenance window:
{ "windows": [ { "del_flag": false, "forward_alerts": false, "last_updated": 1574074779, "timezone": "Europe/London", "description": "This is 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 } ] }