Get Actions

You can get the list of actions using this API. You can search for actions using filters based on criteria you want.

GET  /rest/v1/actions/

Input ParametersInput Parameters

Parameter

Mandatory/Optional Data Type

Description

filter

Optional String

Form the search query using the filters we provide to refine the search for actions.

Filters supported:

    action.name:

    action.description

    action.type

    action.createdBy

    action.createdById

    action.updatedBy

    action.updatedById

    action.active

    action.disabled

    action.createdDate

    action.updatedDate

    action.emailRecipient

    action.subject

    action.slackChannel

    action.slackWebhookUri

    action.pagerdutyServiceKey

For detailed information on filters, see the Reference: Action Filters.

pageNo

   

(integer) The page to be returned.

pageSize

   

(integer) The number of records per page to be included in the response.

sortField

   

Specify the field that decides the sort order for the actions.

sortOrder {asc|desc}

   

Specify if the sorting needs to be ascending or descending order.

Sample - Get the list of actionsSample - Get the list of actions

Let us get the actions that are created by a specific user.

API request

    
      curl -X GET --header 'Accept: application/json' --header 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQK=='
'https://<QualysBaseURL>/cloudview-api/rest/v1/actions?filter=action.createdBy%3Duser_john&pageNo=1&pageSize=50&sortOrder=asc'
      

Response

    
      {
    "id": "24278970-725c-11ea-9959-f36a27b72f5a",
    "name": "string12345",
    "description": "Sample Pager",
    "actionType": "pagerduty",
    "createdBy": "John Doe",
    "createdById": "user_john",
    "updatedBy": "John Doe",
    "updatedById": "user_john",
    "created": "2020-03-30T07:57:45.735+0000",
    "updated": "2020-03-30T08:07:35.896+0000",
    "alert": "Qualys CloudView: Cloud Security Assessment Alerts\n\n${control.criticality} Severity Control Failure Detected for CID ${cid}\n\n*Affected Resource*\n\tresourceId:${resource.id}\n\tresourceType:${resource.type}\n\tservice:${service.type}\n\tregion:${region}\n\tcloudType:${provider.type}\n\taccountId:${account.id}\n\tconnectorId:${connectorUuid}\n\tgroupName:${accountGroup}\n\n*Evaluation Summary*\n\tcontrolName:${control.name}\n\tcontrolId:${cid}\n\tpolicyName:${policyName}\n\tevaluatedOn:${evaluatedOn}\n\tevaluationDates:\n\t\tfirstEvaluated:${firstEvaluated}\n\t\tlastEvaluated:${lastEvaluated}\n\n*Results*\n\tresult:${control.result}\n\tevidences:\n\t\tsettingName:${evidences.key}\n\t\tactualValue:${evidences.value}\n\nYours Sincerely,\nQualys Support Team\n\n\nFor any assistance, please contact our customer support team.",
    "subject": "Sample Pager Action",
    "pagerdutyServiceKey": "c391356a9d7d4c6b8a0257ff91cc3842",
    "pagerdutyEventType": "trigger",
    "activeRules": 0,
    "disabledRules": 0
},
{
    "id": "36bc5690-6dcc-11ea-97c4-57de4ff3eb79",
    "name": "Azure Action",
    "description": "Azure Action",
    "actionType": "qemail",
    "createdBy": "John Doe",
    "createdById": "user_john",
    "updatedBy": "John Doe",
    "updatedById": "user_john",
    "created": "2020-03-24T12:37:24.729+0000",
    "updated": "2020-03-24T12:37:24.729+0000",
    "alert": "Qualys CloudView: Cloud Security Assessment Alerts\n\n${control.criticality} Severity Control Failure Detected for CID ${cid}\n\n*Affected Resource*\n\tresourceId:${resource.id}\n\tresourceType:${resource.type}\n\tservice:${service.type}\n\tregion:${region}\n\tcloudType:${provider.type}\n\taccountId:${account.id}\n\tconnectorId:${connectorUuid}\n\tgroupName:${accountGroup}\n\n*Evaluation Summary*\n\tcontrolName:${control.name}\n\tcontrolId:${cid}\n\tpolicyName:${policyName}\n\tevaluatedOn:${evaluatedOn}\n\tevaluationDates:\n\t\tfirstEvaluated:${firstEvaluated}\n\t\tlastEvaluated:${lastEvaluated}\n\n*Results*\n\tresult:${control.result}\n\tevidences:\n\t\tsettingName:${evidences.key}\n\t\tactualValue:${evidences.value}\n\nYours Sincerely,\nQualys Support Team\n\n\nFor any assistance, please contact our customer support team.",
    "subject": "Azure CV Test",
    "smtpHost": "mta01.eng.abc01.example.com",
    "smtpPort": 25,
    "emailRecipients": [
        "abc@example.com"
    ],
    "emailFromAddress": "noreply@example.com",
    "emailReplyTo": "noreply@example.com",
    "activeRules": 0,
    "disabledRules": 0
},
{
    "id": "1f695df0-6da2-11ea-8910-77b847f40d61",
    "name": "Sample Slack",
    "description": "Sample Slack decription",
    "actionType": "slack",
    "createdBy": "John Doe",
    "createdById": "user_john",
    "updatedBy": "John Doe",
    "updatedById": "user_john",
    "created": "2020-03-24T07:36:06.735+0000",
    "updated": "2020-03-30T07:54:43.371+0000",
    "alert": "Qualys CloudView: Cloud Security Assessment Alerts\n\n*${control.criticality} Severity Control Failure Detected for CID ${cid}*\n\n*Affected Resource*\n\tresourceId:${resource.id}\n\tresourceType:${resource.type}\n\tservice:${service.type}\n\tregion:${region}\n\tcloudType:${provider.type}\n\taccountId:${account.id}\n\tconnectorId:${connectorUuid}\n\n*Evaluation Summary*\n\tcontrolName:${control.name}\n\tcontrolId:${cid}\n\tpolicyName:${policyName}\n\tevaluatedOn:${evaluatedOn}\n\tevaluationDates:\n\t\tfirstEvaluated: ${firstEvaluated}\n\t\tlastEvaluated:${lastEvaluated}\n\n*Results*\n\tresult: ${control.result}\n\tevidences:\n\t\tsettingName:${evidences.key}\n\t\tactualValue: ${evidences.value}\n\nYours Sincerely,\nQualys Support Team\n\n\nFor any assistance, please contact our >mailto:support@qualys.com | customer support team.<",
    "slackWebhookUri": "https://hooks.slack.com/services/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",
    "slackChannel": "Sample-slack",
    "activeRules": 1,
    "disabledRules": 0
}