TypeScript icon, indicating that this package has built-in type declarations

1.0.24 • Public • Published


Provides a JavaScript/TypeScript-based wrapper for the OpsCompass APIs.

Using the API Client

The API client exposes properties for the various API scopes made available in OpsCompass APIs. Individual API methods are Promise-based wrappers around appropriate HTTP calls. Input parameters are expressed in plain objects with type information available.

async function getResourceInfoFromOpsCompass(resourceId) {
  const accessToken = await lookUpAccessToken();
  const client = new OpsCompassClient(accessToken);
  const resource = await client.resources.get({
    company: "my-company",
  return resource;

Managing Access Tokens

The API client works with an OAuth-based access token flow to control access to the APIs. Your app is responsible for acquiring this token and keeping it secure. This package includes a helper class to aid in common tasks like building authorize URLs or redeeming refresh tokens.

All authorization paths today require an active user with access to a web browser. OpsCompass does not support the resource owner flow or the client credentials flow.

To get your OAuth Client ID or help with implementing the OAuth flows, contact OpsCompass.

HTTP Proxy Support

If your environment makes use of an HTTP proxy, set the environment variable "https_proxy" to the proxy's path to route all HTTP traffic through that proxy.




Package Sidebar


Weekly Downloads





SEE LICENSE IN license.txt

Unpacked Size

285 kB

Total Files


Last publish


  • tkempkes
  • megan.mcclain
  • christopher.dent
  • jmgrange
  • programmerman
  • sbeste
  • zebulonfrantzich
  • jklemme
  • jtcronin
  • ocmstone