TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Class Actions

    Hierarchy

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      Returns Promise<{ action: string }>

      Creates a new action in your application.

      If receive an error "Authorization Denied", check policy Action / Create in Access Management.

      const newAction = await Resources.actions.create({
      name: "My Action",
      type: "condition",
      action: {
      script: ["analysis-id"],
      type: "script"
      },
      tags: [{ key: "type", value: "notification" }]
      });
      console.log(newAction.action); // action-id-123
    • Parameters

      • actionID: string

      Returns Promise<string>

      Deletes an action from your application.

      If receive an error "Authorization Denied", check policy Action / Delete in Access Management.

      const result = await Resources.actions.delete("action-id-123");
      console.log(result); // Successfully Removed
    • Parameters

      Returns Promise<string>

      Modifies an existing action.

      If receive an error "Authorization Denied", check policy Action / Edit in Access Management.

      const result = await Resources.actions.edit("action-id-123", {
      name: "Updated Action",
      active: false
      });
      console.log(result); // Successfully Updated
    • Parameters

      • actionID: string

      Returns Promise<ActionInfo>

      Retrieves detailed information about a specific action.

      If receive an error "Authorization Denied", check policy Action / Access in Access Management.

      const actionInfo = await Resources.actions.info("action-id-123");
      console.log(actionInfo); // { id: 'action-id-123', name: 'My Action', ... }
    • Parameters

      Returns Promise<ActionInfo[]>

      Lists all actions from the application with pagination support. Use this to retrieve and manage actions in your application.

      If receive an error "Authorization Denied", check policy Action / Access in Access Management.

      const list = await Resources.actions.list({
      page: 1,
      fields: ["id", "name"],
      amount: 10,
      orderBy: ["name", "asc"]
      });
      console.log(list); // [ { id: '66ab7c62e5f0db000998ce42', name: 'Action Test', ...} ]