1.0.30 • Published 2 months ago

@opscompass/opscompass-api v1.0.30

Weekly downloads
-
License
SEE LICENSE IN li...
Repository
-
Last release
2 months ago

@opscompass/opscompass-api

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({
    resourceId,
    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.

1.0.30

2 months ago

1.0.29

4 months ago

1.0.28

5 months ago

1.0.22

10 months ago

1.0.26

6 months ago

1.0.25

7 months ago

1.0.24

8 months ago

1.0.23

8 months ago

1.0.27

6 months ago

1.0.19

12 months ago

1.0.21

11 months ago

1.0.20

12 months ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.1-alpha

3 years ago

1.0.0-alpha

3 years ago