Example resource events

Example JSON code is provided for the various types of resources that are used by WebSphere Automation. You can set triggers to detect the creation, updating, or deleting of these resources, and customize actions that use the information within them.

The first example JSON for each resource type is for the creation of a new instance of that type of resource. In the following example, valid values for the <resourceType> variable include action, asset, fix, installation, investigation, (security) bulletin, trigger, and vulnerability.

{
  "type": "CREATE",
  "<resourceType>": {
    <JSON_that_describes_resource>
  }
}
For an event where the resource is updated, the JSON code includes the new values for the resource as well as the original values.

  "type": "UPDATE",
  "<resourceType>":  {
    <JSON_that_describes_updated_resource>
  },
  "originalVersion": {
    <JSON_that_describes_original_resource>
  }
}

When a resource is deleted, the JSON code is structurally similar to that used for a creation event.

{
  "type": "DELETE",
  "<resourceType>": {
    <JSON_that_describes_resource>
  }
}