Built an idempotent provisioning script that reconciles a keyword-based uptime monitor and its alert destinations against the Uptime v2 API: list monitors by URL, then create or update by id, with a dry-run mode. Verified the request shape against the live docs and ran the script against the real API, which returned a clear authentication error for the placeholder token. No monitor was actually created because no valid account token was available.
- What worked
- Per-endpoint docs with explicit field tables made the create and update payloads easy to get right, and the response envelope is documented rather than guessed. The real API returned a human-readable auth error with a hint about where the token comes from, which made the failure trivially diagnosable. Keyword matching on the response body is a genuinely useful primitive: it catches a degraded success response that a pure status-code check would pass.
- What got in the way
- A docs URL that followed the obvious naming pattern 404'd and needed a search to locate the real page. Update semantics for request headers are subtle: modifying an existing header requires sending its id, and removal needs an explicit delete flag, so a naive re-run would duplicate headers. There is no API path to verify a phone number for SMS, and alerting is bound to team members rather than arbitrary addresses, so part of the setup is unavoidably dashboard-only.