{"id":20434075,"url":"https://github.com/komminarlabs/influxdb3","last_synced_at":"2025-03-05T06:24:51.402Z","repository":{"id":246270109,"uuid":"797109187","full_name":"komminarlabs/influxdb3","owner":"komminarlabs","description":"InfluxDB V3 Go Client Library","archived":false,"fork":false,"pushed_at":"2024-09-30T10:58:38.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-15T19:23:13.455Z","etag":null,"topics":["client-library","database","golang","iiot","influxdb3","iot","management-api","sdk-go","timeseries","timeseries-database","v3"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/komminarlabs/influxdb3","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/komminarlabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-07T08:03:23.000Z","updated_at":"2024-09-30T10:49:11.000Z","dependencies_parsed_at":"2024-06-27T00:13:27.035Z","dependency_job_id":"cc358d94-b8cb-4ee1-bf0d-d1334fdf2353","html_url":"https://github.com/komminarlabs/influxdb3","commit_stats":null,"previous_names":["komminarlabs/influxdb3"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komminarlabs%2Finfluxdb3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komminarlabs%2Finfluxdb3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komminarlabs%2Finfluxdb3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komminarlabs%2Finfluxdb3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komminarlabs","download_url":"https://codeload.github.com/komminarlabs/influxdb3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241976737,"owners_count":20051698,"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":["client-library","database","golang","iiot","influxdb3","iot","management-api","sdk-go","timeseries","timeseries-database","v3"],"created_at":"2024-11-15T08:23:59.085Z","updated_at":"2025-03-05T06:24:51.381Z","avatar_url":"https://github.com/komminarlabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfluxDB v3 Cloud Dedicated Management API Go Client Library\n\nThe InfluxDB v3 Management API Go client library lets you manage an InfluxDB Cloud Dedicated instance and integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application.\n\n## Generated types and API client\n\nThis library is generated using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) from this [OpenAPI spec](https://github.com/influxdata/docs-v2/blob/master/api-docs/cloud-dedicated/management/openapi.yml)\n\n### Generate\n\n```go\ngo generate ./...\n```\n\n## Usage\n\n### Environment variables\n\n```bash\nexport INFLUXDB_BASE_URL=\"https://console.influxdata.com/api/v0\"\nexport INFLUXDB_ACCOUNT_ID=\"4ade9b2e-0a52-4a46-b3b8-1b43ea493a98\"\nexport INFLUXDB_CLUSTER_ID=\"a379c48a-791e-47fe-ba64-628ba19507e8\"\nexport INFLUXDB_TOKEN=\"1e0f14063eb14a9e94fe765bf999a90cb7962f8e0f394110b91053ea26cdce5071d6bca29e4d4684bed463cf2ea9f381\"\n```\n\n### Sample code to list database tokens\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/caarlos0/env/v11\"\n\t\"github.com/komminarlabs/influxdb3\"\n)\n\ntype InfluxdbConfig struct {\n\tAccountId influxdb3.UuidV4 `env:\"INFLUXDB_ACCOUNT_ID\"`\n\tBaseURL   string           `env:\"INFLUXDB_BASE_URL\"`\n\tClusterId influxdb3.UuidV4 `env:\"INFLUXDB_CLUSTER_ID\"`\n\tToken     string           `env:\"INFLUXDB_TOKEN\"`\n}\n\nfunc main() {\n\tcfg := InfluxdbConfig{}\n\topts := env.Options{RequiredIfNoDef: true}\n\n\terr := env.ParseWithOptions(\u0026cfg, opts)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tctx := context.Background()\n\tclient, err := influxdb3.NewClient(cfg.BaseURL, influxdb3.WithRequestEditorFn(func(ctx context.Context, req *http.Request) error {\n\t\treq.Header.Set(\"Accept\", \"application/json\")\n\t\treq.Header.Set(\"Authorization\", \"Bearer \"+cfg.Token)\n\t\treturn nil\n\n\t}))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresp, err := client.GetDatabaseTokens(ctx, cfg.AccountId, cfg.ClusterId)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode == http.StatusOK {\n\t\tbodyBytes, err := io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tbodyString := string(bodyBytes)\n\t\tprintln(bodyString)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomminarlabs%2Finfluxdb3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomminarlabs%2Finfluxdb3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomminarlabs%2Finfluxdb3/lists"}