Update Mitigation Job

Use this API to update the on-demand Windows and Linux mitigation deployment jobs.

PATCH/mtg/v1/deploymentjob/{deploymentJobId}

Input ParametersInput Parameters

Parameter

Mandatory/
Optional

Data Type

Description

deploymentJobId Mandatory String Specify the job ID. 

Sample - Update Windows on-demand mitigation JobSample - Update Windows on-demand mitigation Job

API Request

curl -X 'PATCH' \
  '<qualys>/mtg/v1/deploymentjob/4730541c-091e-443c-95d3-c8a6f34bc4bd' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <JWT_Token>' \
  -H 'Content-Type: application/json' \
  -d 

API Body

{
    "qids": [
        378985,
        90044,
        105965
    ],
    "assetTagIds": [
        "576b4fab-2682-433e-b3e6-c4ea9861ae75",
        "2f0abeac-8fe5-48a0-aef8-c25bb98ec6f8"
    ],
    "name": "MTG_WINDOWS_ONDEMAND_DEMO",
    "description": "Test Mitigation Job",
    "scheduleType": "On-demand",
    "schemaVersion": "1.0",
    "startDateTime": null,
    "status": "Disabled",
    "timezone": null,
    "timezoneType": null,
    "type": "Install",
    "filterType": "Any",
    "exclusionFilterType": "Any",
    "exclusionTagIds": [
        "9947851b-017f-4df5-8831-5073392a51c2"
    ],
    "matchAllTagIds": [],
    "coAuthorUserIds": [
        "430c474e-2309-47bf-832b-a6e5685c3866"
    ],
    "platform": "Windows",
    "notification": {
        "notificationTypes": {
            "email": true
        },
        "notificationConfigs": {
            "recipientEmails": "j@qualys.com",
            "completedPercentage": 80
        },
        "notificationEvents": {
            "onJobStart": true,
            "onJobComplete": true
        }
    }
}

API Response

{
  "customerId": "bbb55e58-b06f-fd7b-81b8-92a7c5407282",
  "id": "4730541c-091e-443c-95d3-c8a6f34bc4bd",
  "schemaVersion": "1.0",
  "name": "MTG_WINDOWS_ONDEMAND_DEMO",
  "description": "Test Mitigation Job",
  "type": "Install",
  "status": "Disabled",
  "assetIds": null,
  "coAuthorUserIds": [
    "430c474e-2309-47bf-832b-a6e5685c3866"
  ],
  "scheduleType": "On-demand",
  "startDateTime": null,
  "recurring": false,
  "timezoneType": null,
  "timezone": null,
  "createdBy": null,
  "updatedBy": {
    "user": {
      "id": "b0f469fe-8f5e-f169-80e1-95e8a728bb5d",
      "name": "quaysxkm35",
      "fullName": null
    },
    "date": 1751382808261
  },
  "deletedBy": null,
  "assetCount": null,
  "taggedAssetCount": 0,
  "applicableAssetCount": 0,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "jobSource": 3,
  "readOnly": false,
  "subCategory": "Mitigation",
  "platform": "Windows",
  "assetTagIds": [
    "576b4fab-2682-433e-b3e6-c4ea9861ae75",
    "2f0abeac-8fe5-48a0-aef8-c25bb98ec6f8"
  ],
  "matchAllTagIds": [],
  "exclusionTagIds": [
    "9947851b-017f-4df5-8831-5073392a51c2"
  ],
  "exclusionAssetIds": null,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "johnd@qualys.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": true
    }
  },
  "assetDetectionsQQL": "tags.uuid: [576b4fab-2682-433e-b3e6-c4ea9861ae75,2f0abeac-8fe5-48a0-aef8-c25bb98ec6f8] AND not tags.uuid: [9947851b-017f-4df5-8831-5073392a51c2] AND trackingMethod:QAGENT",
  "preDeployActions": [
    {
      "actionId": "316b89a8-6189-40cb-9115-626a0dd9b55b",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 378985,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "CVE-2016-2183"
          ],
          "mitigationId": "3f3d2fae-96ec-4d73-83d6-3cf0264ac1dc",
          "mitigationType": "Modify registry",
          "carScriptId": 226363191,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 0,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    },
    {
      "actionId": "a607b08d-4ea9-40cf-ac46-fd39f8a1b594",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 105965,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "105965"
          ],
          "mitigationId": "ce7eb2cf-61c4-4362-9523-349eb8e1e7da",
          "mitigationType": "Uninstall EOL",
          "carScriptId": 2099399004,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 0,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    },
    {
      "actionId": "e6a1950e-fec1-427e-82cc-134e9d2b5647",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 90044,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "90044"
          ],
          "mitigationId": "414d7f53-1409-4045-ba3d-7e71ef39abfb",
          "mitigationType": "Modify registry",
          "carScriptId": 494972837,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 0,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": null,
  "vulnQQL": "vulnerabilities.vulnerability.qid:[378985, 105965, 90044]"
}

Sample - Update Linux On-Demand Mitigation JobSample - Update Linux On-Demand Mitigation Job

API Request

curl -X 'PATCH' \
  '<qualys>/mtg/v1/deploymentjob/d4b9ded8-3015-4c55-acb4-42fa2176972a' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <JWT_Token>' \
  -H 'Content-Type: application/json' \
  -d 

API Body

{
    "qids": [
        237627,
        351793,
        503709
    ],
    "assetTagIds": [
        "576b4fab-2682-433e-b3e6-c4ea9861ae75"
    ],
    "name": "MTG_LINUX_ONDEMAND_DEMO_1",
    "description": "Test Linux Mitigation Job",
    "scheduleType": "On-demand",
    "schemaVersion": "1.0",
    "startDateTime": null,
    "status": "Disabled",
    "timezone": null,
    "timezoneType": null,
    "type": "Install",
    "filterType": "Any",
    "exclusionFilterType": "Any",
    "exclusionTagIds": [],
    "matchAllTagIds": [],
    "coAuthorUserIds": [
        "430c474e-2309-47bf-832b-a6e5685c3866"
    ],
    "platform": "Linux",
    "notification": {
        "notificationTypes": {
            "email": true
        },
        "notificationConfigs": {
            "recipientEmails": "johnd@qualys.com",
            "completedPercentage": 80
        },
        "notificationEvents": {
            "onJobStart": true,
            "onJobComplete": true
        }
    }
}

API Response

{
  "customerId": "bbb55e58-b06f-fd7b-81b8-92a7c5407282",
  "id": "d4b9ded8-3015-4c55-acb4-42fa2176972a",
  "schemaVersion": "1.0",
  "name": "MTG_LINUX_ONDEMAND_DEMO_1",
  "description": "Test Linux Mitigation Job",
  "type": "Install",
  "status": "Disabled",
  "assetIds": null,
  "coAuthorUserIds": [
    "430c474e-2309-47bf-832b-a6e5685c3866"
  ],
  "scheduleType": "On-demand",
  "startDateTime": null,
  "recurring": false,
  "timezoneType": null,
  "timezone": null,
  "createdBy": null,
  "updatedBy": {
    "user": {
      "id": "b0f469fe-8f5e-f169-80e1-95e8a728bb5d",
      "name": "quaysxkm35",
      "fullName": null
    },
    "date": 1751383369585
  },
  "deletedBy": null,
  "assetCount": null,
  "taggedAssetCount": 0,
  "applicableAssetCount": 0,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "jobSource": 3,
  "readOnly": false,
  "subCategory": "Mitigation",
  "platform": "Linux",
  "assetTagIds": [
    "576b4fab-2682-433e-b3e6-c4ea9861ae75"
  ],
  "matchAllTagIds": [],
  "exclusionTagIds": [],
  "exclusionAssetIds": null,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "johnd@qualys.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": true
    }
  },
  "assetDetectionsQQL": "tags.uuid: [576b4fab-2682-433e-b3e6-c4ea9861ae75] AND trackingMethod:QAGENT",
  "preDeployActions": [
    {
      "actionId": "c9a4e98a-d159-4fe5-9611-2b4478301bfa",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 351793,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "CVE-2019-9511"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        },
        {
          "cves": [
            "CVE-2019-9513"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    },
    {
      "actionId": "e55f7e32-17c1-49f4-a417-7cdbab518ba5",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 237627,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "CVE-2019-9515"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        },
        {
          "cves": [
            "CVE-2019-9512"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        },
        {
          "cves": [
            "CVE-2019-9514"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    },
    {
      "actionId": "9e123ee3-b139-49d1-a9e7-c1d77239ba9f",
      "action": "Apply Mitigation",
      "actionType": "predeploy",
      "params": {
        "timeout": 180,
        "mitigationCategory": "Script-based Virtual Patch",
        "qid": 503709,
        "qidDetectionId": 0,
        "hostVulnId": 0
      },
      "mitigationList": [
        {
          "cves": [
            "CVE-2019-9517"
          ],
          "mitigationId": "01914b60-2b11-77c2-870f-64e0baa83fa2",
          "mitigationType": "Uninstall Software",
          "carScriptId": 517143954,
          "customCdnUrl": "",
          "signatureHashCode": "",
          "impactFactor": 100,
          "implication": 1
        }
      ],
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": null,
  "vulnQQL": "vulnerabilities.vulnerability.qid:[351793, 237627, 503709]"
}