Skip to main content

MongoDB

MongoDB Atlas is a fully-managed, cloud-based NoSQL database-as-a-service platform available across major cloud providers including Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). This integration provides comprehensive visibility and governance capabilities for MongoDB Atlas deployments, enabling organizations to query, monitor, and manage their database infrastructure, security configurations, access controls, and operational events.

CategoryDatabase
DirectionQuery source
Sign-inAPI Key
Query languagesSQLite
Tables12
Query templates36
Websitemongodb.com

Before you start​

Huntbase signs in to MongoDB with API Key. Create the credential in MongoDB first, then keep it to hand for the Connect step.

  1. In Atlas, select your organization from the Organizations menu, then click Applications under Identity & Access in the sidebar.
  2. Click Add new › API Key and enter a description.
  3. In the Organization Permissions menu, select Organization Read Only, then click Next.
  4. Copy the Public Key and the Private Key. The private key is shown only once, on this page.
  5. If your organization requires an API access list, click Add Access List Entry and add the IP addresses that will call the API. Then click Save and Done.

Permissions:

  • Organization Read Only (ORG_READ_ONLY): read-only access to the organization's settings, users and projects.
Watch out for
  • You need Organization Owner access to create an organization API key.
  • Once an API key has any access list entry, Atlas accepts requests only from the listed addresses.

For the vendor's own instructions, see MongoDB Atlas programmatic access documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect MongoDB​

  1. Go to Connections and click New connection, or click New connection on the MongoDB product page.
  2. On Product, pick MongoDB and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Credentials​

The only Method is API Key. Enter a Credential label (for example Production), then fill in:

FieldRequiredNotes
Public KeyYesSecret — not shown again after you save it.
Private KeyYesSecret — not shown again after you save it.

Query it​

Once connected, MongoDB can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 12 tables listed below, alongside every other connected source.

Example: SQLite​

List all MongoDB Atlas organizations — Retrieve basic information about all MongoDB Atlas organizations, including their unique identifiers and names, to support management and tracking.

select
id,
name
from
mongodbatlas_org;

MongoDB ships with 36 query templates. Find them in Library › Queries — see Query templates.

Tables​

MongoDB adds 12 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 12 tables
TableContains
mongodbatlas_clusterMongoDB Atlas Cluster is a NoSQL Database-as-a-Service offering in the public cloud (available in Microsoft Azure, Google Cloud Platform, Amazon Web Services).
mongodbatlas_containerContainers in a project allows for cloud provider backed virtual private networking - dubbed as container network peering in MongoDB Atlas.
mongodbatlas_custom_db_roleCustom roles supports a subset of MongoDB privilege actions. These are defined at the project level, for all clusters in the project.
mongodbatlas_database_userA database user has access to databases in a mongodb cluster.
mongodbatlas_orgReturns a single record containing the parent org of the project.
mongodbatlas_org_eventOrg Events allows you to list events for the parent organization of the configured project.
mongodbatlas_projectReturns details of the project configured in the connection config.
mongodbatlas_project_eventProject Events allows you to list events for the configured project.
mongodbatlas_project_ip_access_listAtlas only allows client connections to the database deployment from entries in the project's IP access list. Each entry is either a single IP address or a CIDR-notated range of addresses. For AWS clusters with one or more VPC Peering connections to the same AWS region, you can specify a Security Group associated with a peered VPC. The IP access list applies to all database deployments in the project and can have up to 200 IP access list entries, with the following exception: projects with an existing sharded cluster created before August 25, 2017 can have up to 100 IP access list entries.
mongodbatlas_serverless_instanceServerless instances in MongoDB Atlas are instances which are billed on usage, rather than time like in normal clusters.
mongodbatlas_teamTeams enable you to grant project access roles to multiple users. You add any number of organization users to a team.
mongodbatlas_x509_authentication_database_userDatabase Users can authenticate against databases using X.509 certificates. Certificates can be managed by Atlas or can be self-managed.

Next steps​