{"id":19792765,"url":"https://github.com/devpro/mongodb-atlas-dotnet-client","last_synced_at":"2025-09-18T01:32:26.123Z","repository":{"id":40005735,"uuid":"236590332","full_name":"devpro/mongodb-atlas-dotnet-client","owner":"devpro","description":".NET Core client for MongoDB Atlas, the Database-as-a-Service to manage MongoDB clusters!","archived":false,"fork":false,"pushed_at":"2023-02-22T04:16:15.000Z","size":84,"stargazers_count":2,"open_issues_count":18,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T07:07:53.628Z","etag":null,"topics":["api-client","dotnet-cli","dotnet-core","mongodb","mongodb-atlas"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/devpro.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":"2020-01-27T20:42:50.000Z","updated_at":"2023-04-20T05:49:00.000Z","dependencies_parsed_at":"2023-02-10T07:35:11.122Z","dependency_job_id":null,"html_url":"https://github.com/devpro/mongodb-atlas-dotnet-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/devpro%2Fmongodb-atlas-dotnet-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fmongodb-atlas-dotnet-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fmongodb-atlas-dotnet-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fmongodb-atlas-dotnet-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpro","download_url":"https://codeload.github.com/devpro/mongodb-atlas-dotnet-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233439511,"owners_count":18676478,"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","dotnet-cli","dotnet-core","mongodb","mongodb-atlas"],"created_at":"2024-11-12T07:07:55.089Z","updated_at":"2025-09-18T01:32:20.835Z","avatar_url":"https://github.com/devpro.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# MongoDB Atlas .NET Client\n\n[![Build Status](https://dev.azure.com/devprofr/open-source/_apis/build/status/mongodb-atlas-dotnet-client-ci?branchName=master)](https://dev.azure.com/devprofr/open-source/_build/latest?definitionId=22\u0026branchName=master)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=devpro.mongodb-atlas-dotnet-client\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=devpro.mongodb-atlas-dotnet-client)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=devpro.mongodb-atlas-dotnet-client\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=devpro.mongodb-atlas-dotnet-client)\n[![Nuget](https://img.shields.io/nuget/v/mdbatlas.svg)](https://www.nuget.org/packages/mdbatlas)\n\nMongoDB Atlas API client, written in C#, working with .NET Core.\n\nThis is particularly interesting in order to automate your Cloud infrastructure (from a pipeline for instance).\n\nExamples:\n\n```bash\n# List your organizations\nmdbatlas list orgs\n\n# get your first project id\nmdbatlas list projects --query id\n\n# get last events\nmdbatlas list events -p \u003cprojectid\u003e\n\n# display IP while list\nmdbatlas list whitelist -p \u003cprojectid\u003e\n```\n\n## User manual\n\n### How to install\n\nAs a requirement, you only have to install the latest [.NET Core CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x) (open source tool with a minimized footprint).\n\nAs a .NET global tool, `mdbatlas` is installed from the NuGet package:\n\n```bash\ndotnet tool install --global mdbatlas\n```\n\n### How to configure\n\nAn API key must be created in MongoDB Atlas. If you're not familier with it, the instructions are given in the page [Configure Atlas API Access](https://docs.atlas.mongodb.com/configure-api-access/).\n\nThis action should provide you with the public key and the private key.\n\n:warning: Make sure your IP is in the Api key white list!\n\n* Use the tool `config` action\n\n```bash\nmdbatlas config --publickey \u003cpublickey\u003e --privatekey \u003cprivatekey\u003e\n```\n\n* (alternative) Set environment variables\n\n```dos\nSET mdbatlas__PublicKey=\u003cpublickey\u003e\nSET mdbatlas__PrivateKey=\u003cprivatekey\u003e\n```\n\n### How to use\n\n#### Quick start\n\n```bash\n# display tool version\nmdbatlas --version\n\n# display help\nmdbatlas --help\n\n# configure\nmdbatlas config --publickey mypublickey --privatekey mysecretprivatekey\n\n# list all the organizations your account have access to\nmdbatlas list orgs\n```\n\n#### Examples\n\n```bash\n# get the first project id\nmdbatlas list projects --query id\n\n# list recents events for a given project\nmdbatlas list events --project myprojectid\n\n# list all IP whitelist record for a given project\nmdbatlas list whitelist --project myprojectid\n\n# add entries to IP whitelist for a given project (will only add the ones not already defined)\nmdbatlas edit whitelist --project myprojectid --values \"W.X.Y.Z:My first IP comment,A.B.C.D:Second ip comment\"\n\n# delete specific entries in the IP whitelist of a given project\nmdbatlas delete whitelist --project myprojectid --values --values \"W.X.Y.Z,A.B.C.D\"\n```\n\n### How to uninstall\n\nThe tool can be easily uninstalled with:\n\n```bash\ndotnet tool uninstall -g mdbatlas\n```\n\n## Contribue\n\n### Requirements\n\n* [.NET Core SDK](https://dotnet.microsoft.com/download) must be installed\n\n### Local project debug\n\n```bash\n# build the .NET solution\ndotnet build\n\n# run the console app\ndotnet src/ConsoleApp/bin/Debug/netcoreapp3.1/mdbatlas.dll --help\n```\n\n### Local installation\n\n```bash\n# pack the projects\ndotnet pack\n\n# install from local package\ndotnet tool update -g mdbatlas --add-source=src/ConsoleApp/nupkg --version 1.1.0-alpha-000000\n\n# run the tool\nmdbatlas list orgs\n\n# uninstall the tool\ndotnet tool uninstall -g mdbatlas\n```\n\n## References\n\n### Microsoft documentation\n\n* [Create a .NET Core Global Tool using the .NET Core CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-create)\n* [NuGet pack and restore as MSBuild targets](https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets)\n\n### MongoDB documentation\n\n* [API](https://docs.atlas.mongodb.com/api/)\n  * [API Resources](https://docs.atlas.mongodb.com/reference/api-resources/)\n\n### MongoDB Atlas API features\n\nThis table presents all the resources provided by MongoDB Atlas API with the status of their integration in the client (:heavy_check_mark: = implemented).\n\nResource | Method\n-------- | ------\nEvent | FindAllByOrganizationId, FindOneByIdAndProjectId, FindAllByProjectId:heavy_check_mark:, FindOneByIdAndProjectId\nOrganization | FindAll:heavy_check_mark:, FindOneById, FindAllOrganizationUsers, FindAllOrganizationProjects, Rename, Delete\nProject | FindAll:heavy_check_mark:, FindOneById, FindOneByName:heavy_check_mark:, Create, Delete, GetProjectTeams, AssignTeamToProject, DeleteUserFromProject\nProject IP Whitelist | FindAllByProjectId:heavy_check_mark:, FindOneByIdAndProjectId, Create:heavy_check_mark:, Delete\nRoot |\nDatabase Users |\nCustom MongoDB Roles |\nInvoices |\nTeams |\nClusters |\nGlobal Clusters |\nAlerts |\nAlert Configurations |\nMaintenance Windows |\nLDAP Configuration |\nFull Text Search |\nContinuous Backup Snapshots |\nContinuous Backup Snapshot Schedule |\nContinuous Backup Restore Job |\nCloud Provider and On-demand Snapshots |\nCloud Provider Snapshot Restore Job |\nCloud Provider Snapshot Backup Policy |\nM2/M5 Snapshots |\nM2/M5 Snapshot Restore Jobs |\nCheckpoints |\nNetwork Peering |\nPrivate Endpoints |\nPersonal API Key Whitelist |\nProgrammatic API Keys |\nMonitoring and Logs |\nPerformance Advisor |\nAuditing |\nEncryption at Rest |\nAtlas Users |\nEvents | FindAllByProjectId:heavy_check_mark:\nAccess Tracking |\nData Lakes |\n\n### MongoDB Atlas clients in other languages\n\n* Go\n  * [akshaykarle/go-mongodbatlas](https://github.com/akshaykarle/go-mongodbatlas)\n  * [mongodb/go-client-mongodb-atlas](https://github.com/mongodb/go-client-mongodb-atlas)\n* Node.js\n  * [montumodi/mongodb-atlas-api-client](https://github.com/montumodi/mongodb-atlas-api-client)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fmongodb-atlas-dotnet-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpro%2Fmongodb-atlas-dotnet-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fmongodb-atlas-dotnet-client/lists"}