Create PagerDuty Action

You can create an alert to be notified through PagerDuty application. Specify the necessary details in the request body that are required for PagerDuty such as action name, action description, client, and servicekey, and so on.

POST  /rest/v1/actions/pagerduty

Input ParametersInput Parameters

Parameter

Mandatory/Optional Data Type

Description

pagerdutyRequest

Optional Body

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

{

  "actionDescription": "string",

  "actionName": "string",

  "client": "string",

  "serviceKey": "string",

  "subjectLine": "string"

}

Where,

actionDescription: description that tells the purpose of the action

actionName: name of the action

client:

serviceKey: the service key required to connect to your PagerDuty account.

subjectLine: subject of the action

Sample - Create PagerDuty ActionSample - Create PagerDuty Action

API request

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

Request POST Data

    
      {
    "actionDescription": "Sample PagerDuty action",
    "actionName": "Pagerduty action",
    "client": "sample",
    "serviceKey": "c391356a9d7d4c6b8a0257ff91cc3842",
    "subjectLine": "Test Pager action"
}
      

Response

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