Skip to content

Latest commit

 

History

History
executable file
·
141 lines (98 loc) · 4.97 KB

File metadata and controls

executable file
·
141 lines (98 loc) · 4.97 KB

Plugins

(plugins)

Overview

REST APIs for managing and running plugins

Available Operations

getPlugins

Get all plugins for the current workspace.

Example Usage

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

(async() => {
  const sdk = new Speakeasy({
    security: {
      apiKey: "",
    },
  });

  const res = await sdk.plugins.getPlugins();

  if (res.statusCode == 200) {
    // handle response
  }
})();

Parameters

Parameter Type Required Description
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.GetPluginsResponse>

runPlugin

Run a plugin

Example Usage

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

(async() => {
  const sdk = new Speakeasy({
    security: {
      apiKey: "",
    },
  });

  const res = await sdk.plugins.runPlugin({
    filters: {
      filters: [
        {
          key: "<key>",
          operator: "string",
          value: "string",
        },
      ],
      limit: 669298,
      offset: 94585,
      operator: "string",
    },
    pluginID: "string",
  });

  if (res.statusCode == 200) {
    // handle response
  }
})();

Parameters

Parameter Type Required Description
request operations.RunPluginRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.RunPluginResponse>

upsertPlugin

Upsert a plugin

Example Usage

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

(async() => {
  const sdk = new Speakeasy({
    security: {
      apiKey: "",
    },
  });

  const res = await sdk.plugins.upsertPlugin({
    code: "string",
    pluginId: "string",
    title: "string",
    workspaceId: "string",
  });

  if (res.statusCode == 200) {
    // handle response
  }
})();

Parameters

Parameter Type Required Description
request shared.Plugin ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.UpsertPluginResponse>