Create Access List Entries for One Organization API Key¶
Create one or more new access list entries for the specified API Key.
All requests to this endpoint must originate from an IP address in the organization's API access list.
Resource¶
Base URL: https://cloud.mongodb.com/api/atlas/v1.0
POST /orgs/{ORG-ID}/apiKeys/{API-KEY-ID}/accessList
Request Path Parameters¶
Name | Type | Necessity | Description |
---|---|---|---|
ORG-ID | string | Required | Unique identifier for the organization
to which the target API Key belongs. Use the
/orgs endpoint
to retrieve all organizations to which the authenticated
user has access. |
API-KEY-ID | string | Required | Unique identifier for the Organization API Key for which you
want to create a new access list entry. |
Request Query Parameters¶
This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.
Name | Type | Necessity | Description | Default |
---|---|---|---|---|
pageNum | integer | Optional | Page number, starting with one, that Atlas returns of the
total number of objects. | 1 |
itemsPerPage | integer | Optional | Number of items that Atlas returns per page, up to a maximum
of 500. | 100 |
includeCount | boolean | Optional | Flag that indicates whether Atlas returns the totalCount
parameter in the response body. | true |
pretty | boolean | Optional | Flag that indicates whether Atlas returns the JSON
response in the
prettyprint format. | false |
envelope | boolean | Optional | Flag that indicates whether Atlas wraps the response in an envelope. Some API clients cannot access the HTTP response headers or
status code. To remediate this, set Endpoints that return a list of results use the results object as an envelope. Atlas adds the status parameter to the response body. | false |
Request Body Parameters¶
Specify an array of documents, where each document represents one access list entry you want to add to the project. You must specify an array even if you are only associating a single access list entry to the project.
When you submit a POST
request containing ipAddress or
cidrBlock values which are not already present in the access list,
Atlas adds those entries to the list of existing entries in the
access list. Atlas does not set the access list to only contain the
entries specified in the request.
Atlas supports up to 500 API keys within a single organization.
In the following table, [i]
represents an array index.
Name | Type | Necessity | Description |
---|---|---|---|
[i].ipAddress | string | Required | IP address to be added to the access list for the API key. Set
this parameter or cidrBlock, not both. |
[i].cidrBlock | string | Required | CIDR |