We had some automated maintenance scripts to put things in maintenance during updates or code rolls and after upgrading to 6.0 they stopped working.
The weird thing is that the update call won't accept any "timeperiods" with out complaining that "timeperiods" is an invalid parameter.
So a request like this:
Fails with the error:
If I remove start_time it complains about the next parameter and so on.
If I remove "timeperiods" the request succeeds.
The real irony here is that the json data I am sending back is what I got by using "maintenance.get"
So it's complaining about it's own data.
Is something about this call broken in 6.0 or did the call change but the documentation didn't?
Anyone else having issues?
The weird thing is that the update call won't accept any "timeperiods" with out complaining that "timeperiods" is an invalid parameter.
So a request like this:
Code:
{
"method": "maintenance.update",
"params": {
"active_since": "1635397200",
"maintenanceid": "252",
"name": "Portal Even",
"description": "",
"maintenance_type": "0",
"groupids": [
322
],
"timeperiods": [
{
"timeperiod_type": "0",
"every": "1",
"month": "0",
"dayofweek": "0",
"day": "1",
"start_time": "0",
"period": "300",
"start_date": "1635423480"
}
],
"active_till": "2140491600"
},
"id": 1,
"jsonrpc": "2.0",
"auth": "XXXXXXXXXXXXX"
}
Code:
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid params.",
"data": "Invalid parameter \"/1/timeperiods/1\": unexpected parameter \"start_time\"."
},
"id": 1
}
If I remove "timeperiods" the request succeeds.
Code:
{
"method": "maintenance.update",
"params": {
"active_since": "1635397200",
"maintenanceid": "252",
"name": "Portal Even",
"description": "",
"maintenance_type": "0",
"groupids": [
322
],
"active_till": "2140491600"
},
"id": 1,
"jsonrpc": "2.0",
"auth": "XXXXXXXXXXXXX"
}
So it's complaining about it's own data.
Is something about this call broken in 6.0 or did the call change but the documentation didn't?
Anyone else having issues?
Comment