Action resource types
Action resources are used to configure actions that are performed by WebSphere Automation in response to events occurring within the platform.
Example action created event
{
"type" : "CREATE",
"action" : {
"created" : "2023-06-12T12:40:21Z",
"createdBy" : "admin",
"description" : "POSTs a notification to Slack when a vulnerability is created",
"id" : "3668814e-3f4b-453c-b301-1ce161870bca",
"name" : "Vulnerability Slack Notification Action",
"updated" : "2023-06-12T12:40:21Z",
"updatedBy" : "admin",
"enabled" : true,
"type" : "webhook",
"configuration" : {
"body" : "{ \"channel\": \"was-automation-demo\", \"blocks\": [ { \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"Vulnerability Detected\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"{{icon}} WebSphere Automation detected a vulnerability for CVE <{{bulletinUrl}}|{{cveId}}> (CVSS base score {{cvssBaseScore}}) on {{#isJdk}}JDK *{{productName}}*{{/isJdk}}{{^isJdk}}server *{{serverName}}*{{/isJdk}} on host *{{hostName}}*.\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"*CVE Information*\\n{{{@wsa_eq_cveSummary}}}\" } }, { \"type\": \"actions\", \"elements\": [ { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View Bulletin\" }, \"value\": \"click_me\", \"url\": \"{{bulletinUrl}}\" }{{^isJdk}}, { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View All CVEs for {{serverName}}\" }, \"value\": \"click_me_123\", \"url\": \"https://example.com/websphereauto/websphere/{{serverId}}/vulnerabilities/cves\" } {{/isJdk}} ] }, { \"type\": \"divider\" } ] }",
"contentType" : "application/json",
"headers" : [ ],
"method" : "POST",
"targetUrl" : "https://hooks.slack.com/services/12345/12345/12345"
}
}
}
Example action updated event
{
"type" : "UPDATE",
"action" : {
"created" : "2023-06-12T12:40:21Z",
"createdBy" : "admin",
"description" : "POSTs a notification to Slack when a vulnerability is created",
"id" : "3668814e-3f4b-453c-b301-1ce161870bca",
"name" : "Vulnerability Slack Notification Action",
"updated" : "2023-06-12T12:42:53Z",
"updatedBy" : "admin",
"enabled" : true,
"type" : "webhook",
"configuration" : {
"body" : "{ \"channel\": \"was-automation-demo\", \"blocks\": [ { \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"Vulnerability Detected\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"{{icon}} WebSphere Automation detected a vulnerability for CVE <{{bulletinUrl}}|{{cveId}}> (CVSS base score {{cvssBaseScore}}) on {{#isJdk}}JDK *{{productName}}*{{/isJdk}}{{^isJdk}}server *{{serverName}}*{{/isJdk}} on host *{{hostName}}*.\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"*CVE Information*\\n{{{@wsa_eq_cveSummary}}}\" } }, { \"type\": \"actions\", \"elements\": [ { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View Bulletin\" }, \"value\": \"click_me\", \"url\": \"{{bulletinUrl}}\" }{{^isJdk}}, { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View All CVEs for {{serverName}}\" }, \"value\": \"click_me_123\", \"url\": \"https://example.com/websphereauto/websphere/{{serverId}}/vulnerabilities/cves\" } {{/isJdk}} ] }, { \"type\": \"divider\" } ] }",
"contentType" : "application/json",
"headers" : [ {
"name" : "Accept",
"value" : "application/json"
} ],
"method" : "POST",
"targetUrl" : "https://hooks.slack.com/services/12345/12345/12345"
}
},
"originalVersion" : {
"created" : "2023-06-12T12:40:21Z",
"createdBy" : "admin",
"description" : "POSTs a notification to Slack when a vulnerability is created",
"id" : "3668814e-3f4b-453c-b301-1ce161870bca",
"name" : "Vulnerability Slack Notification Action",
"updated" : "2023-06-12T12:40:21Z",
"updatedBy" : "admin",
"enabled" : true,
"type" : "webhook",
"configuration" : {
"body" : "{ \"channel\": \"was-automation-demo\", \"blocks\": [ { \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"Vulnerability Detected\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"{{icon}} WebSphere Automation detected a vulnerability for CVE <{{bulletinUrl}}|{{cveId}}> (CVSS base score {{cvssBaseScore}}) on {{#isJdk}}JDK *{{productName}}*{{/isJdk}}{{^isJdk}}server *{{serverName}}*{{/isJdk}} on host *{{hostName}}*.\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"*CVE Information*\\n{{{@wsa_eq_cveSummary}}}\" } }, { \"type\": \"actions\", \"elements\": [ { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View Bulletin\" }, \"value\": \"click_me\", \"url\": \"{{bulletinUrl}}\" }{{^isJdk}}, { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View All CVEs for {{serverName}}\" }, \"value\": \"click_me_123\", \"url\": \"https://example.com/websphereauto/websphere/{{serverId}}/vulnerabilities/cves\" } {{/isJdk}} ] }, { \"type\": \"divider\" } ] }",
"contentType" : "application/json",
"headers" : [ ],
"method" : "POST",
"targetUrl" : "https://hooks.slack.com/services/12345/12345/12345"
}
}
}
Example action deleted event
{
"type" : "DELETE",
"action" : {
"created" : "2023-05-26T13:12:33Z",
"createdBy" : "admin",
"description" : "POSTs a notification to Slack when a vulnerability is created",
"id" : "74313a6b-a163-4f7d-833b-31bf4f12670a",
"name" : "Vulnerability Slack Notification Action",
"updated" : "2023-05-26T13:43:37Z",
"updatedBy" : "admin",
"enabled" : true,
"type" : "webhook",
"configuration" : {
"body" : "{ \"channel\": \"was-automation-demo\", \"blocks\": [ { \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"Vulnerability Detected\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"{{icon}} WebSphere Automation detected a vulnerability for CVE <{{bulletinUrl}}|{{cveId}}> (CVSS base score {{cvssBaseScore}}) on {{#isJdk}}JDK *{{productName}}*{{/isJdk}}{{^isJdk}}server *{{serverName}}*{{/isJdk}} on host *{{hostName}}*.\" } }, { \"type\": \"divider\" }, { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"*CVE Information*\\n{{{@wsa_eq_cveSummary}}}\" } }, { \"type\": \"actions\", \"elements\": [ { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View Bulletin\" }, \"value\": \"click_me\", \"url\": \"{{bulletinUrl}}\" }{{^isJdk}}, { \"type\": \"button\", \"text\": { \"type\": \"plain_text\", \"text\": \"View All CVEs for {{serverName}}\" }, \"value\": \"click_me_123\", \"url\": \"https://example.com/websphereauto/websphere/{{serverId}}/vulnerabilities/cves\" } {{/isJdk}} ] }, { \"type\": \"divider\" } ] }",
"contentType" : "application/json",
"headers" : [ ],
"method" : "post",
"targetUrl" : "https://hooks.slack.com/services/12345/12345/12345"
}
}
}