Articles in this section
Category / Section

How to Connect to MongoDB Atlas via REST API?

Published:

Connecting MongoDB Atlas as a live data source using Bold BI’s generic Web API connector is a simple process. Follow the steps below to connect MongoDB Atlas using the Generic web API connector.

Prerequisites

  • MongoDB Atlas account
  • Bold BI account

Steps to Connect MongoDB Atlas

  1. Log in to your MongoDB Atlas account and copy the endpoint URL in the Data API section.

    image.png

  2. Obtain your API key in the API keys section.

  3. In Bold BI, choose Generic Web Connector and make a POST API request with the following details:

    • URL: https://<<:Yourdomain>>/app/data-mawaw/endpoint/data/v1/action/find
    • Method: POST
    • Request Body: Raw
    • Raw body:
    • Mode: Live (for live connection)
{
  "dataSource": "<your data source>",
  "database": "<your database>",
  "collection": "<your collection>"
}

Limitations

There are a few limitations when using the REST API over the client library connection:

  1. The REST API option is only available for MongoDB Atlas servers and not for MongoDB hosted in local or any other servers. Refer here
  2. The Data API limits request traffic to 10,000 concurrent requests. Refer here
  3. Multiple collections (tables) cannot be connected at once and will need to be created as separate data sources.
  4. Operations called through a Data API endpoint take longer to complete than the corresponding MongoDB operations called through a driver, i.e., the MongoDB connector in Bold BI. Refer here

Alternative Options

You can also connect MongoDB as a live connection via ODBC and CData connectors. Refer here

Related Links

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Siranjeevi Murugan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied