# @mhoc/mongodb-atlas

> a very basic and incomplete wrapper around the mongodb atlas api

Latest version **0.0.13** (published 2022-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mhoc/mongodb-atlas
pnpm add @mhoc/mongodb-atlas
yarn add @mhoc/mongodb-atlas
bun add @mhoc/mongodb-atlas
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2022-04-27 |
| First published | 2020-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 99 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mike Hockerman |
| Maintainers | mhoc |

## Links

- npm: https://www.npmjs.com/package/@mhoc/mongodb-atlas
- Repository: https://github.com/mhoc/mongodb-atlas-ts
- Homepage: https://github.com/mhoc/mongodb-atlas-ts#readme
- Issues: https://github.com/mhoc/mongodb-atlas-ts/issues
- npm.io page: https://npm.io/package/@mhoc/mongodb-atlas

## Dependencies (4)

- [fp-ts](https://npm.io/package/fp-ts.md) 2.12.0
- [io-ts](https://npm.io/package/io-ts.md) 2.2.16
- [io-ts-reporters](https://npm.io/package/io-ts-reporters.md) 2.0.1
- [@mhoc/axios-digest-auth](https://npm.io/package/@mhoc/axios-digest-auth.md) 0.8.0

## Recent versions

- 0.0.13 (latest) — 2022-04-27
- 0.0.12 — 2021-10-18
- 0.0.11 — 2021-07-28
- 0.0.10 — 2021-02-15
- 0.0.9 — 2020-12-22
- 0.0.8 — 2020-12-22
- 0.0.7 — 2020-12-22
- 0.0.6 — 2020-12-21
- 0.0.5 — 2020-12-21
- 0.0.4 — 2020-12-21
- 0.0.3 — 2020-12-21
- 0.0.1 — 2020-12-18

## README

# `@mhoc/mongodb-atlas`

This is a type-safe API wrapper around the [MongoDB Atlas API](https://docs.atlas.mongodb.com/api) for NodeJS.

## Disclaimers & Limitations

- Mongo, MongoDB, and Atlas are registered trademarks of MongoDB, Inc. This project is not affiliated with them in any way.

- This library **is not** for querying data in a Mongo database; its for accessing deployed clusters and associated resources on [MongoDB's Atlas service](https://www.mongodb.com/cloud/atlas).

- This is very pre-release, not well tested, the API could change at any time, and its missing a lot of functionality.

- Use at your own risk.

## Installing

```
npm i @mhoc/mongodb-atlas
```

## Usage

```ts
import { AtlasClient } from "@mhoc/mongodb-atlas";

const atlasClient = new AtlasClient({
  publicKey: process.env.PUBLIC_KEY,
  privateKey: process.env.PRIVATE_KEY,
});
const projects = await atlasClient.projects.list();
```

## Supported APIs

- `.cloudBackupRestoreJobs.createDownload`: create a restore job targeting a `.tar.gz` file.
- `.cloudBackupRestoreJobs.get`: get one restore job.
- `.cloudBackupRestoreJobs.list`: list all restore jobs.
- `.cloudBackups.list`: list cloud backups for a cluster.
- `.clusters.list`: list clusters in a project.
- `.projects.list`: list projects the api key has access to.

## Testing

You must provide `ATLAS_PUBLIC_KEY` and `ATLAS_PRIVATE_KEY` environment variables for testing to
function properly. Only non-mutable query operations are ever tested, and even those may not
run properly given everyone would have their Atlas environemnt configured differently.

---
_Source: https://npm.io/package/@mhoc/mongodb-atlas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
