{"id":15178866,"url":"https://github.com/nexucis/grafana-go-client","last_synced_at":"2025-10-26T17:31:21.581Z","repository":{"id":57517362,"uuid":"138735308","full_name":"Nexucis/grafana-go-client","owner":"Nexucis","description":"A go client for the Grafana API","archived":false,"fork":false,"pushed_at":"2019-10-20T10:31:45.000Z","size":203,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T21:52:43.887Z","etag":null,"topics":["api","client","go","golang","grafana","http"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nexucis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-26T12:32:17.000Z","updated_at":"2020-04-05T05:11:11.000Z","dependencies_parsed_at":"2022-09-15T21:52:32.415Z","dependency_job_id":null,"html_url":"https://github.com/Nexucis/grafana-go-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexucis%2Fgrafana-go-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexucis%2Fgrafana-go-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexucis%2Fgrafana-go-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexucis%2Fgrafana-go-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nexucis","download_url":"https://codeload.github.com/Nexucis/grafana-go-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238375196,"owners_count":19461567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","client","go","golang","grafana","http"],"created_at":"2024-09-27T15:40:41.039Z","updated_at":"2025-10-26T17:31:16.277Z","avatar_url":"https://github.com/Nexucis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Grafana-go-client\n=========================\n[![CircleCI](https://circleci.com/gh/Nexucis/grafana-go-client.svg?style=shield)](https://circleci.com/gh/Nexucis/grafana-go-client) [![GitHub license](https://img.shields.io/badge/license-Apache2-blue.svg)](./LICENSE) [![codecov](https://codecov.io/gh/Nexucis/grafana-go-client/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexucis/grafana-go-client)\n\nA go client for the [Grafana API](http://docs.grafana.org/http_api/)\n\n\n1. [Current Status](#overview) \n2. [Installation](#installation)\n3. [Quickstart](#quickstart)\n4. [Contributions](#contributions)\n5. [Development](#development)\n6. [License](#license)\n\n## Overview\nFor the moment, the client only covers the Grafana API in the version 5. There is no guarantee that the client is compatible with previous or latest Grafana version.\n\n### Versioning\nThis project uses the following version rules: \n\n```\nX.Y.Z\n```\n\nWhere : \n* X is the major version of Grafana supported by this project\n* Y is the major version of this client. Be careful with this rule, you can have some breaking changes between two **Y** number. (even if usually it won't happen)\n* Z is the minor version of this client. It will be increased when there are some bug fixes.\n\n### Supported Version\n\n| Grafana Version | Support Branch  |\n| --------------- | --------------- |\n| \u003e= 5.0, \u003c 6.0   | master          |\n\n\n### Roadmap\nHere is an overview of what is done and what is going to be done\n\n#### API\n*currently not well tested*\n\n- [x] Alerting\n- [x] Admin\n- [x] Annotations\n- [x] Authentication (key API)\n- [ ] Dashboard ( not yet fully implemented, need to specify the dashboard struct)\n   - [x] Dashboard Versions\n   - [x] Dashboard Permissions\n- [x] Data Source\n- [x] Folder\n   - [x] Folder Permissions\n- [x] Folder/dashboard search\n- [x] Organisation\n   - [x] Current Org\n   - [x] Manipulate Org as admin\n- [x] Playlist\n- [x] Snapshot\n- [x] User\n   - [x] Current User\n   - [x] Manipulate User as admin\n- [x] Team\n\n## Installation\nIf you use [dep](https://golang.github.io/dep/) as dependency manager, you fire the following command:\n\n```bash\ndep ensure -add github.com/nexucis/grafana-go-client\n```\n\nIf you are using go mod instead, you can perform the following command:\n\n```bash\ngo get github.com/nexucis/grafana-go-client\n```\n\n## Quickstart\n\n```go\npackage main\n\nimport (\n\n\t\"github.com/golang/glog\"\n\t\"github.com/nexucis/grafana-go-client/grafanahttp\"\n\t\"github.com/nexucis/grafana-go-client/api\"\n)\n\nfunc main() {\n\trest, err := grafanahttp.NewWithURL(\"http://admin:admin@localhost:3000\")\n\tif err != nil {\n\t\tglog.Fatal(err)\n\t}\n\t\n\tclient := api.NewWithClient(rest)\n\t\n\tuser,err := client.CurrentUser().Get()\n\t\n\t// do something with the information get from the api\n}\n```\n\n## Contributions\nAny contribution or suggestion would be really appreciated. Feel free to use the Issue section or to send a pull request.\n\n## Development\nAll following tools are running by [circleci](https://circleci.com/gh/Nexucis/grafana-go-client), so in order to help you to improve your code and make easier your life, here it is how you can launch the tools with the correct parameter.\n\n### Run unit test\nYou can run the unit test using make :\n\n```bash\nmake test\n```\n\nThis command only run the unit test which basically only the test in the http package. All test written in the package /api/v1 needs grafana. See [Run integration test](#run-integration-test) section. \n\n### Run integration test\nIf you want to launch the unit test, you need to have a local grafana instance which must be accessible through the url http://localhost:3000. A simply way to launch it, is to start the [corresponding container](https://hub.docker.com/r/grafana/grafana/) : \n\n```bash\ndocker run -d --name=grafana -p 3000:3000 grafana/grafana:5.4.3\n```\n\nOnce Grafana is up, you can run the following command :\n\n```bash\nmake integration-test\n```\n\n\n## License\nThis library is distributed under the [Apache 2.0](./LICENSE) license\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexucis%2Fgrafana-go-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexucis%2Fgrafana-go-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexucis%2Fgrafana-go-client/lists"}