You can update the action to be notified through Slack. Specify the necessary details in the request body that are required for Slack such as action name, action description, the recipient details, whom the alert should be sent to and so on.
Parameter |
Mandatory/Optional | Data Type |
Description |
---|---|---|---|
slackActionId |
Mandatory | Integer |
Specify the slackAction ID of a specific action in the user’s scope. |
slackRequest |
Mandatory | Body |
Specify the action actionName, actionDescription, and recipients and so on. Refer to the following example for exact syntax. { "actionDescription": "string", "actionName": "string", "channel": "string", "webhookUri": "string" } Where, actionDescription: description that tells the purpose of the action actionName: name of the action channel: the channel name of your slack account webhookUri: the Webhook URI required to connect to your slack account to post alert messages. |
API request
curl -k -X PUT -u <username>:<password>
'https://<QualysBaseURL>/cloudview-api/rest/v1/actions/slack/bd786210-9965-11e8-ab43-6187ace8f6e8'
Request PUT Data
{
"actionDescription": "Sample slack action description",
"actionName": "Sample slack action",
"channel": "Sample-slack""webhookUri": "https://hooks.slack.com/services/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"
}
Response
{
"success": "bd786210-9965-11e8-ab43-6187ace8f6e8"
}