(plugins)
REST APIs for managing and running plugins
- getPlugins - Get all plugins for the current workspace.
- runPlugin - Run a plugin
- upsertPlugin - Upsert a plugin
Get all plugins for the current workspace.
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
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetPluginsResponse>
Run a plugin
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
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RunPluginRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.RunPluginResponse>
Upsert a plugin
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
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.Plugin | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.UpsertPluginResponse>