Using the API to enter and leave maintenance?

Using the API to enter and leave maintenance?

avatar

We have scheduled database server maintenance and we can script a pre and post action. I would like to use the API to enter and leave maintenance on all of the PSU servers while the database server is down.

I've tried calling PUT /api/v1/computer?id={id}&maintenance=true however this just results in a new computer object being created in the database, so I can't imagine this is the correct way to do this.

All Comments (1)

avatar

Hello @realslacker

Thank you for reporting this.

I found a previous discussion around automating Maintenance mode where the recommended approach was to use Set-PSUComputer with the -Maintenance parameter rather than calling the /api/v1/computer endpoint directly.

The current 2026.3.x PowerShell Universal module still includes Set-PSUComputer, but before recommending the exact syntax for your environment, could you please confirm the exact PSU version you are currently running?

Once we have that, I can verify the supported method for entering and leaving Maintenance mode on all of your PSU servers and determine whether the behavior you are seeing with the PUT request is expected for that version.

Best regards,
Ruben Tapia