CLI Server Reboot Tool
Build a command-line interface tool that allows field technicians to reboot remote servers via REST API calls. Implement basic functionality, error handling, concurrent operations, and discuss testing strategies.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late January, 2026
Format: 60 min CoderPad, Python, 4 parts Scenario: Build a CLI tool for field technicians to reboot remote servers via API. Setup they provide: Backend service running on http://localhost:3000 Endpoint: /reboot (POST) Request: {"serial": "<server_id>"} Response: {"result": "success/failure", "reason": "..."} Part 1: Basic reboot client Send POST request to reboot endpoint Parse response, print result Part 2: Error handling Handle timeouts, connection errors, invalid JSON Print meaningful output on failures Part 3: Concurrent fleet reboot Reboot multiple servers in parallel They noted async + requests is a common trap (blocks event loop) ThreadPoolExecutor + requests works cleanly Part 4: Unit testing (verbal) Explain how you'd test this Mocking requests, testing error cases, etc. Good luck to whoever uses this. The ThreadPoolExecutor pattern is clutch for part 3
Hello Interview Premium
Your account is free and you can post anonymously if you choose.