Docs Menu
Docs Home
/
MongoDB Ops Manager
/ /

Programmatic Access to Ops Manager

On this page

  • Manage Programmatic Access to an Organization
  • Manage Programmatic Access to a Project

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 Ops 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.

Note

Required Permissions

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

  2. Click Access Manager in the sidebar, or click Access Manager in the navigation bar, then click your organization.

2
3
4

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.
5
6

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 Ops Manager should accept API requests, or

  • Click Use Current IP Address if the host you are using to access Ops Manager will make API requests.

7

Warning

Copy the Private Key Before Leaving this Page

Ops Manager displays the Private Key once: on this page. Click Copy to add the Private Key to the clipboard. Save and secure this Private Key as you would any other password.

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

  2. Click Access Manager in the sidebar, or click Access Manager in the navigation bar, then click your organization.

2
3
  1. Next to the API Key, click .

  2. 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.

You can change the roles, description, or access list of an API Key in an Organization.

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

  2. Click Access Manager in the sidebar, or click Access Manager in the navigation bar, then click your organization.

2
3
  1. Click the next to the API Key you want to change.

  2. Click Edit.

4

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.
5
6

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 Ops Manager should accept API requests, or

  • Click Use Current IP Address if the host you are using to access Ops Manager will make API requests.

7

Warning

Copy the Private Key Before Leaving this Page

Ops Manager displays the Private Key once: on this page. Click Copy to add the Private Key to the clipboard. Save and secure this Private Key as you would any other password.

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

  2. Click Access Manager in the sidebar, or click Access Manager in the navigation bar, then click your organization.

2
3
  1. Click next to the API Key that you want to delete.

  2. Click Delete to confirm that you want to delete this API Key or Cancel to leave the key in the Organization.

Note

Removing an API Key from an Organization also removes that key from any projects to which the key was granted access.

Note

Required Permissions

To perform any of the following actions, you must have either the Project User Admin role.

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it is not already displayed, select your desired project from the Project menu in the navigation bar.

  3. Click Access Manager in the navigation bar, then click your project.

2
3
4

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.
5
6

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 Ops Manager should accept API requests, or

  • Click Use Current IP Address if the host you are using to access Ops Manager will make API requests.

7

Warning

Copy the Private Key Before Leaving this Page

Ops Manager displays the Private Key once: on this page. Click Copy to add the Private Key to the clipboard. Save and secure this Private Key as you would any other password.

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it is not already displayed, select your desired project from the Project menu in the navigation bar.

  3. Click Access Manager in the navigation bar, then click your project.

2
3
  1. Next to the API Key, click .

  2. 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.

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it is not already displayed, select your desired project from the Project menu in the navigation bar.

  3. Click Access Manager in the navigation bar, then click your project.

2
3
  1. Click the next to the API Key you want to change.

  2. Click Edit.

4

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.
5
6

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 Ops Manager should accept API requests, or

  • Click Use Current IP Address if the host you are using to access Ops Manager will make API requests.

7

Warning

Copy the Private Key Before Leaving this Page

Ops Manager displays the Private Key once: on this page. Click Copy to add the Private Key to the clipboard. Save and secure this Private Key as you would any other password.

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it is not already displayed, select your desired project from the Project menu in the navigation bar.

  3. Click Access Manager in the navigation bar, then click your project.

2
3
  1. Click next to the API Key that you want to delete.

  2. Click Delete to confirm that you want to delete this API Key or Cancel to leave the key in the Organization.

Note

Removing an API Key from an Organization also removes that key from any projects to which the key was granted access.

Back

Ops Manager Access