atlas api
Public Preview: please provide feedback at <https://feedback.mongodb.com/forums/930808-atlas-cli>: Access all features of the Atlas Administration API by using the Atlas CLI with the syntax: 'atlas api <tag> <operationId>'.
This feature in public preview streamlines script development by letting you interact directly with any Atlas Administration API endpoint by using the Atlas CLI.
For more information on - Atlas Administration API see: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/ - Getting started with the Atlas Administration API: https://www.mongodb.com/docs/atlas/configure-api-access/#std-label-atlas-admin-api-access
This feature in public preview streamlines script development by letting you interact directly with any Atlas Administration API endpoint by using the Atlas CLI.
Syntax
atlas api <tag> <operationId> [options]
Important
Both <tag>
and <operationId>
must be in camelCase.
Arguments
Name | Type | Required | Description |
---|---|---|---|
<tag> | string | true | The category of Atlas Administration API operations in camelCase.
To find and format the tag, check
the API documentation
URL for the endpoint. It appears after For example, in
|
<operationId> | string | true | The identifier of the Atlas Administration API endpoint in camelCase.
To find the operationId, check the
API documentation
URL for the endpoint. It appears after For example, in
|
Subcommand options
Pass in the path and query parameters for the Atlas Administration API endpoint
as flags. For example, if the endpoint is /api/atlas/v2/orgs/{orgId}/invoices/{invoiceId}
,
the Atlas CLI command is:
atlas api <tag> <operationId> --orgId <ORG_ID> --invoiceId <INVOICE_ID>
Note
You usually don't need to specify --orgId
and --projectId
as they are sourced
from your profile. Specify them only if they are not set in your profile.
If applicable to the endpoint, pass in the request body using the --file
option
or standard input (stdin
).
For example:
atlas api clusters create --file cluster-config.json
In addition, the following options are available for all Atlas Administration API endpoints.
Name | Type | Required | Description |
---|---|---|---|
| string | false | Specify the version of the Atlas Administration API
for the command. Defaults to the latest API version or the value you've configured for |
| string | false | Output format. The default is
To determine the supported formats for an endpoint:
|
| string | false | File path to save the output. By default, the result is displayed in the terminal. |
| string | false | File path to the request body content, if required by the operation.
Alternatively, provide input through standard input ( |
| boolean | false | Help for the current command. |
Options
Name | Type | Required | Description |
---|---|---|---|
-h, --help | false | help for api |
Inherited Options
Name | Type | Required | Description |
---|---|---|---|
-P, --profile | string | false | Name of the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. |
Related Commands
atlas api accessTracking - Public Preview: please provide feedback at: Returns access logs for authentication attempts made to Atlas database deployments.
atlas api alertConfigurations - Public Preview: please provide feedback at: Returns and edits the conditions that trigger alerts and how MongoDB Cloud notifies users.
atlas api alerts - Public Preview: please provide feedback at: Returns and acknowledges alerts that MongoDB Cloud triggers based on the alert conditions that you define.
atlas api atlasSearch - Public Preview: please provide feedback at: Returns, adds, edits, and removes Atlas Search indexes for the specified cluster.
atlas api auditing - Public Preview: please provide feedback at: Returns and edits database auditing settings for MongoDB Cloud projects.
atlas api awsClustersDns - Public Preview: please provide feedback at: Returns and edits custom DNS configurations for MongoDB Cloud database deployments on AWS.
atlas api cloudBackups - Public Preview: please provide feedback at: Manages Cloud Backup snapshots, snapshot export buckets, restore jobs, and schedules.
atlas api cloudMigrationService - Public Preview: please provide feedback at: Manages the Cloud Migration Service.
atlas api cloudProviderAccess - Public Preview: please provide feedback at: Returns, adds, authorizes, and removes AWS IAM roles in Atlas.
atlas api clusterOutageSimulation - Public Preview: please provide feedback at: Returns, starts, or ends a cluster outage simulation.
atlas api clusters - Public Preview: please provide feedback at: Returns, adds, edits, and removes database deployments.
atlas api collectionLevelMetrics - Public Preview: please provide feedback at: Returns, adds, and edits pinned namespaces for the specified cluster or process.
atlas api customDatabaseRoles - Public Preview: please provide feedback at: Returns, adds, edits, and removes custom database user privilege roles.
atlas api dataFederation - Public Preview: please provide feedback at: Returns, adds, edits, and removes Federated Database Instances.
atlas api dataLakePipelines - Public Preview: please provide feedback at: Returns, edits, and removes Atlas Data Lake Pipelines and associated runs.
atlas api databaseUsers - Public Preview: please provide feedback at: Returns, adds, edits, and removes database users.
atlas api encryptionAtRestUsingCustomerKeyManagement - Public Preview: please provide feedback at: Returns and edits the Encryption at Rest using Customer Key Management configuration.
atlas api events - Public Preview: please provide feedback at: Returns events.
atlas api federatedAuthentication - Public Preview: please provide feedback at: Returns, adds, edits, and removes federation-related features such as role mappings and connected organization configurations.
atlas api flexClusters - Public Preview: please provide feedback at: Returns, adds, edits, and removes flex clusters.
atlas api flexRestoreJobs - Public Preview: please provide feedback at: Returns and adds restore jobs for flex database deployments.
atlas api flexSnapshots - Public Preview: please provide feedback at: Returns and requests to download flex database deployment snapshots.
atlas api globalClusters - Public Preview: please provide feedback at: Returns, adds, and removes Global Cluster managed namespaces and custom zone mappings.
atlas api invoices - Public Preview: please provide feedback at: Returns invoices.
atlas api ldapConfiguration - Public Preview: please provide feedback at: Returns, edits, verifies, and removes LDAP configurations.
atlas api legacyBackup - Public Preview: please provide feedback at: Manages Legacy Backup snapshots, restore jobs, schedules and checkpoints.
atlas api maintenanceWindows - Public Preview: please provide feedback at: Returns, edits, and removes maintenance windows.
atlas api mongoDbCloudUsers - Public Preview: please provide feedback at: Returns, adds, and edits MongoDB Cloud users.
atlas api monitoringAndLogs - Public Preview: please provide feedback at: Returns database deployment monitoring and logging data.
atlas api networkPeering - Public Preview: please provide feedback at: Returns, adds, edits, and removes network peering containers and peering connections.
atlas api onlineArchive - Public Preview: please provide feedback at: Returns, adds, edits, or removes an online archive.
atlas api organizations - Public Preview: please provide feedback at: Returns, adds, and edits organizational units in MongoDB Cloud.
atlas api performanceAdvisor - Public Preview: please provide feedback at: Returns suggested indexes and slow query data for a database deployment.
atlas api privateEndpointServices - Public Preview: please provide feedback at: Returns, adds, edits, and removes private endpoint services.
atlas api programmaticApiKeys - Public Preview: please provide feedback at: Returns, adds, edits, and removes access tokens to use the MongoDB Cloud API.
atlas api projectIpAccessList - Public Preview: please provide feedback at: Returns, adds, edits, and removes network access limits to database deployments in Atlas.
atlas api projects - Public Preview: please provide feedback at: Returns, adds, and edits collections of clusters and users in MongoDB Cloud.
atlas api pushBasedLogExport - Public Preview: please provide feedback at: You can continually push logs from mongod, mongos, and audit logs to an AWS S3 bucket.
atlas api resourcePolicies - Public Preview: please provide feedback at: Configure and manage Atlas Resource Policies within your organization.
atlas api rollingIndex - Public Preview: please provide feedback at: Creates one index to a database deployment in a rolling manner.
atlas api root - Public Preview: please provide feedback at: Returns details that describe the MongoDB Cloud build and the access token that requests this resource.
atlas api serverlessInstances - Public Preview: please provide feedback at: Returns, adds, edits, and removes serverless instances.
atlas api serverlessPrivateEndpoints - Public Preview: please provide feedback at: Returns, adds, edits, and removes private endpoints for serverless instances.
atlas api serviceAccounts - Public Preview: please provide feedback at: Endpoints for managing Service Accounts and secrets.
atlas api sharedTierRestoreJobs - Public Preview: please provide feedback at: Returns and adds restore jobs for shared-tier database deployments.
atlas api sharedTierSnapshots - Public Preview: please provide feedback at: Returns and requests to download shared-tier database deployment snapshots.
atlas api streams - Public Preview: please provide feedback at: Returns, adds, edits, and removes Streams Instances.
atlas api teams - Public Preview: please provide feedback at: Returns, adds, edits, or removes teams.
atlas api thirdPartyIntegrations - Public Preview: please provide feedback at: Returns, adds, edits, and removes third-party service integration configurations.
atlas api x509Authentication - Public Preview: please provide feedback at: Returns, edits, and removes user-managed X.509 configurations.