{"id":27910623,"url":"https://github.com/charanjit-singh/mongodb-atlas-data-api","last_synced_at":"2026-04-16T08:31:43.606Z","repository":{"id":238977617,"uuid":"798108250","full_name":"charanjit-singh/mongodb-atlas-data-api","owner":"charanjit-singh","description":"A wrapper around the Mongodb Atlas Data API to make it easier to interact with the API from a Node.js application.","archived":false,"fork":false,"pushed_at":"2024-05-10T16:44:25.000Z","size":361,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T10:53:32.378Z","etag":null,"topics":["api","mongodb","nextjs","openapi"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mongodb-atlas-data-api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charanjit-singh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-09T05:34:36.000Z","updated_at":"2024-08-24T05:44:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"44c750d0-feae-4577-b5d2-569da7305fc8","html_url":"https://github.com/charanjit-singh/mongodb-atlas-data-api","commit_stats":null,"previous_names":["charanjit-singh/atlas-api-client"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/charanjit-singh/mongodb-atlas-data-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charanjit-singh%2Fmongodb-atlas-data-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charanjit-singh%2Fmongodb-atlas-data-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charanjit-singh%2Fmongodb-atlas-data-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charanjit-singh%2Fmongodb-atlas-data-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charanjit-singh","download_url":"https://codeload.github.com/charanjit-singh/mongodb-atlas-data-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charanjit-singh%2Fmongodb-atlas-data-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31877479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T07:36:03.521Z","status":"ssl_error","status_checked_at":"2026-04-16T07:35:53.576Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","mongodb","nextjs","openapi"],"created_at":"2025-05-06T09:47:53.430Z","updated_at":"2026-04-16T08:31:43.575Z","avatar_url":"https://github.com/charanjit-singh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NPM Downloads](https://img.shields.io/npm/dm/mongodb-atlas-data-api)\n# Mongodb Atlas Data API Client\n\nThis library is a wrapper around the Mongodb Atlas Data API. It is designed to make it easier to interact with the API from a Node.js application.\n\nMongodb atlas data api can be accessed using the following link: [Mongodb Atlas Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/openapi/)\n\n## Installation\n\n```bash\nnpm install mongodb-atlas-data-api\n# Or\npnpm install mongodb-atlas-data-api\n# Or\nyarn add mongodb-atlas-data-api\n```\n\n## Usage\n\nYou can specify `dataSource`, `collection`, and `database` in the constructor of the `AtlasApi` class. You can override these values in the method calls as well.\n\n```typescript\nimport \"dotenv/config\";\nimport { AtlasApi } from \"mongodb-atlas-data-api\";\nconst atlasApiClient = new AtlasApi({\n  basePath: process.env.ATLAS_BASE_PATH,\n  auth: {\n    type: \"apiKey\",\n    apiKey: process.env.ATLAS_API_KEY as string,\n  },\n  dataSource: \"Cluster0\",\n  collection: \"\", // collection name,\n  database: \"\", // database name,\n});\n\nconst run = async () =\u003e {\n  const response = await atlasApiClient.find({\n    findManyRequestBody: {\n      filter: {\n        firstName: \"test\",\n      },\n    },\n  });\n  console.log(response);\n};\n\nrun();\n```\n\n## Methods\n\nAll functions available in API are available in the client as well. The following methods are available in the client:\n\n- `find`\n- `findOne`\n- `insertOne`\n- `insertMany`\n- `updateOne`\n- `updateMany`\n- `deleteOne`\n- `deleteMany`\n- `aggregate`\n\n## Options\n\nExplore the [Mongodb Atlas Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/openapi/) to see the options available for each method.\n\nIntellisense is available for the options in the client as well.\n\n# Why use this library?\n\nYou can use this library to interact with the Mongodb Atlas Data API from your Node.js application. This library provides a simple interface to interact with the API. \n\nThis can be useful in the following scenarios:\n\n1. NextJs applications for edge runtime data fetching.\n2. Serverless applications where you don't want to manage a database connection.\n3. Applications where you want to interact with the database without exposing the connection string.\n4. [Read Mode](https://www.mongodb.com/docs/atlas/app-services/data-api/)\n\n# Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nMIT\n\n# Author\n\nCreated by [Charanjit Singh](https://github.com/charanjit-singh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharanjit-singh%2Fmongodb-atlas-data-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharanjit-singh%2Fmongodb-atlas-data-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharanjit-singh%2Fmongodb-atlas-data-api/lists"}