Retrieve Actions metadata and definitions.
- buildActionEmbeddings - Rebuild action embeddings for semantic search
- listActionsMeta - List all actions metadata
- rpcAction - Make an RPC call to an action
- searchActions - Search connector actions by semantic similarity
Rebuild action embeddings for semantic search
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.actions.buildActionEmbeddings({
connectorKey: "slack",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { actionsBuildActionEmbeddings } from "@stackone/stackone-client-ts/funcs/actionsBuildActionEmbeddings.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await actionsBuildActionEmbeddings(stackOne, {
connectorKey: "slack",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("actionsBuildActionEmbeddings failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
shared.ActionBuildDto | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneBuildActionEmbeddingsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Retrieves a list of all actions metadata
import { StackOne } from "@stackone/stackone-client-ts";
import { ExcludeT, Include } from "@stackone/stackone-client-ts/sdk/models/operations";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.actions.listActionsMeta({
exclude: [
ExcludeT.Actions,
],
filter: {
accountIds: "account1,account2",
actionKey: "action1",
connectors: "connector1,connector2",
},
groupBy: "[\"connector\"]",
include: [
Include.ActionDetails,
],
search: "employee",
});
for await (const page of result) {
console.log(page);
}
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { actionsListActionsMeta } from "@stackone/stackone-client-ts/funcs/actionsListActionsMeta.js";
import { ExcludeT, Include } from "@stackone/stackone-client-ts/sdk/models/operations";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await actionsListActionsMeta(stackOne, {
exclude: [
ExcludeT.Actions,
],
filter: {
accountIds: "account1,account2",
actionKey: "action1",
connectors: "connector1,connector2",
},
groupBy: "[\"connector\"]",
include: [
Include.ActionDetails,
],
search: "employee",
});
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("actionsListActionsMeta failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneListActionsMetaRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneListActionsMetaResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Makes a remote procedure call to the specified action
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.actions.rpcAction({
action: "create_employee",
body: {
"data": "example",
},
headers: {
"Content-Type": "application/json",
},
path: {
"id": "123",
},
query: {
debug: false,
},
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { actionsRpcAction } from "@stackone/stackone-client-ts/funcs/actionsRpcAction.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await actionsRpcAction(stackOne, {
action: "create_employee",
body: {
"data": "example",
},
headers: {
"Content-Type": "application/json",
},
path: {
"id": "123",
},
query: {
debug: false,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("actionsRpcAction failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
shared.ActionsRpcRequestDto | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneRpcActionResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Search connector actions by semantic similarity
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.actions.searchActions({
connector: "slack",
query: "send a message",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { actionsSearchActions } from "@stackone/stackone-client-ts/funcs/actionsSearchActions.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await actionsSearchActions(stackOne, {
connector: "slack",
query: "send a message",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("actionsSearchActions failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
shared.ActionSearchDto | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneSearchActionsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |