Release 3.3 API

January 08, 2025

Before understanding the API release highlights, learn more about the API server URL to be used in your API requests by referring to the Know Your Qualys API Server URL section. For this API Release Notes, <qualys_base_url> is mentioned in the sample API requests.

What's New?

Create a Job

New or Updated API Updated
API Endpoint  /pm/v1/deploymentjob
Method POST
DTD or XSD changes Not Applicable

With this release, this API is updated so that you can accomplish the following:

  • Create a rollback job to roll back patches from the Linux assets.
    Before this release, you could create a rollback job to roll back patches from only Windows assets.
  • Add patches from another job (which you can call a parent or a linked job) while creating Windows and Linux jobs. You can also add a condition you want to consider in the job execution.  Note that the condition is based on the post-actions of the parent job. This allows you to control the run of child job execution based on the successful percentage of post-actions in the parent job.
  • Always show the Patch Job Deployment Completion Pop-Up Window on patched machines for Windows deployment jobs irrespective of whether the patches are failed, skipped, or successfully deployed.

Input ParametersInput Parameters

Parameter

Mandatory/
Optional

Data Type

Description

alwaysShowCompletedPrompt

Optional

Boolean

Specify the value as true to show the Patch Job Deployment Completion Pop-Up Window, irrespective of whether the patches are failed, skipped, or successfully deployed.

Available values: true and false

type

Mandatory

String

Specify the job type. The available values: Install (Windows and Linux), Rollback (Windows & Linux)
The default value: Install

chainedJobRule

Optional

String

Specify the following values in the chainedJobRule array to decide on the child job execution based on the successful percentage of post action in the parent job.

  • field: postDeployAction
  • actionIds: The parent job post-action Id. You can provide a single or multiple Ids as per your requirement.
  • threshold: The threshold in hours. Available values: 1 to 100
  • condition: Post Actions were successfully executed 

Sample - Create a Linux Rollback JobSample - Create a Linux Rollback Job

API Request

curl -X POST "<qualys_base_url>/pm/v1/deploymentjob" 
-H "accept: application/json" 
-H "Authorization: Bearer <<jwt token>>"

Request Body

{
    "name": "Public API on demand Linux Rollback job with patches",
    "description": "Created via public API",
    "approvedPatches": [],
    "assetIds": [
        "d543e2a2-3860-461f-bd59-d718c31d2344"
    ],
    "assetTagIds": [],
    "filterType": "Any",
    "exclusionAssetIds": [],
    "exclusionFilterType": "Any",
    "exclusionTagIds": [],
    "coAuthorUserIds": [
        "c4c71f94-4ef6-7e6f-8260-11704fa58172"
    ],
    "preDeployment": null,
    "duringDeployment": null,
    "postDeployment": {
        "onComplete": null,
        "rebootCountdown": null,
        "rebootOption": null,
        "suppressReboots": false
    },
    "platform": "Linux",
    "type": "Rollback",
    "status": "Disabled",
    "timeout": 6,
    "timeoutUnit": "HOURS",
    "recurring": false,
    "scheduleType": "On-demand",
    "opportunisticDownloads": false,
    "notification": {
        "notificationTypes": {
            "email": true
        },
        "notificationConfigs": {
            "recipientEmails": "xxx@xxxx.com",
            "completedPercentage": "80"
        },
        "notificationEvents": {
            "onJobStart": true,
            "onJobComplete": false
        }
    },
    "preDeployActions": [
        {
            "action": "Run Script",
            "actionType": "predeploy",
            "params": {
                "actionItem": "S1",
                "timeout": 180
            },
            "script": "bHM=",
            "scriptType": "sh"
        }
    ],
    "postDeployActions": [
        {
            "action": "Run Script",
            "actionType": "postdeploy",
            "params": {
                "actionItem": "S1",
                "timeout": 180
            },
            "script": "bHM=",
            "scriptType": "sh"
        }
    ]
}

API Response

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "ee2d6bd3-4944-4ea8-a384-c3f44a40b844",
  "schemaVersion": "1.0",
  "name": "Public API on demand Linux Rollback job with patches",
  "type": "Rollback",
  "status": "Disabled",
  "assetIds": [
    "d543e2a2-3860-461f-bd59-d718c31d2344"
  ],
  "assetTagIds": [],
  "matchAllTagIds": null,
  "exclusionTagIds": [],
  "exclusionAssetIds": [],
  "coAuthorUserIds": [
    "c4c71f94-4ef6-7e6f-8260-11704fa58172"
  ],
  "approvedPatches": [],
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:25:52 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "",
    "description": ""
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "",
      "description": "",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "",
      "description": ""
    },
    "onComplete": {
      "userMessage": "",
      "description": "",
      "alwaysShowCompletedPrompt": false
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735640751819
  },
  "updatedBy": {
    "user": null,
    "date": null
  },
  "deletedBy": {
    "user": null,
    "date": null
  },
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": null,
  "dynamicPatchesQQL": null,
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": null,
  "platform": "Linux",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "b09fef6a-12ea-41af-9152-17005f0828d4",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/b09fef6a-12ea-41af-9152-17005f0828d4/Script",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "44d1ea6e-0e3e-430d-8793-afdf4992adb0",
      "action": "Run Script",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/44d1ea6e-0e3e-430d-8793-afdf4992adb0/Script",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 1,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "linkedJobId": null,
  "linkedToJob": null,
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 0,
  "downloadRandomizeTimeUnit": "MINUTES",
  "customPatchURLId": null,
  "isVulnContext": null,
  "remediationQids": null,
  "isAssetImported": false
}
  

Sample - Create a Job with patches added from a parent job and show the Patch Job Deployment Completion Pop-Up WindowSample - Create a Job with patches added from a parent job and show the Patch Job Deployment Completion Pop-Up Window

API Request

curl -X POST "<qualys_base_url>/pm/v1/deploymentjob" 
-H "accept: application/json" 
-H "Authorization: Bearer <<jwt token>>"

Request Body

{
  "name": "Public API job with chained job and alwaysShowCompletedPrompt",
  "description": "Created via public API",
  "approvedPatches": [],
  "assetIds": ["ac66e55a-efc6-4a8d-9f61-00d871572b96"],
  "assetTagIds": ["f81f37b3-a32b-4aa0-a428-12cad6e37db1"],
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "exclusionAssetIds": ["94c0bc01-3b1b-4b4b-84a0-b9fe3c9aebb0"],
  "exclusionTagIds": [ "1de6c626-de40-4dee-81f8-ae022cd9726a"],
  "coAuthorUserIds": ["568be9b8-cbbb-47bf-8132-e4f3c2c46e6c"],
  "preDeployment": null,
  "duringDeployment": {
    "description": "During deployment Description",
    "userMessage": "During deployment userMessage"
  },
  "postDeployment": {
    "onComplete": {
      "alwaysShowCompletedPrompt" : true,
      "description": "On complete Description",
      "userMessage": "On complete userMessage"
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "Reboot Countdown usermessage",
      "description": "Reboot Countdown description"
    },
    "rebootOption": {
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      },
      "description": "rebootOption description",
      "userMessage": "rebootOption user message"
    },
    "suppressReboots": false
  },
  "platform": "Windows",
  "minimizeWindow": "true",
  "type": "Install",
  "status": "Disabled",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "recurring": false,
  "scheduleType": "On-demand",
  "opportunisticDownloads": false,
  "downloadRandomizeTime": 2,
  "downloadRandomizeTimeUnit": "HOURS",
"linkedJobId": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
"chainedJobRule": [
    {
      "field": "postDeployAction",
      "actionIds": [
        "07eed865-d8e2-4cba-9c2a-27eeeef0598a"
      ],
      "threshold": "100",
      "condition": "Post Actions were successfully executed"
    }
  ],
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": 80
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "preDeployActions": [
    {
      "action": "Run Script",
      "params": {
        "actionItem": "Notepad detection script"
      },
      "script": "JHc2ND1HZXQtSXRlbVByb3BlcnR5IEhLTE06XFNvZnR3YXJlXFdvdzY0MzJOb2RlXE1pY3Jvc
29mdFxXaW5kb3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFwqIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1
saWtlICdOb3RlUGFkKysqJwokdzMyPUdldC1JdGVtUHJvcGVydHkgSEtMTTpcU29mdHdhcmVcTWljcm9zb2Z0XFdpbmRvd3
NcQ3VycmVudFZlcnNpb25cVW5pbnN0YWxsXCogIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGF
kKysqJwppZiAoJHc2NCAtb3IgJHczMikKewogICAgV3JpdGUtb3V0cHV0ICJOb3RlcGFkKysgaXMgYWxyZWFkeSBpbnN0
YWxsZWQgb24geW91ciBtYWNoaW5lLiIKfQpFbHNlewogICAgV3JpdGUtT3V0cHV0ICJOb3RlcGFkKysgaXMgbm90IGluc
3RhbGxlZCBvbiB5b3VyIG1hY2hpbmUuIgp9IA==",
      "scriptType": "ps"
    }],
  "postDeployActions": [
    {
      "action": "Install Software",
      "params": {
        "actionItem": "Install Notepad",
        "downloadURL": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases
        /download/v8.6.2/npp.7.5.8.Installer.exe",
        "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb",
        "installMethod": 0
      },
      "script": "JHc2ND1HZXQtSXRlbVByb3BlcnR5IEhLTE06XFNvZnR3YXJlXFdvdzY0MzJOb2RlXE1pY3Jvc29mdFxXaW5kb      3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFwqIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGFkK      ysqJwokdzMyPUdldC1JdGVtUHJvcGVydHkgSEtMTTpcU29mdHdhcmVcTWljcm9zb2Z0XFdpbmRvd3NcQ3VycmVudFZlcnNpb25      cVW5pbnN0YWxsXCogIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGFkKysqJwppZiAoJHc2NCAtb3IgJ      HczMikKewogICAgV3JpdGUtb3V0cHV0ICJOb3RlcGFkKysgaXMgYWxyZWFkeSBpbnN0YWxsZWQgb24geW91ciBtYWNoaW5lLiI
      KfQpFbHNlewogICAgV3JpdGUtT3V0cHV0ICJOb3RlcGFkKysgaXMgbm90IGluc3RhbGxlZCBvbiB5b3VyIG1hY2hpbmUuIgp9IA==",
      "scriptType": "ps",
      "detectionScript": "",
      "detectionScriptType": "ps"
    }
  ]
}

API Response

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "bdc31e33-753e-4a10-a5e0-a74fc551034a",
  "schemaVersion": "1.0",
  "name": "Public API job with chained job and alwaysShowCompletedPrompt",
  "type": "Install",
  "status": "Disabled",
  "assetIds": ["ac66e55a-efc6-4a8d-9f61-00d871572b96"],
  "assetTagIds": ["f81f37b3-a32b-4aa0-a428-12cad6e37db1"],
  "matchAllTagIds": null,
  "exclusionAssetIds": ["94c0bc01-3b1b-4b4b-84a0-b9fe3c9aebb0"],
  "exclusionTagIds": [ "1de6c626-de40-4dee-81f8-ae022cd9726a"],
  "coAuthorUserIds": ["568be9b8-cbbb-47bf-8132-e4f3c2c46e6c"],
  "approvedPatches": [],
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:35:04 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "During deployment userMessage",
    "description": "During deployment Description"
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "rebootOption user message",
      "description": "rebootOption description",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "Reboot Countdown usermessage",
      "description": "Reboot Countdown description"
    },
    "onComplete": {
      "userMessage": "On complete userMessage",
      "description": "On complete Description",
      "alwaysShowCompletedPrompt": true
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735641304754
  },
  "updatedBy": {
    "user": null,
    "date": null
  },
  "deletedBy": {
    "user": null,
    "date": null
  },
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": true,
  "dynamicPatchesQQL": null,
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": null,
  "platform": "Windows",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "11689a7c-ff8d-493f-87c8-5babcfaef512",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "Notepad detection script",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/11689a7c-ff8d-493f-87c8-5babcfaef512/Script",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "733d3f6c-8ba4-4ba5-8a54-a57e8a264f11",
      "action": "Install Software",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "Install Notepad",
        "downloadURL": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.6.2/npp.7.5.8.Installer.exe",
        "downloadProtocol": 0,
        "installMethod": 0,
        "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb",
        "timeout": 180
      },
      "detectionScript": "",
      "detectionScriptType": "ps",
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/733d3f6c-8ba4-4ba5-8a54-a57e8a264f11/Script",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 0,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "linkedJobId": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
  "linkedToJob": [
    {
      "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
      "id": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
      "name": "only pre post",
      "type": "Install",
      "status": "Prepared",
      "createdBy": {
        "user": {
          "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
          "name": "quays_rw17"
        },
        "date": 1727276515619
      },
      "linkedJobReferenceCount": 3,
      "schedule": "On-Demand",
      "previousRun": null,
      "nextRun": null,
      "chainedJobRule": [
        {
          "id": "c40b7de6-343b-4bf9-80d3-00ee57b2737f",
          "field": "postDeployAction",
          "threshold": 100,
          "actionIds": [
            "07eed865-d8e2-4cba-9c2a-27eeeef0598a"
          ],
          "condition": "Post Actions were successfully executed",
          "actionDetails": [
            {
              "actionId": "07eed865-d8e2-4cba-9c2a-27eeeef0598a",
              "action": "Run Script",
              "actionType": "postdeploy",
              "params": {
                "actionItem": "post",
                "fileChecksum": "",
                "timeout": 180,
                "remediationScope": false
              },
              "script": "bc023fd7-4290-f28f-8181-95a46f519f52/07eed865-d8e2-4cba-9c2a-27eeeef0598a/Script",
              "scriptType": "ps",
              "actionLinkedToJob": false
            }
          ]
        }
      ]
    }
  ],
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 2,
  "downloadRandomizeTimeUnit": "HOURS",
  "customPatchURLId": null,
  "isVulnContext": null,
  "remediationQids": null,
  "isAssetImported": false
}
  

Update a Job

New or Updated API Updated
API Endpoint  /pm/v1/deploymentjob/update/{deploymentJobId}
Method PATCH
DTD or XSD changes Not Applicable

With this release, this API is updated so that you can accomplish the following:

  • Update a rollback job to roll back patches from the Linux assets.
    Before this release, you could update a rollback job to roll back patches from only Windows assets.
  • Add patches from another job (which you can call a parent or a linked job) while updating the Windows and Linux jobs. You can also add a condition you want to consider in the job execution.  Note that the condition is based on the post-actions of the parent job. This allows you to control the run of child job execution based on the successful percentage of post-actions in the parent job.
  • Always show the Patch Job Deployment Completion Pop-Up Window on patched machines for Windows deployment jobs irrespective of whether the patches are failed, skipped, or successfully deployed.

Input ParametersInput Parameters

Parameter

Mandatory/
Optional

Data Type

Description

alwaysShowCompletedPrompt

Optional

Boolean

Specify the value as true to show the Patch Job Deployment Completion Pop-Up Window, irrespective of whether the patches are failed, skipped, or successfully deployed.

Available values: true and false

type

Mandatory

String

Specify the job type. The available values: Install (Windows and Linux), Rollback (Windows & Linux)
The default value: Install

chainedJobRule

Optional

String

Specify the following values in the chainedJobRule array to decide on the child job execution based on the successful percentage of post action in the parent job.

  • field: postDeployAction
  • actionIds: The parent job post-action Id. You can provide a single or multiple Ids as per your requirement.
  • threshold: The threshold in hours. Available values: 1 to 100
  • condition: Post Actions were successfully executed 

Sample - Update a Linux Rollback JobSample - Update a Linux Rollback Job

API Request

curl -X PATCH
"<qualys_base_url>/pm/v1/deploymentjob/update/c08769ba-aa65-4b77-b224-f2c789ce7970" 
-H "accept: application/json" 
-H "Authorization: <<Jwt Token>>" 
-H "Content-Type: application/json"

Request Body

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "ee2d6bd3-4944-4ea8-a384-c3f44a40b844",
  "schemaVersion": "1.0",
  "name": "Public API on demand Linux Rollback job",
  "type": "Rollback",
  "status": "Disabled",
  "assetIds": [
    "d543e2a2-3860-461f-bd59-d718c31d2344"
  ],
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": [
    "c4c71f94-4ef6-7e6f-8260-11704fa58172"
  ],
  "approvedPatches": null,
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:25:52 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "",
    "description": ""
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "",
      "description": "",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "",
      "description": ""
    },
    "onComplete": null
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735640751819
  },
  "updatedBy": {
    "user": null,
    "date": null
  },
  "deletedBy": {
    "user": null,
    "date": null
  },
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": null,
  "dynamicPatchesQQL": null,
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": null,
  "platform": "Linux",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "b09fef6a-12ea-41af-9152-17005f0828d4",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bHM=",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "44d1ea6e-0e3e-430d-8793-afdf4992adb0",
      "action": "Run Script",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bHM=",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 1,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "linkedJobId": null,
  "linkedToJob": null,
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 0,
  "downloadRandomizeTimeUnit": "MINUTES",
  "customPatchURLId": null,
  "isVulnContext": null,
  "remediationQids": null,
  "isAssetImported": false
}

API Response

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "ee2d6bd3-4944-4ea8-a384-c3f44a40b844",
  "schemaVersion": "1.0",
  "name": "Public API on demand Linux Rollback job",
  "type": "Rollback",
  "status": "Disabled",
  "assetIds": [
    "d543e2a2-3860-461f-bd59-d718c31d2344"
  ],
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": [
    "c4c71f94-4ef6-7e6f-8260-11704fa58172"
  ],
  "approvedPatches": null,
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:25:52 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "",
    "description": ""
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "",
      "description": "",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "",
      "description": ""
    },
    "onComplete": {
      "userMessage": "",
      "description": "",
      "alwaysShowCompletedPrompt": false
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735640751819
  },
  "updatedBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735645525699
  },
  "deletedBy": null,
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": null,
  "dynamicPatchesQQL": null,
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": null,
  "platform": "Linux",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "b09fef6a-12ea-41af-9152-17005f0828d4",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/b09fef6a-12ea-41af-9152-17005f0828d4/Script",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "44d1ea6e-0e3e-430d-8793-afdf4992adb0",
      "action": "Run Script",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "S1",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/44d1ea6e-0e3e-430d-8793-afdf4992adb0/Script",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 1,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "linkedJobId": null,
  "linkedToJob": null,
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 0,
  "downloadRandomizeTimeUnit": "MINUTES",
  "customPatchURLId": null,
  "isVulnContext": null,
  "remediationQids": [],
  "isAssetImported": false
}

Sample - Update a Job with patches added from a parent job and show the Patch Job Deployment Completion Pop-Up WindowSample - Update a Job with patches added from a parent job and show the Patch Job Deployment Completion Pop-Up Window

API Request

curl -X PATCH 
"<qualys_base_url>/pm/v1/deploymentjob/update/c08769ba-aa65-4b77-b224-f2c789ce7970"  
-H "accept: application/json"  
-H "Authorization: <<Jwt Token>>"  -H "Content-Type: application/json"

Request Body

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "bdc31e33-753e-4a10-a5e0-a74fc551034a",
  "schemaVersion": "1.0",
  "name": "Public API job with chained job and alwaysShowCompletedPrompt",
  "type": "Install",
  "status": "Disabled",
  "assetIds": null,
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": null,
  "approvedPatches": null,
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:35:04 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "During deployment userMessage",
    "description": "During deployment Description"
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "rebootOption user message",
      "description": "rebootOption description",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "Reboot Countdown usermessage",
      "description": "Reboot Countdown description"
    },
    "onComplete": {
      "userMessage": "On complete userMessage",
      "description": "On complete Description",
      "alwaysShowCompletedPrompt": true
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735641304754
  },
  "updatedBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735644874497
  },
  "deletedBy": {
    "user": null,
    "date": null
  },
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": true,
  "dynamicPatchesQQL": "",
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": 1,
  "platform": "Windows",
  "linkedJobId": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
  "chainedJobRule": [
    {
      "field": "postDeployAction",
      "actionIds": [
        "07eed865-d8e2-4cba-9c2a-27eeeef0598a"
      ],
      "threshold": "100",
      "condition": "Post Actions were successfully executed"
    }
  ],
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "11689a7c-ff8d-493f-87c8-5babcfaef512",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "Notepad detection script",
        "timeout": 180
      },
      "script": "JHc2ND1HZXQtSXRlbVByb3BlcnR5IEhLTE06XFNvZnR3YXJlXFdvdzY0MzJOb2RlXE1      pY3Jvc29mdFxXaW5kb3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFwqIHwgd2hlcmUtT2JqZWN0I      ERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGFkKysqJwokdzMyPUdldC1JdGVtUHJvcGVydHkgSEtMTT      pcU29mdHdhcmVcTWljcm9zb2Z0XFdpbmRvd3NcQ3VycmVudFZlcnNpb25cVW5pbnN0YWxsXCogIHwg      d2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGFkKysqJwppZiAoJHc2NCAtb3IgJH      czMikKewogICAgV3JpdGUtb3V0cHV0ICJOb3RlcGFkKysgaXMgYWxyZWFkeSBpbnN0YWxsZWQgb24g
      eW91ciBtYWNoaW5lLiIKfQpFbHNlewogICAgV3JpdGUtT3V0cHV0ICJOb3RlcGFkKysgaXMgbm90IG
      luc3RhbGxlZCBvbiB5b3VyIG1hY2hpbmUuIgp9IA==",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "733d3f6c-8ba4-4ba5-8a54-a57e8a264f11",
      "action": "Install Software",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "Install Notepad",
        "downloadURL": "https://github.com/notepad-plus-plus/notepad-plus-plus
        /releases/download/v8.6.2/npp.7.5.8.Installer.exe",
        "downloadProtocol": 0,
        "installMethod": 0,
        "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb",
        "timeout": 180
      },
      "detectionScript": "",
      "detectionScriptType": "ps",
      "script": "JHc2ND1HZXQtSXRlbVByb3BlcnR5IEhLTE06XFNvZnR3YXJlXFdvdzY0MzJOb2RlXE1pY3Jvc29mdFxXa      W5kb3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFwqIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb      3RlUGFkKysqJwokdzMyPUdldC1JdGVtUHJvcGVydHkgSEtMTTpcU29mdHdhcmVcTWljcm9zb2Z0XFdpbmRvd3NcQ3Vycm      VudFZlcnNpb25cVW5pbnN0YWxsXCogIHwgd2hlcmUtT2JqZWN0IERpc3BsYXlOYW1lIC1saWtlICdOb3RlUGFkKysqJwpp      ZiAoJHc2NCAtb3IgJHczMikKewogICAgV3JpdGUtb3V0cHV0ICJOb3RlcGFkKysgaXMgYWxyZWFkeSBpbnN0YWxsZWQgb24
      geW91ciBtYWNoaW5lLiIKfQpFbHNlewogICAgV3JpdGUtT3V0cHV0ICJOb3RlcGFkKysgaXMgbm90IGluc3RhbGxlZCBvbi
      B5b3VyIG1hY2hpbmUuIgp9IA==",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 0,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 2,
  "downloadRandomizeTimeUnit": "HOURS",
  "customPatchURLId": null,
  "isVulnContext": false,
  "remediationQids": null,
  "isAssetImported": false
} 

API Response

{
  "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
  "id": "bdc31e33-753e-4a10-a5e0-a74fc551034a",
  "schemaVersion": "1.0",
  "name": "Public API job with chained job and alwaysShowCompletedPrompt",
  "type": "Install",
  "status": "Disabled",
  "assetIds": null,
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": null,
  "approvedPatches": null,
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2024-12-31 10:35:04 AM",
  "recurring": false,
  "recurringWeekDays": null,
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": 6,
  "timeoutUnit": "HOURS",
  "preDeployment": {
    "userMessage": "",
    "description": "",
    "deferment": {
      "count": 3,
      "interval": 1,
      "intervalUnit": "HOURS"
    }
  },
  "duringDeployment": {
    "userMessage": "During deployment userMessage",
    "description": "During deployment Description"
  },
  "postDeployment": {
    "suppressReboots": false,
    "rebootHonorOnUserLogin": false,
    "rebootOption": {
      "userMessage": "rebootOption user message",
      "description": "rebootOption description",
      "deferment": {
        "count": 3,
        "interval": 1,
        "intervalUnit": "HOURS"
      }
    },
    "rebootCountdown": {
      "interval": 15,
      "intervalUnit": "MINUTES",
      "userMessage": "Reboot Countdown usermessage",
      "description": "Reboot Countdown description"
    },
    "onComplete": {
      "userMessage": "On complete userMessage",
      "description": "On complete Description",
      "alwaysShowCompletedPrompt": true
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735641304754
  },
  "updatedBy": {
    "user": {
      "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
      "name": "quays_rw17"
    },
    "date": 1735645281058
  },
  "deletedBy": null,
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": true,
  "dynamicPatchesQQL": "",
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": 1,
  "platform": "Windows",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "11689a7c-ff8d-493f-87c8-5babcfaef512",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "Notepad detection script",
        "timeout": 180
      },
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/11689a7c-ff8d-493f-87c8-5babcfaef512/Script",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "733d3f6c-8ba4-4ba5-8a54-a57e8a264f11",
      "action": "Install Software",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "Install Notepad",
        "downloadURL": "https://github.com/notepad-plus-plus/notepad-plus-plus
        /releases/download/v8.6.2/npp.7.5.8.Installer.exe",
        "downloadProtocol": 0,
        "installMethod": 0,
        "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb",
        "timeout": 180
      },
      "detectionScript": "",
      "detectionScriptType": "ps",
      "script": "bc023fd7-4290-f28f-8181-95a46f519f52/733d3f6c-8ba4-4ba5-8a54-a57e8a264f11/Script",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "applicableAssetCount": 0,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": null,
  "jobCategory": 3,
  "jobTriggerStatus": null,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": {
    "notificationTypes": {
      "email": true
    },
    "notificationConfigs": {
      "recipientEmails": "xxx@xxxx.com",
      "completedPercentage": "80"
    },
    "notificationEvents": {
      "onJobStart": true,
      "onJobComplete": false
    }
  },
  "linkedJobId": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
  "linkedToJob": [
    {
      "customerId": "bc023fd7-4290-f28f-8181-95a46f519f52",
      "id": "5b0fd130-52c8-473c-96b1-8f10ea7d4c13",
      "name": "only pre post",
      "type": "Install",
      "status": "Prepared",
      "createdBy": {
        "user": {
          "id": "c4c71f94-4ef6-7e6f-8260-11704fa58172",
          "name": "quays_rw17"
        },
        "date": 1727276515619
      },
      "linkedJobReferenceCount": 3,
      "schedule": "On-Demand",
      "previousRun": null,
      "nextRun": null,
      "chainedJobRule": [
        {
          "id": null,
          "field": "postDeployAction",
          "threshold": 100,
          "actionIds": [
            "07eed865-d8e2-4cba-9c2a-27eeeef0598a"
          ],
          "condition": "Post Actions were successfully executed",
          "actionDetails": [
            {
              "actionId": "07eed865-d8e2-4cba-9c2a-27eeeef0598a",
              "action": "Run Script",
              "actionType": "postdeploy",
              "params": {
                "actionItem": "post",
                "fileChecksum": "",
                "timeout": 180,
                "remediationScope": false
              },
              "script": "bc023fd7-4290-f28f-8181-95a46f519f52/07eed865-d8e2-4cba-9c2a-27eeeef0598a/Script",
              "scriptType": "ps",
              "actionLinkedToJob": false
            }
          ]
        }
      ]
    }
  ],
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 2,
  "downloadRandomizeTimeUnit": "HOURS",
  "customPatchURLId": null,
  "isVulnContext": false,
  "remediationQids": [],
  "isAssetImported": false
}