Navigation
This version of the documentation is archived and no longer supported. It will be removed on EOL_DATE. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.
This version of the manual is no longer supported. It will be removed on EOL_DATE.
  • API >
  • Configure Public API Access

Configure Public API Access

Overview

To access the Public API, you generate a Public API key and optionally configure access for whitelisted operations.

Public API Key

Your Public API key gives you access to the Public API. You have the same level of access through the API as you do through the Ops Manager interface.

You can have up to ten Public API keys associated with your account. Each key can be either enabled or disabled but all count toward the ten-key limit.

Whitelist

Address-based whitelists protect certain API operations. Only client requests that originate from a whitelisted IP address are permitted to perform the operations. If an operation is whitelisted, it is marked as such on its Public API Resources page. To perform whitelisted operations, first create the whitelist of addresses for the operations, as described on this page.

Access Control

Your Ops Manager roles determine which API resources you can use.

Generate Public API Keys

Important

When you generate a key, Ops Manager displays it one time only. You must copy it. Ops Manager will never display the full key again.

A Public API key is like a password. Keep it secret.

1

Go to the Public API Access view.

Click on your user name in the upper-right hand corner and select Account. Then click Public API Access.

2

Generate a new Public API key.

In the API Keys section, click Generate. Then enter a description, such as “API Testing,” and click Generate.

If prompted for a two-factor verification code, enter the code and click Verify. Then click Generate again.

3

Copy and record the key.

Copy the key immediately when it is generated. Ops Manager displays the full key one time only. You will not be able to view the full key again.

Record the key in a secure place. After you have successfully recorded the key, click Close.

Provide Access to Whitelisted Operations

1

Click on your user name in the upper-right hand corner and select Account. Click Public API Access.

2

In the Whitelist, click Add and enter an address.

Enter an IP address or CIDR range. To add multiple entries in the whitelist, repeat this step.

You can enter any of the following:

Entry Grants
An IP address Access to whitelisted operations from that address.
A CIDR-notated range of IP addresses Access to whitelisted operations from those addresses.
0.0.0.0/0 Unrestricted access to whitelisted operations.

If you leave the whitelist empty, you have no access to whitelisted operations.

Delete an Address from the Whitelist

1

Go to your Public API Access view.

Click on your user name in the upper-right hand corner and select Account. Then click Public API Access.

2

In the Whitelist, select the gear icon for the address and select Delete.