Removing entries from IP Access List using the Atlas Admin API returns 405 error

Hi there,

I’m trying to delete IP addresses from a project’s IP access list programmatically using the Admin Atlas API called with powershell, but I’m getting a 405 Method Not Allowed response. The docs here MongoDB Atlas Administration API state that the API key used for authentication requires the ‘Project Atlas Admin’ role. This role doesn’t appear as an option when I set up keys via the UI. I’ve tried with API keys which have the highest available permissions available to me (Project Owner, Organization Owner), but still get the same error.

We’re using an older version of Atlas, 4.4.18, if that’s likely to be relevant. Not that get and post calls to the API are working fine.

Any idea how I get round this?
Many thanks,
Kiera

Hello @Kiera_Jones ,

Welcome to The MongoDB Community Forums! :wave:

To understand your use-case better, could you please share below details:

  • Is this the exact and full error message you are getting?
  • Had this previously worked for you in the past and is the error still occurring?
  • Please share the request details and API endpoint you are using to removing the IP from the Network Access List.

Note: Please redact any credentials and sensitive information before sharing any details.

Please go through API error document for more information around HTTP code - 405.

Regards,
Tarun

Hi Tarun,

Many thanks for your reply. Oddly, checking again this morning it now works, which is slightly baffling but nonetheless good!

Thanks :slight_smile:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.