[Solved] BUG Report MongoDB Administration API / Delete IAM Role database user


we encountered a bug in the MongoDB Administration API with the endpoint: https://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/databaseUsers/{databaseName}/{username}

For us this happened when deleting IAM ROLE users.

We imported the official OpenAPI spec into Postman (MongoDB Atlas Administration API). In Postman we created and deleted IAM role based database users. While creating database user works fine, deleting a database user (that for sure exists and can be found and deleted through the Atlas UI), always returns a 404 error: "“Cannot find resource /api/atlas/v1.0/groups/GROUP_ID_MASKED/databaseUsers/$external/arn:aws:iam::AWS_ACCOUNT_MASKED:role/development-mongo-full-read-write-access.”

You can see from the error message, that the resource identifier matches exactly the API documentation. Therefore we deem this to be a bug.

Okay, this is not a bug in the API itself, but problematic documentation.

In the deprecated docs, it shows that you must url-encode the / in AWS arns. This piece is missing from the new API docs. In the new API docs, in the examples, ARNs are not url encoded…

1 Like

Thanks for providing these details. I’ll take a look and make an internal ticket accordingly.