feat(grafana): add grafana OSS API - #478
Draft
henningpokriefke wants to merge 1 commit into
Draft
Conversation
henningpokriefke
marked this pull request as draft
August 29, 2026 22:25
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.
Adds
@distilled.cloud/grafana, an Effect-native SDK for the structured self-hosted Grafana OSS/apisAPI. The package is generated from pinned Grafana 13.2.0 OpenAPI snapshots and deliberately excludes legacy/apiroutes, Grafana Cloud APIs, and features that are not present in the OSS image.109 operations are generated across five API modules:
dashboard.grafana.app/v2)folder.grafana.app/v1)playlist.grafana.app/v1)rules.alerting.grafana.app/v0alpha1)notifications.alerting.grafana.app/v1beta1)The handwritten runtime layer provides self-hosted Basic/Bearer authentication,
/apisURL construction, namespace handling, PATCH media types, pagination, retry-after handling, typed errors, and package exports.scripts/convert.tscontains the Grafana-specific conversion rules;scripts/generate.tsdelegates service generation to the shared Distilled generator.Scope decisions
/apiendpoints, Secrets Management, and Banners are excluded from this self-hosted OSS package.Verification
I did around 147 tests against a Grafana container, as temporary tests.
The checks were grouped as follows:
/apispaths, legacy-route rejection, namespaces, headers, JSON and PATCH bodies, pagination, retry handling, typed 404s, and unknown-error fallback.The container test files and Testcontainers dependency are intentionally not shipped in this PR. The package keeps the reproducible snapshots, conversion pipeline, generated services, and handwritten runtime needed by a future Alchemy Grafana provider.