Create Email Action

You can create an alert to be sent through email (action type:qemail). Specify the necessary details in the request body that are required to create an email action such as action name, action description, the recipient details, whom the email should be sent to and so on.

POST  /rest/v1/actions/email

Input ParametersInput Parameters

Parameter

Mandatory/Optional Data Type

Description

emailActionRequest

Optional Body

Specify the actionName, actionDescription, and recipients and so on. Refer to the following example for exact syntax.

{

  "actionDescription": "string",

  "actionName": "string",

  "recipients": [

    "example@abc.com"

  ],

  "subject": "string"

}

Where,

actionDescription:description that tells the purpose of the action

actionName: name of the action

recipients: valid email ID of the recipients to whom the alert should be sent. You can provide multiple email IDs separated by comma.

subject: subject of the email action

Sample - Create email actionSample - Create email action

API request

    
      curl -k -X POST -u <username>:<password>
'https://<QualysBaseURL>/cloudview-api/rest/v1/actions/email'
      

Request POST Data

    
      {
    "actionDescription": "Sample Action Test",
    "actionName": "Sample action",
    "recipients": [
        "user_john@example.com"
    ],
    "subject": "Sample Alert"
}
      

Response

    
      {
    "success": "bd786210-9965-11e8-ab43-6187ace8f6e8"
}