Skip to content

docs(README): add managedBy to monitors.create example#21

Merged
caballeto merged 1 commit into
mainfrom
docs/add-managedby-to-quickstart
May 5, 2026
Merged

docs(README): add managedBy to monitors.create example#21
caballeto merged 1 commit into
mainfrom
docs/add-managedby-to-quickstart

Conversation

@caballeto
Copy link
Copy Markdown
Member

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

  • Renders correctly on PyPI (after next `uv build` + publish)
  • Inline explainer matches the field's actual semantics
  • No code changes — README only

Made with Cursor

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>
@caballeto caballeto merged commit f8aa650 into main May 5, 2026
4 checks passed
@caballeto caballeto deleted the docs/add-managedby-to-quickstart branch May 5, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant