{"id":14956423,"url":"https://github.com/mongodb/go-client-mongodb-atlas","last_synced_at":"2025-11-11T20:58:02.782Z","repository":{"id":36533441,"uuid":"194736246","full_name":"mongodb/go-client-mongodb-atlas","owner":"mongodb","description":"Go Client for MongoDB Atlas ","archived":false,"fork":false,"pushed_at":"2025-04-02T19:48:02.000Z","size":9699,"stargazers_count":79,"open_issues_count":2,"forks_count":34,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-05T00:02:47.857Z","etag":null,"topics":["go","hacktoberfest","mongodb"],"latest_commit_sha":null,"homepage":"https://www.mongodb.com/docs/atlas/reference/api-resources-spec/","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/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-01T20:06:55.000Z","updated_at":"2025-03-19T11:42:35.000Z","dependencies_parsed_at":"2024-05-21T17:37:07.188Z","dependency_job_id":"6be59be2-9b21-486e-8c70-d6429d09e2e6","html_url":"https://github.com/mongodb/go-client-mongodb-atlas","commit_stats":{"total_commits":549,"total_committers":55,"mean_commits":9.981818181818182,"dds":0.8032786885245902,"last_synced_commit":"a249c2648f7c1c5c16184e6928709eda3fd6d0e9"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-atlas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-atlas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-atlas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-atlas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/go-client-mongodb-atlas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248632230,"owners_count":21136647,"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":["go","hacktoberfest","mongodb"],"created_at":"2024-09-24T13:13:02.985Z","updated_at":"2025-11-11T20:58:02.753Z","avatar_url":"https://github.com/mongodb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-client-mongodb-atlas\n[![PkgGoDev](https://pkg.go.dev/badge/go.mongodb.org/atlas)](https://pkg.go.dev/go.mongodb.org/atlas)\n![CI](https://github.com/mongodb/go-client-mongodb-atlas/workflows/CI/badge.svg)\n\u003e [!WARNING]  \n\u003e `go-client-mongodb-atlas` is **deprecated** and doesn't receive feature updates. We recommend migrating to the [Atlas Go SDK](https://github.com/mongodb/atlas-sdk-go) for the latest changes.\n\u003e To learn how to migrate from go-client-mongodb-atlas to the Atlas Go SDK, see the [migration guide](https://github.com/mongodb/atlas-sdk-go/blob/main/docs/doc_3_migration.md).\n\nA Go HTTP client for the [MongoDB Atlas API](https://docs.atlas.mongodb.com/api/).\n\nNote that `go-client-mongodb-atlas` only supports the two most recent major versions of Go.\n\n\n## Usage\n\n```go\nimport \"go.mongodb.org/atlas/mongodbatlas\"\n```\n\nConstruct a new Atlas client, then use the various services on the client to\naccess different parts of the Atlas API. For example:\n\n```go\nclient := mongodbatlas.NewClient(nil)\n```\n\nThe services of a client divide the API into logical chunks and correspond to\nthe structure of the Atlas API documentation at\nhttps://docs.atlas.mongodb.com/api/.\n\n**NOTE:** Using the [context](https://godoc.org/context) package, one can easily\npass cancellation signals and deadlines to various services of the client for\nhandling a request. In case there is no context available, then `context.Background()`\ncan be used as a starting point.\n\n### Authentication\n\nThe `go-client-mongodb-atlas` library does not directly handle authentication. Instead, when\ncreating a new client, pass an `http.Client` that can handle Digest Access authentication for\nyou. The easiest way to do this is using the [digest](https://github.com/mongodb-forks/digest)\nlibrary, but you can always use any other library that provides an `http.Client`.\nIf you have a private and public API token pair (https://docs.atlas.mongodb.com/configure-api-access),\nyou can use it with the digest library like:\n\n```go\nimport (\n    \"context\"\n    \"log\"\n\n    \"github.com/mongodb-forks/digest\"\n    \"go.mongodb.org/atlas/mongodbatlas\"\n)\n\nfunc main() {\n    t := digest.NewTransport(\"your public key\", \"your private key\")\n    tc, err := t.Client()\n    if err != nil {\n        log.Fatalf(err.Error())\n    }\n\n    client := mongodbatlas.NewClient(tc)\n    projects, _, err := client.Projects.GetAllProjects(context.Background(), nil)\n}\n```\n\nNote that when using an authenticated Client, all calls made by the client will\ninclude the specified tokens. Therefore, authenticated clients should\nalmost never be shared between different users.\n\n## Versioning\n\nEach version of the client is tagged and the version is updated accordingly.\n\nTo see the list of past versions, run `git tag`.\n\nTo release a new version, first ensure that [Version](./mongodbatlas/mongodbatlas.go) is updated \n(i.e., before running `git push origin vx.y.z`, verify that `Version=x.y.z` should match the tag being pushed to GitHub)\n\n## Roadmap\n\nThis library is being initially developed for [mongocli](https://github.com/mongodb/mongocli),\n[Atlas Terraform Provider](https://github.com/mongodb/terraform-provider-mongodbatlas), \n[Atlas Vault Plugin](https://github.com/hashicorp/vault-plugin-secrets-mongodbatlas), and \n[Atlas Cloudformation Provider](https://github.com/mongodb/mongodbatlas-cloudformation-resources)\nso API methods will likely be implemented in the order that they are\nneeded by those projects.\n\n## Contributing\n\nSee our [CONTRIBUTING.md](CONTRIBUTING.md) Guide.\n\n## License\n\n`go-client-mongodb-atlas` is released under the Apache 2.0 license. See [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fgo-client-mongodb-atlas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fgo-client-mongodb-atlas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fgo-client-mongodb-atlas/lists"}