- API >
- Public API Resources >
- Groups and Users >
- Whitelist
Whitelist¶
On this page
The whitelist
resource lets you retrieve and update a user’s
whitelist, which controls the user’s
access to whitelisted API operations. Users can issue whitelisted API
operations only from addresses on their own whitelists.
The whitelist
resource’s POST
and DELETE
operations are themselves
whitelisted. They must originate from an address already on the user’s whitelist.
To use the whitelist
resource you must know the ID of the user who owns
the whitelist. To retrieve a user’s ID, see Get All Users in a Group.
You can access whitelist information only for the user issuing the request.
The USER-ID
in the URL must match the ID of the user associated with the
Public API key used to send the request.
Endpoints¶
Get the API Whitelist for the Current User¶
Get the Whitelist Entity for a Specific IP Address¶
The following retrieves the whitelist entry that contains an ipAddress
value that matches IP-ADDRESS
.
This retrieves a whitelist entity if the value of IP-ADDRESS
equals the
value of the entity’s ipAddress
field. This does not retrieve an object
where the value of IP-ADDRESS
is contained within the values allowed by
the cidrBlock
field.
Add Entries to the API Whitelist for the Current User¶
The entity body must be an array of whitelist entities, even if there is
only one. The only field you need to specify for each entity is the
ipAddress
.
If an IP address is already in the whitelist, it will be ignored.
If you specify a single IP address with the /32
subnet mask, Ops Manager does not
store the /32
, as the /32
does not change the address. For example, an
address of 12.34.56.78
is the same as 12.34.56.78/32
.
Delete an Entry from the API Whitelist for the Current User¶
You cannot remove your current IP address from the whitelist.
Sample Entity¶
Entity Fields¶
Name | Type | Description |
---|---|---|
cidrBlock |
string | A CIDR-notated range of IP addresses. Entering 0.0.0.0/0 gives
unrestricted access to whitelisted operations. |
created |
date | The date this IP address was added to the whitelist. |
ipAddress |
string | A whitelisted IP address. |
lastUsed |
date | The date of the most recent request that originated from this IP address. Note that this field is only updated when a resource that is protected by the whitelist is accessed. |
lastUsedAddress |
string | The last call to the API was issued from this address. |
count |
number | The total number of requests that originated from this IP address. Note that this field is only updated when a resource that is protected by the whitelist is accessed. |
Links¶
Relation | Description |
---|---|
self |
Me |
http://mms.mongodb.com/user |
The user that owns this whitelist. |