Issues with MongoDB Atlas Connectivity and API Endpoint Configuration

I am facing challenges in setting up and connecting my application (which is running in a local Docker container) to MongoDB Atlas. I have detailed my issues below:

  1. Localhost URL with MongoDB Atlas:

    • I added my local Docker URL http://0.0.0.0:9999/NNNNN/mongodb/ to the Data Services section under “add endpoint” in MongoDB Atlas.
    • I encountered an error stating, “Endpoint route can only include letters, underscores, numbers, and /.”
  2. Atlas Administration API:

    • I followed the setup guide for the Atlas Administration API, ensuring my organization API key has the Organization Owner permission and setting up the required environment variables.
    • I am unclear about whether the Atlas Administration API requires specific URL whitelisting for it to function correctly.
  3. MongoDB Driver Operations:

    • My application performs MongoDB operations (like insert, update, find) using the Python MongoDB driver.
    • I am confused about whether I need to whitelist my local Docker container’s IP address in MongoDB Atlas to allow these operations.

Questions:

  1. Can MongoDB Atlas accept a locally hosted URL as an endpoint? If not, what are the recommended workarounds?
  2. Is it necessary to whitelist the URL or IP address that will be calling the MongoDB Atlas API, even if it’s a localhost URL?
  3. Do I need any additional configurations or steps to ensure smooth integration between my local Docker application and MongoDB Atlas, especially for the Atlas Administration API?

Any guidance or solutions to address the above issues would be greatly appreciated.

Hi @Wang_Michael,

Not sure where you are seeing this under Data Services in Atlas - Do you have a screenshot or exact steps to get here? However, in saying so and based off Q3 as well, it sounds like you’re attempting to connect a pymongo application to MongoDB Atlas. If this is the case, what’s the reason for adding this local docker url? Trying to understand the context here.

For your question regarding Atlas accepting a locally hosted URL as an endpoint, is this so that your pymongo driver application hosted in docker can connect? Just trying to clear a few things up here before I’m able to provide a more informative response.

The following Optional: Require an IP Access List for the Atlas Administration API documentation should help you here although I’m not too sure what the relevance of the localhost you mention here.

There is limited information on what the application is trying to achieve or which particular requests from the atlas administration api you’re thinking of utilising so it’s a bit difficult to answer. If you can provide some more context to what you’re attempting to perform / your use case then we can try help further with any suggestions / documentation.

Look forward to hearing from you.

Regards,
Jason