The real power of a cloud-hosted, fully managed service like [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) is that you can create whole new database deployment architectures automatically, using the services API. Getting to the [MongoDB Atlas API](https://docs.atlas.mongodb.com/api/) is relatively simple and, once unlocked, it opens up a massive opportunity to integrate and automate the management of database deployments from creation to deletion. The API itself is an extensive REST API, there's role-based access control and you can have [user or app-specific credentials](https://docs.atlas.mongodb.com/configure-api-access/) to access it.
There is one tiny thing that can trip people up though. The credentials have to be passed over using the digest authentication mechanism, not the more common basic authentication or using an issued token. Digest authentication, at its simplest, waits to get an HTTP 401 (not authorized) from the web endpoint. That response comes with data and the client then sends an encrypted form of the username and password as a digest and the server works with that.
↧