docs(README): add managedBy to monitors.create example#21
Merged
Conversation
The Quick Start example omitted the `managedBy` field, which the API requires. Every fresh user copying the snippet from PyPI got `DevhelmValidationError: managedBy: Field required` on their first SDK call (verified by a fresh-user devex agent run against prod). Adds `"managedBy": "DASHBOARD"` with an inline explainer comment so users understand what the field means and when to override it. Mirrors the same fix being shipped to docs.devhelm.io and to the TypeScript SDK README. The cleaner long-term answer is server-side defaulting from the X-DevHelm-Surface header — tracked separately. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Quick Start example in the README omitted the `managedBy` field, which the API requires. Every fresh user copying the snippet from PyPI got `DevhelmValidationError: managedBy: Field required` on their first SDK call.
Adds `"managedBy": "DASHBOARD"` with an inline explainer comment so users understand what the field means and when to override it.
Mirrors the same fix shipping to:
Why `DASHBOARD` and not e.g. `CLI`?
`managedBy` records who reconciles drift on the resource. SDK calls from a one-off script are imperative — there's no reconciler — so they share semantics with the dashboard. Setting `CLI` would lie about IaC ownership and trigger a misleading "managed by CLI, edit in code" banner in the dashboard.
The cleaner long-term answer is server-side defaulting from the `X-DevHelm-Surface` header so the field becomes truly optional for SDK callers — tracked separately as a post-launch batch.
Test plan
Made with Cursor