app-services-admin-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

Atlas App Services Admin SDK

This is not an official MongoDB-supported project.

SDK for Atlas Atlas App Services administration. This SDK is a wrapper around the App Services Admin API.

Install

npm install app-services-admin-sdk

Usage

Instantiate an SDK client:

import {
  AppServicesTokenCredential,
  AtlasAppServicesAPI,
} from "app-service-admin-sdk";

const { PUBLIC_KEY, PRIVATE_KEY, GROUP_ID, APP_ID } = process.env;
const creds = new AppServicesTokenCredential(PUBLIC_KEY, PRIVATE_KEY);
const apiClient = new AtlasAppServicesAPI(creds, GROUP_ID, APP_ID);

Use the client to query the Admin API:

const secretRequestBody = {
  name: "helloooo",
  value: "world",
};
const res = await apiClient.adminCreateASecret(secretRequestBody);
console.log(res);
/*
The console.log statement will print:

{ id: '<Some App Id>', name: 'helloooo' }
*/

Readme

Keywords

none

Package Sidebar

Install

npm i app-services-admin-sdk

Weekly Downloads

2

Version

0.1.5

License

ISC

Unpacked Size

7.79 kB

Total Files

6

Last publish

Collaborators

  • bpmutter