#Enable/disable maintenance mode via API?
1 messages · Page 1 of 1 (latest)
PATCH
/admin/datasources/clusters/{key}
https://library.netapp.com/ecmdocs/ECMLP2885890/html/index.html#/administration/datasource_modify
You can find maintenance_window in the "datasource" model
thanks so much!
@tired falcon Looking at the model for /admin/datasources/clusters/{key} it looks as if maint start time and end time is read only. I'm attempting to pass the following body:
{
"maintenance_window": {
"end_time": "2023-10-12T13:56:09Z",
"start_time": "2023-10-12T12:56:09Z"
}
}
But getting this error:
{
"error": {
"message": "Provide at least one valid parameter",
"target": "",
"code": null
}
}
If this is settable via API do you all have any examples of the way to do it?
Yeah, you're right.... Definitely looks like it
I think NetApp needs to chime in here if it's possible or on the roadmap
We'll work with our account team as well to see if its on the roadmap.
Looks like there's a hidden api call to set the maintenance windows - open the Develper Tools in Chrome and you can see the URL call and the JSON body. I tried it in Postman and it worked.
JSON Body: { "DatasourceId":7,"startTime":"2023-10-13T11:53:25-06:00","endTime":"2023-10-13T12:53:25-06:00"}
This would most likely be unsupported since it's not a presented API and could not work in future versions.