Docs Menu
Docs Home
/
MongoDB Atlas
/ / /

Manage Programmatic Access to a Project

On this page

  • Required Access
  • View the API Keys in a Project
  • Change an API Key's Roles in a Project
  • Edit an API Key's Access List
  • Delete an API Key from a Project

Use the following procedures to manage programmatic access to a project. To learn more, see Grant Programmatic Access to a Project.

To perform any of the following actions, you must have Project Owner access to the project.

To list all API keys for your project using the Atlas CLI, run the following command:

atlas projects apiKeys list [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas projects apiKeys list.

You can view the API access list entries for a project API key using an atlas organizations command.

To list IP access list entries for your API key using the Atlas CLI, run the following command:

atlas organizations apiKeys accessLists list <apiKeyID> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas organizations apiKeys accessLists list.

To view the details of an API key in a project using the Atlas UI:

1
  1. If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. Do one of the following steps:

    • Select Project Access from the Access Manager menu in the navigation bar.

    • Next to the Projects menu, expand the Options menu, click Project Settings, and click Access Manager in the sidebar.

    The Project Access Manager page displays.

2
3
  1. Click to the right of the API Key.

  2. Click View Details.

The <Public Key> API Key Details modal displays the following information:

  • The obfuscated Private Key

  • The date the key was last used

  • The date the key was created

  • The IP address or addresses from which the API key can access the API

1
  1. If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. Do one of the following steps:

    • Select Project Access from the Access Manager menu in the navigation bar.

    • Next to the Projects menu, expand the Options menu, click Project Settings, and click Access Manager in the sidebar.

    The Project Access Manager page displays.

2
3
  1. Click to the right of the API Key.

  2. Click Edit Permissions.

4
5

You can edit the API access list entries for a project API key using atlas organizations commands.

To create an IP access list entry for your API key using the Atlas CLI, run the following command:

atlas organizations apiKeys accessLists create [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas organizations apiKeys accessLists create.

To delete an IP access list entry for your API key using the Atlas CLI, run the following command:

atlas organizations apiKeys accessLists delete <entry> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas organizations apiKeys accessLists delete.

1
  1. If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. Do one of the following steps:

    • Select Project Access from the Access Manager menu in the navigation bar.

    • Next to the Projects menu, expand the Options menu, click Project Settings, and click Access Manager in the sidebar.

    The Project Access Manager page displays.

2
3
  1. Click to the right of the API Key.

  2. Click Edit Permissions.

Note

Selecting Edit Permissions takes you to the organization level of the Atlas console.

4

You cannot modify an existing API Key access list entry. You must delete and re-create it.

  1. Click to the right of the IP address to remove it.

  2. Add the new IP address or CIDR block from which you want Atlas to accept API requests for this API Key. Use one of the two options:

    • Click Add access list Entry and type an IP address, or

    • Click Use Current IP Address if the host you are using to access Atlas will also make API requests using this API Key.

  3. Click Save.

5

To delete an API key for your project using the Atlas CLI, run the following command:

atlas projects apiKeys delete <ID> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas projects apiKeys delete.

To delete an API key from a project using the Atlas UI:

1
  1. If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. Do one of the following steps:

    • Select Project Access from the Access Manager menu in the navigation bar.

    • Next to the Projects menu, expand the Options menu, click Project Settings, and click Access Manager in the sidebar.

    The Project Access Manager page displays.

2
3
4

Back

Multiple Organizations