TypeScript clients for the Grafana HTTP API, automatically generated from Grafana's OpenAPI specification using OpenAPI Generator.
Disclaimer: This is not an official Grafana HTTP client. Since Grafana does not provide the official HTTP client for JavaScript / TypeScript, I created these packages for the community to use. If you need more packages for specific versions, please let me know.
This repository contains multiple packages:
@grafana-openapi-client/axios
- Axios-based HTTP client@grafana-openapi-client/fetch
- Fetch-based HTTP client
The version number is the Grafana version that the client is generated from.
You can check the source code and the README for each package from Releases, or just check the packages
folder in the corresponding branch (e.g., release/11.4.0).
Choose your preferred HTTP client implementation (axios
or fetch
):
Using npm:
npm install @grafana-openapi-client/[email protected]
# or
npm install @grafana-openapi-client/[email protected]
Using yarn:
yarn add @grafana-openapi-client/[email protected]
# or
yarn add @grafana-openapi-client/[email protected]
Using pnpm:
pnpm add @grafana-openapi-client/[email protected]
# or
pnpm add @grafana-openapi-client/[email protected]
- Node.js
- Yarn
- GitHub CLI (for releases)
yarn generate <version>
: Generate API clients for a specific Grafana version.- For example,
yarn generate 11.0.0
will generate clients for Grafana 11.0.0.
- For example,
yarn build
: Build packages in thepackages
folder, after generating the clients.yarn release <version> [package_name]
: Create a new release.- For example,
yarn release 11.0.0
will create a new release for Grafana 11.0.0.
- For example,
Check helper scripts under scripts for more details.
Apache License 2.0 - See LICENSE for more details.