# MongoDB Atlas

Manage MongoDB Atlas: projects, clusters, database users, network access, backups. Exposes **35 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `mongodbatlas_organizations_list` | List organizations - GET /orgs. |
| `mongodbatlas_organization_get` | Get one organization - GET /orgs/&#123;id&#125;. |
| `mongodbatlas_organization_create` | Create an organization - POST /orgs. |
| `mongodbatlas_organization_update` | Update an organization - PATCH /orgs/&#123;id&#125;. |
| `mongodbatlas_organization_delete` | Delete an organization - DELETE /orgs/&#123;id&#125;. |
| `mongodbatlas_projects_list` | List projects - GET /groups. |
| `mongodbatlas_project_get` | Get one project - GET /groups/&#123;id&#125;. |
| `mongodbatlas_project_create` | Create a project - POST /groups. |
| `mongodbatlas_project_update` | Update a project - PATCH /groups/&#123;id&#125;. |
| `mongodbatlas_project_delete` | Delete a project - DELETE /groups/&#123;id&#125;. |
| `mongodbatlas_clusters_list` | List clusters - GET /groups/&#123;project_id&#125;/clusters. |
| `mongodbatlas_cluster_get` | Get one cluster - GET /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;. |
| `mongodbatlas_cluster_create` | Create a cluster - POST /groups/&#123;project_id&#125;/clusters. |
| `mongodbatlas_cluster_update` | Update a cluster - PATCH /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;. |
| `mongodbatlas_cluster_delete` | Delete a cluster - DELETE /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;. |
| `mongodbatlas_cluster_pause` | Pause a cluster - POST /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;/pause. |
| `mongodbatlas_cluster_resume` | Resume a paused cluster - POST /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;/resume. |
| `mongodbatlas_database_users_list` | List database users - GET /groups/&#123;project_id&#125;/databaseUsers. |
| `mongodbatlas_database_user_get` | Get one database user - GET /groups/&#123;project_id&#125;/databaseUsers/&#123;username&#125;. |
| `mongodbatlas_database_user_create` | Create a database user - POST /groups/&#123;project_id&#125;/databaseUsers. |
| `mongodbatlas_database_user_update` | Update a database user - PATCH /groups/&#123;project_id&#125;/databaseUsers/admin/&#123;username&#125;. |
| `mongodbatlas_database_user_delete` | Delete a database user - DELETE /groups/&#123;project_id&#125;/databaseUsers/admin/&#123;username&#125;. |
| `mongodbatlas_network_access_list` | List IP access list entries - GET /groups/&#123;project_id&#125;/accessList. |
| `mongodbatlas_network_access_get` | Get one IP access list entry - GET /groups/&#123;project_id&#125;/accessList/&#123;ip_address&#125;. |
| `mongodbatlas_network_access_create` | Add an IP to the access list - POST /groups/&#123;project_id&#125;/accessList. |
| `mongodbatlas_network_access_delete` | Remove an IP from the access list - DELETE /groups/&#123;project_id&#125;/accessList/&#123;ip_address&#125;. |
| `mongodbatlas_backups_list` | List backups for a cluster - GET /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;/backups. |
| `mongodbatlas_backup_get` | Get one backup - GET /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;/backups/&#123;backup_id&#125;. |
| `mongodbatlas_restore_jobs_list` | List restore jobs for a cluster - GET /groups/&#123;project_id&#125;/clusters/&#123;cluster_name&#125;/restoreJobs. |
| `mongodbatlas_alerts_list` | List alerts - GET /groups/&#123;project_id&#125;/alerts. |
| `mongodbatlas_alert_get` | Get one alert - GET /groups/&#123;project_id&#125;/alerts/&#123;alert_id&#125;. |
| `mongodbatlas_alert_acknowledge` | Acknowledge an alert - PATCH /groups/&#123;project_id&#125;/alerts/&#123;alert_id&#125;. |
| `mongodbatlas_processes_list` | List processes (hosts) in a project - GET /groups/&#123;group_id&#125;/processes. |
| `mongodbatlas_process_get` | Get one process info - GET /groups/&#123;group_id&#125;/processes/&#123;host_name&#125;. |
| `mongodbatlas_metrics_get` | Get metrics for a process - GET /groups/&#123;group_id&#125;/processes/&#123;host_name&#125;/measurements. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`MONGODBATLAS_PUBLIC_KEY`** - Atlas - Access Manager - API Keys - Public Key. (https://cloud.mongodb.com/)
- **`MONGODBATLAS_PRIVATE_KEY`** - Private key shown when you create the API key.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `MONGODBATLAS_PUBLIC_KEY` | Atlas - Access Manager - API Keys - Public Key. |
| `MONGODBATLAS_PRIVATE_KEY` | Private key shown when you create the API key. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [MongoDB Atlas API documentation](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/)
