Action resource

You can create action resources to perform actions to occur as a result of events within WebSphere Automation, such as sending an email or invoking a webhook. An action has no dependency on the method used to invoke it, which means that an action can be invoked by any number of triggers.

About the action resource

The action resource encapsulates all of the metadata required to perform the action. An action has no dependency on the method used to invoke it, which means that an action can be invoked by any number of triggers.

Actions are polymorphic; different types of actions can be created, such as email and webhook. A common set of metadata exist for all action resources.
  • name: an arbitrary name that you give the action
  • id: a unique, arbitrary alphanumeric identifier for the action, which is set in the trigger to define the action to take when the conditions in the trigger are met
  • description: an arbitrary description of what the action does
  • type: the type of action to be performed; valid action types are email and webhook
  • configuration: a value that provides data and metadata needed for the type of action; for more information, see the specific action type
  • enabled: set to true if the action is to be performed
  • created: the ISO-8601 format date and time that the action was created
  • createdBy: the ID of the user that created the action
  • updated: the ISO-8601 format date and time that the action was most recently updated
  • updatedBy: the ID of the user that updated the action
  • refs: the list of triggers that reference this action

Example JSON for action resource

{
  "id": "cc4175d9-9e3c-4236-8718-ec39aafe29c3",
  "name" : "My Webhook Action",
  "description" : "An example webhook action",
  "type": "webhook",
  "enabled": true,
  "configuration": {
    …
  },
  "created": "2018-01-30T13:00:00Z",
  "createdBy": "j.doe@example.com",
  "updated": "2018-01-30T14:00:00Z",
  "updatedBy": "f.gains@example.com",
  "refs": {
    "triggers": " /api/actions/cc4175d9-9e3c-4236-8718-ec39aafe29c3/triggers"
  }
}