Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
mongodb-atlas-api-client
Advanced tools
A mongdb atlas api client for nodejs.
npm install mongodb-atlas-api-client
The basic syntax is
Atlas API uses HTTP Digest Authentication. It essentially requires a username and a password which are hashed using a unique server-generated value called a nonce. The username is the API public key and the password is the corresponding private key. It internally uses urllib
const getClient = require("mongodb-atlas-api-client");
const {user, cluster} = getClient({
"publicKey": "some public key",
"privateKey": "some private key",
"baseUrl": "https://cloud.mongodb.com/api/atlas/v1.0",
"projectId": "some project/group id"
});
const options = {
"envelope": true,
"itemsPerPage": 10,
"pretty": true,
"httpOptions": { // This parameter will not be sent as querystring. This will be send to http request package `urllib`
"timeout": 5000
}
}
const response = await user.getAll(options); // get All users
const response = await cluster.get("someClusterName"); // get single cluster
const response = await user.delete("someUserName", options); // delete single user
const response = await user.create(body, options); // create user
const response = await user.update("someUserName", body, options); // update user
npm test
Following entities are currently supported
Promise
Function - Returns the details of user name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
username | String | name of the user for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib. |
More details - https://docs.atlas.mongodb.com/reference/api/database-users-get-single-user/
Promise
Function - Returns all the users. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/database-users-get-all-users/
Promise
Function - Creates the user as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for user which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/database-users-create-a-user/
Promise
Function - Updates the user for the username passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
username | String | name of the user for which details needs to be updated | |
body | Object | Body which has details for user which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/database-users-update-a-user/
Promise
Function - Deletes the user name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
username | String | name of the user which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/database-users-delete-a-user/
Promise
Function - Returns the details of the specified snapshotId.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be retrieved | |
snapshotId | String | Id of the snapshot for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v1/#tag/Cloud-Backups/operation/getReplicaSetBackup
Promise
Function - Returns the details of all snapshots of an specified clustername.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v1/#tag/Cloud-Backups/operation/listReplicaSetBackups
Promise
Function - Returns the details of all snapshots of an specified clustername.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be retrieved | |
restoreJobId | String | snapshot restore job id for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v1/#tag/Cloud-Backups/operation/getBackupRestoreJob
Promise
Function - Returns the details of all snapshots of an specified clustername.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be retrieved | |
body | Object | Body which has details for snapshot restore job which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v1/#tag/Cloud-Backups/operation/createBackupRestoreJob
Promise
Function - Returns the details of cluster name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-get-one/
Promise
Function - Returns all the clusters. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-get-all/
Promise
Function - Returns the advance configuration of cluster name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which advance configuration needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-get-advanced-configuration-options/
Promise
Function - Creates the cluster as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for cluster which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-create-one/
Promise
Function - Updates the cluster for the clustername passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which details needs to be updated | |
body | Object | Body which has details for cluster which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-modify-one/
Promise
Function - Updates the advance configuration of cluster for the clustername passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which advance configuration needs to be updated | |
body | Object | Body which has details for cluster which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-modify-advanced-configuration-options/
Promise
Function - Tests failure of primary replica set member.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster for which failure needs to be tested | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-test-failover/
Promise
Function - Deletes the cluster name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clustername | String | name of the cluster which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/clusters-delete-one/
Promise
Function - Returns the details of role name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
rolename | String | name of the role for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/custom-roles-get-single-role/
Promise
Function - Returns all the roles. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/custom-roles-get-all-roles/
Promise
Function - Creates the role as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for role which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/custom-roles-create-a-role/
Promise
Function - Updates the role for the rolename passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
rolename | String | name of the role for which details needs to be updated | |
body | Object | Body which has details for role which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/custom-roles-update-a-role/
Promise
Function - Deletes the role name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
rolename | String | name of the role which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/custom-roles-delete-a-role/
Promise
Function - Returns the details of whitelistentry name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
whitelistentry | String | name of the whitelistentry for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/whitelist-get-one-entry/
Promise
Function - Returns all the whitelistentries. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/whitelist-get-all/
Promise
Function - Creates the whitelistentry as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for whitelistentry which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/whitelist-add-one/
Promise
Function - Updates the whitelistentry passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for whitelistentry which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/whitelist-update-one/
Promise
Function - Deletes the whitelistentry name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
whitelistentry | String | name of the whitelistentry which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/whitelist-delete-one/
Promise
Function - Returns the details of accesslistentry name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
accesslistentry | String | name of the accesslistentry for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/ip-access-list/get-one-access-list-entry/
Promise
Function - Returns all the accesslistentries. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/ip-access-list/get-all-access-list-entries/
Promise
Function - Creates the accesslistentry as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for accesslistentry which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
Promise
Function - Updates the accesslistentry passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for accesslistentry which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
Promise
Function - Deletes the accesslistentry name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
accesslistentry | String | name of the accesslistentry which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/ip-access-list/delete-one-access-list-entry/
Promise
Function - Returns the details of project id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
projectId | String | project id for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-get-one/
Promise
Function - Returns the details of project name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
projectId | String | project name for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-get-one-by-name/
Promise
Function - Returns the teams of project id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
projectId | String | project id for which teams needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-get-teams/
Promise
Function - Returns all the projects. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-get-all/
Promise
Function - Creates the project as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for project which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-create-one/
Promise
Function - Assigns the teams for the projectId passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
projectId | String | Id of the project for which teams needs to be associated | |
body | Object | Body which has details for teams which needs to be associated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-add-team/
Promise
Function - Deletes the project id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
projectId | String | Id of the project which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-delete-one/
Promise
Function - Removes the user id passed from the project.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
userId | String | Id of the user which needs to be removed from project | |
projectId | String | Id of the project | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/project-remove-user/
Promise
Function - Returns the details of organization id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | org§ id for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-get-one/
Promise
Function - Returns all the users for organization id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | organization id for which users needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-users-get-all-users/
Promise
Function - Returns all the projects for organization id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | organization id for which projects needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-get-all-projects/
Promise
Function - Returns all the organizations. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-get-all/
Promise
Function - Renames the organization
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | Id of the organization for which needs to be renamed | |
body | Object | Body which has details for organization which needs to be renamed | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-rename/
Promise
Function - Sends an invitation to the given email (username) to join the Organization
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | Id of the organization for which needs to be renamed | |
body | Object | Organization invitation details | |
body.roles | string[] | Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. | |
body.teamIds | string[] | (Optional) Unique 24-hexadecimal digit strings that identify the teams that you invite the user to join. | |
body.username | string | Email address of the invited user. This is the address to which Atlas sends the invite. | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-create-one-invitation/
Promise
Function - Deletes the project id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | Id of the organization which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/organization-delete-one/
Promise
Function - Returns the details of user id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
userId | String | Id of the user for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/user-get-by-id/
Promise
Function - Returns the details of user name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
username | String | Name of the user for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/user-get-one-by-name/
Promise
Function - Returns all the users. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/user-get-all/
Promise
Function - Creates the atlas user as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for atlas user which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/user-create/
Promise
Function - Updates the user for the userId passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
userId | String | Id of the user for which details needs to be updated | |
body | Object | Body which has details for user which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/user-update/
Promise
Function - Returns the details of event id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
eventId | String | id of the event for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/events-projects-get-one/
Promise
Function - Returns all the events. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/events-projects-get-all/
Promise
Function - Returns the details of event id passed for organization id.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | id of the organization for which details needs to be retrieved | |
eventId | String | id of the event for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/events-orgs-get-one/
Promise
Function - Returns all the events. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
organizationId | String | id of the organization for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/events-orgs-get-all/
Promise
Function - Returns the details of alert id passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
alertId | String | id of the alert for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/alerts-get-alert/
Promise
Function - Returns all the alerts. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/alerts-get-all-alerts/
Promise
Function - Acknowledge or unacknowledge an alert
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
alertId | String | id of the alert which needs to be acknowledged | |
body | Object | Body which has details for alert which needs to be acknowledged | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/alerts-acknowledge-alert/
Promise
Function - Returns the details of dataLake name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
dataLakeName | String | name of the dataLake for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-get-one-tenant/
Promise
Function - Returns all the dataLakes. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-get-all-tenants/
Promise
Function - Returns the dataLake logs stream.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
dataLakeName | String | name of the dataLake for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-download-query-logs/
Promise
Function - Creates the dataLake as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for dataLake which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-create-one-tenant/
Promise
Function - Updates the dataLake for the username passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
dataLakeName | String | name of the dataLake for which details needs to be retrieved | |
body | Object | Body which has details for dataLake which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-update-one-tenant/
Promise
Function - Deletes the dataLake name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
dataLakeName | String | name of the datalake which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.mongodb.com/datalake/reference/api/dataLakes-delete-one-tenant/
Promise
Function - Returns all the cloudProviderAccess. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/cloud-provider-access-get-roles/
Promise
Function - Creates the cloudProviderAccess as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
body | Object | Body which has details for cloudProviderAccess which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/cloud-provider-access-create-one-role/
Promise
Function - Updates the cloudProviderAccess for the roleId passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
roleId | String | roleId of the cloudProviderAccess for which details needs to be updated | |
body | Object | Body which has details for dataLake which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/cloud-provider-access-authorize-one-role/
Promise
Function - Deletes the cloudProviderAccess name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
roleId | String | roleId of the cloudProviderAccess which needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/cloud-provider-access-deauthorize-one-role/
Promise
Function - Returns the details of atlas search index by cluster name and index passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be retrieved | |
indexId | String | id of the index for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-indexes-get-one/
Promise
Function - Returns all the atlas search indexes. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be retrieved | |
databaseName | String | name of the database for which details needs to be retrieved | |
collectionName | String | name of the collection for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-indexes-get-all/
Promise
Function - Returns all the Analyzers. Pagination can be controlled via options object.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be retrieved | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-analyzers-get-all/
Promise
Function - Creates the atlas search index as per body passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be retrieved | |
body | Object | Body which has details for cluster which needs to be created | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-indexes-create-one/
Promise
Function - Updates the atlas search index for the clusterName passed. It only updates the properties passed in body.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be updated | |
indexId | String | name of the index for which details needs to be updated | |
body | Object | Body which has details for cluster which needs to be updated | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-indexes-update-one/
Promise
Function - Upserts the analyser for the clusterName passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster for which details needs to be upserted | |
body | Object | Body which has details for cluster which needs to be upserted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-analyzers-update-all/
Promise
Function - Deletes the atlas search index by cluster name passed.
Returns: Promise
- - promise which resolves on success and rejects on error
Param | Type | Default | Description |
---|---|---|---|
clusterName | String | name of the cluster which needs to be deleted | |
indexId | String | name of the index for which details needs to be deleted | |
[options] | Object | {} | Optional object containing extra query strings which will be passed to atlas api. It can also include httpOptions which will be sent to urllib . More info can be found here - https://github.com/node-modules/urllib |
More details - https://docs.atlas.mongodb.com/reference/api/fts-indexes-delete-one/
FAQs
A mongodb atlas api client for nodejs.
The npm package mongodb-atlas-api-client receives a total of 11,985 weekly downloads. As such, mongodb-atlas-api-client popularity was classified as popular.
We found that mongodb-atlas-api-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.