Skip to main content

ManagedAPIService

Functions

syncManagedAPIs

ManagedApiService.syncManagedAPIs(): Promise<void>

Synchronizes Managed APIs metadata with the Orchestrator.

Parameters: None.

getManagedAPIs

ManagedApiService.getManagedAPIs(): Promise<DataMap[]>

Retrieves all Managed APIs stored on the device.

Parameters: None.

getManagedAPI

ManagedApiService.getManagedAPI(
name: string
): Promise<DataMap | null>

Retrieves a single Managed API definition by its programmatic name.

Parameters:

  • name: string — Programmatic name of the Managed API.

startOAuth

ManagedApiService.startOAuth(
authUrl: string,
redirectUri: string,
queryName: string
): Promise<string>

Starts an OAuth authentication flow and returns the authorization code extracted from the redirect URL.

Parameters:

  • authUrl: string — OAuth authorization endpoint.
  • redirectUri: string — Redirect URI configured for your OAuth client.
  • queryName: string — Query parameter key used to extract the authorization code.

fetchTokenFromCode

ManagedApiService.fetchTokenFromCode(
tokenUrl: string,
httpMethod: "GET" | "POST"
): Promise<string>

Exchanges an OAuth authorization code for an access token.

Parameters:

  • tokenUrl: string — Token endpoint URL.
  • httpMethod: "GET" | "POST" — HTTP method to use for token exchange.

Classes

DataMap

{ [key: string]: string }