Programmatic Access to Cloud Manager
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
To grant programmatic access to an organization or project using only the API, you can create an API key. API keys:
Have two parts: a Public Key and a Private Key.
Cannot be used to log into Cloud Manager through the user interface.
Must be granted roles as you would Users to make sure the API keys can call API endpoints without errors.
Can belong to one organization, but may be granted access to any number of projects in that organization.
Manage Programmatic Access to an Organization
Note
Required Permissions
To perform any of the following actions, you must have the
Organization Owner
role.
Create an API Key in an Organization
In MongoDB Cloud Manager, go to the Organization Settings page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
Click the Organization Settings icon next to the Organizations menu.
The Organization Settings page displays.
Go to the Organization Access Manager page.
Click Access Manager in the sidebar.
The Organization Access Manager page displays.
Complete the API Key Information form.
From the API Key Information step of the Add API Key page:
Field | Value |
---|---|
Description | Enter a description for the new API Key. |
Organization Permissions | Select the new role or roles for the API Key. |
Add Access List Values for this API Key.
From the Private Key & Access List step of the Add API Key page, click Add Access List Entry.
For this API Key, You can choose to either:
Enter an IPv4 address from which Cloud Manager should accept API requests, or
Click Use Current IP Address if the host you are using to access Cloud Manager will make API requests.
View the Details of an API Key in an Organization
In MongoDB Cloud Manager, go to the Organization Settings page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
Click the Organization Settings icon next to the Organizations menu.
The Organization Settings page displays.
Go to the Organization Access Manager page.
Click Access Manager in the sidebar.
The Organization Access Manager page displays.
Navigate to View Details.
Next to the API Key, click .
Click View Details.
The <Public Key> API Key Details modal displays the:
Obfuscated Private Key.
Date the Key was last used.
Date the Key was created.
IPv4 addresses on which the key is in the access list.
Projects to which the Key has been granted access.
Change an API Key in an Organization
You can change the roles, description, or access list of an API Key in an Organization.
In MongoDB Cloud Manager, go to the Organization Settings page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
Click the Organization Settings icon next to the Organizations menu.
The Organization Settings page displays.
Go to the Organization Access Manager page.
Click Access Manager in the sidebar.
The Organization Access Manager page displays.
Complete the API Key Information form.
From the API Key Information step of the Add API Key page:
Field | Value |
---|---|
Description | Enter a description for the new API Key. |
Organization Permissions | Select the new role or roles for the API Key. |
Add Access List Values for this API Key.
From the Private Key & Access List step of the Add API Key page, click Add Access List Entry.
For this API Key, You can choose to either:
Enter an IPv4 address from which Cloud Manager should accept API requests, or
Click Use Current IP Address if the host you are using to access Cloud Manager will make API requests.
Delete an API Key from an Organization
In MongoDB Cloud Manager, go to the Organization Settings page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
Click the Organization Settings icon next to the Organizations menu.
The Organization Settings page displays.
Go to the Organization Access Manager page.
Click Access Manager in the sidebar.
The Organization Access Manager page displays.
Manage Programmatic Access to a Project
Note
Required Permissions
To perform any of the following actions, you must have either the
Project User Admin
role.
Create an API Key for a Project
In MongoDB Cloud Manager, go to the Project Access Manager page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
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.
Complete the API Key Information form.
From the API Key Information step of the Add API Key page:
Field | Value |
---|---|
Description | Enter a description for the new API Key. |
Project Permissions | Select the new role or roles for the API Key. |
Add Access List Values for this API Key.
From the Private Key & Access List step of the Add API Key page, click Add Access List Entry.
For this API Key, You can choose to either:
Enter an IPv4 address from which Cloud Manager should accept API requests, or
Click Use Current IP Address if the host you are using to access Cloud Manager will make API requests.
View the Details of an API Key in a Project
In MongoDB Cloud Manager, go to the Project Access Manager page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
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.
Navigate to View Details.
Next to the API Key, click .
Click View Details.
The <Public Key> API Key Details modal displays the:
Obfuscated Private Key.
Date the Key was last used.
Date the Key was created.
IPv4 addresses on which the key is in the access list.
Projects to which the Key has been granted access.
Change an API Key's Roles in a Project
In MongoDB Cloud Manager, go to the Project Access Manager page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
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.
Complete the API Key Information form.
From the API Key Information step of the Add API Key page:
Field | Value |
---|---|
Description | Enter a description for the new API Key. |
Project Permissions | Select the new role or roles for the API Key. |
Add Access List Values for this API Key.
From the Private Key & Access List step of the Add API Key page, click Add Access List Entry.
For this API Key, You can choose to either:
Enter an IPv4 address from which Cloud Manager should accept API requests, or
Click Use Current IP Address if the host you are using to access Cloud Manager will make API requests.
Delete an API Key from a Project
In MongoDB Cloud Manager, go to the Project Access Manager page.
If it's not already displayed, select your desired organization from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
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.