🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

app-services-admin-sdk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-services-admin-sdk

This is **not** an official MongoDB-supported project.

0.1.5
latest
Source
npm
Version published
Maintainers
1
Created
Source

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' }
*/

FAQs

Package last updated on 27 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts