Get Deployment by Job ID

Use this API to get details of the deployment job based on the provided deployment job ID.

GET/pm/v1/deploymentjob/{deploymentJobId}

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

deploymentJobId

Mandatory

string

Deployment job ID for which you want to fetch details.

Sample - Get details for a Windows job using the job IDSample - Get details for a Windows job using the job ID

API request

    
curl -X GET 
"https://<QualysBaseURL>/pm/v1/deploymentjob/330b9957-9434-4042-9d67-9a3260b6de45"
 -H "accept: application/json" 
-H "Authorization: Bearer <<jwt token>>"   

Response

   {
  "customerId": "2e5bc89e-4670-d067-83f2-b873a00f4531",
  "id": "e8eff303-9532-4a70-a399-b9dec57b4918",
  "schemaVersion": "1.0",
  "name": "Public API on demand Window job with specific patches",
  "type": "Install",
  "status": "Disabled",
  "assetIds": [
    "38aa48ca-a53f-4591-af01-8bce75de4ce7"
  ],
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": null,
  "approvedPatches": [
    "444ba31a-0f94-3199-870e-ef8ab1a5a477",
    "b91fca0e-2a07-3155-909c-fc50ba1863ed"
  ],
  "disabledPatches": null,
  "patchCount": 2,
  "scheduleType": "On-demand",
  "startDateTime": "2025-4-14 01:45:48 PM",
  "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": false
    }
  },
  "description": "Created via public API",
  "createdBy": {
    "user": {
      "id": "0f9775fd-c16e-51c0-83c4-c98a0f23c298",
      "name": "quays_zs93",
      "fullName": "Shilpa Sutar"
    },
    "date": 1744638348039
  },
  "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,
  "assetDetectionsQQL": null,
  "platform": "Windows",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "e4fac150-804b-4857-ae9b-606d1b136b20",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "Notepad detection script",
        "timeout": 180
      },
      "script": "JHc2ND1HZXQtSXRlbVbHNlewogI.....Kys9IA==",
      "scriptType": "ps",
      "actionLinkedToJob": false
    },
    {
      "actionId": "b1dfc7cc-7c7f-482a-b5b6-e9a9bf2dd460",
      "action": "Change Registry Key",
      "actionType": "predeploy",
      "params": {
        "actionItem": "DisableUpdate",
        "regKey": "SEtFWV9MT0NBTF9NQUNISU5FXFNPRlRXQVJFXFpvb21cTVNJ",
        "regValueType": "REG_SZ",
        "regValue": "dHJ1ZQ==",
        "regKeyAddNew": false,
        "timeout": 180
      },
      "actionLinkedToJob": false
    },
    {
      "actionId": "dc8fa457-5c41-4508-a682-725df3c05af8",
      "action": "System Reboot",
      "actionType": "predeploy",
      "params": {
        "actionItem": "Reboot",
        "timeout": 180
      },
      "script": "",
      "scriptType": "ps",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": [
    {
      "actionId": "b479d640-189a-48d8-b4e1-6f79f034f8f3",
      "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": "JHc2ND1H...c3RhbGxlZCBvbiB5b3VyIG1hY2hpbmUuIgp9IA==",
      "scriptType": "ps",
      "actionLinkedToJob": false
    },
    {
      "actionId": "0698206c-76fd-4983-96e7-cc5059456249",
      "action": "Uninstall Software",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "Uninstall Chrome",
        "unInstallSoftwareDisplayName": "Google Chrome",
        "unInstallSoftwareVersion": "109.0.5414.168",
        "unInstallSoftwareVersionMatch": "Equals",
        "unInstallRegistryKey": "SEtFWV9MT0NBTF9NQUNISU5FXFNPRlRXQVJFXFdPVzY0MzJOb2RlXE1pY3Jvc29mdFxXaW5kb3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFxHb29nbGUgQ2hyb21l",
        "timeout": 180
      },
      "actionLinkedToJob": false
    },
    {
      "actionId": "9a09a201-54d3-4d40-9256-291fc02e63c4",
      "action": "Install Software",
      "actionType": "postdeploy",
      "params": {
        "actionItem": "Install Notepad with Installer based option",
        "downloadURL": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.6.2/npp.7.5.8.Installer.exe",
        "downloadProtocol": 0,
        "installMethod": 1,
        "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb",
        "timeout": 180
      },
      "detectionScript": "",
      "detectionScriptType": "ps",
      "script": "",
      "scriptType": "ps",
      "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": "abc@gmail.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": 2,
  "downloadRandomizeTimeUnit": "HOURS",
  "customPatchURLId": null,
  "isVulnContext": null,
  "remediationQids": null,
  "isAssetImported": false,
  "hostIsolationConfig": null,
  "quarantineAssetRequestNotification": null,
  "enableReattemptFailedPatches": true,
  "reattemptFailedPatches": {
    "noOfReattempts": 5,
    "exponentialBackoffInterval": 15
  }
}

Sample - Get details for Linux job using the job ID with MakeCache pre-actionSample - Get details for Linux job using the job ID with MakeCache pre-action

API Request

curl -X GET
"<qualys_base_url>/pm/v1/deploymentjob/16be09aa-5415-4a58-8295-8a4ac8db6f26" 
-H "accept: application/json" 
-H "Authorization: Bearer <<jwt token>>"

API Response

{
  "customerId": "8ac1558c-cbdf-c133-80c6-0fcf7d68e79c",
  "id": "16be09aa-5415-4a58-8295-8a4ac8db6f26",
  "schemaVersion": "1.0",
  "name": "Demo_Job_MakeCache",
  "type": "Install",
  "status": "Prepared",
  "assetIds": [
    "08a028e6-7e1d-4dbf-b040-48d9059dee08"
  ],
  "assetTagIds": null,
  "matchAllTagIds": null,
  "exclusionTagIds": null,
  "exclusionAssetIds": null,
  "coAuthorUserIds": null,
  "approvedPatches": null,
  "disabledPatches": null,
  "patchCount": 0,
  "scheduleType": "On-demand",
  "startDateTime": "2025-3-19 05:05:43 AM",
  "recurring": false,
  "recurringWeekDays": "",
  "dayOfMonth": null,
  "recurringDayOfMonth": null,
  "recurringWeekDayOfMonth": null,
  "timezoneType": "SPECIFIC_TZ",
  "timezone": "UTC",
  "timeout": -1,
  "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": "",
  "createdBy": {
    "user": {
      "id": "9ea81ebb-1830-5f23-8389-2921ae95238f",
      "name": "quaysxkm14",
      "fullName": "Karan Mehta"
    },
    "date": 1742360595685
  },
  "updatedBy": {
    "user": {
      "id": "9ea81ebb-1830-5f23-8389-2921ae95238f",
      "name": "quaysxkm14",
      "fullName": null
    },
    "date": 1742360816864
  },
  "deletedBy": {
    "user": null,
    "date": null
  },
  "assetCount": null,
  "opportunisticDownloads": false,
  "filterType": "Any",
  "exclusionFilterType": "Any",
  "taggedAssetCount": 0,
  "minimizeWindow": false,
  "dynamicPatchesQQL": "",
  "isDynamicPatchesQQL": false,
  "dynamicQQLType": 1,
  "platform": "Linux",
  "continueOnPatchFailure": false,
  "preDeployActions": [
    {
      "actionId": "3b6d5ef7-c165-46f4-b29f-3d978f2b8c6d",
      "action": "Run Script",
      "actionType": "predeploy",
      "params": {
        "actionItem": "makecache Pre-Action",
        "timeout": 180,
        "remediationScope": false,
        "defaultScriptType": "MakeCache"
      },
      "script": "IyEvYmluL2Jhc2gKREFURT0kKGRhdGUgKyVGKQpMT0dCQVNFPSIvdG1wIgpVUERBVEVfTE9HPSIke0xPR0JBU0V9L3VwZGF0ZWxvZ18ke0RBVEV9LmxvZyIKRVJST1JfTE9HPSIke0xPR0JBU0V9L2Vycm9ybG9nXyR7REFURX0ubG9nIgpUUkFOU0FDVElPTl9JRD0iL3Vzci9sb2NhbC9xdWFseXMvY2xvdWQtYWdlbnQvdHJhbnNhY3Rpb25tcG9yYXJ5IGZpbGUKICAgICAgICAgcm0gL3RtcC95dW1faGlzdG9yeV9pbmZvLnR4dAogICAgICAgICBleGl0IDEKICAgIGZpCiAgICAjIENsZWFuIHVwIHRlbXBvcmFyeSBmaWxlCiAgICBybSAvdG1wL3l1bV9oaXN0b3J5X2luZm8udHh0Cn0KIyBNYWluIHNjcmlwdCBleGVjdXRpb24KY2hlY2tfb3MKaWYgW1sgJD8gLWVxIDAgXV07IHRoZW4KICAgIHNldF95dW0KICAgIHVwZGF0ZV9zeXN0ZW0KICAgIGV4dHJhY3RfbGFzdF90cmFuc2FjdGlvbl9pZAogICAgY2hlY2tfbGFzdF90cmFuc2FjdGlvbgplbHNlCiAgICBlY2hvICJFeGl0aW5nIHNjcmlwdCBhcyBPUyBpcyBub3QgUkhFTC1iYXNlZCIKICAgIGV4aXQgMQpmaQ==",
      "scriptType": "sh",
      "actionLinkedToJob": false
    }
  ],
  "postDeployActions": null,
  "applicableAssetCount": 1,
  "monthlyRecurringType": null,
  "patchTuesdayPlusXDays": null,
  "recurringLastDayOfMonth": false,
  "jobCategory": 3,
  "jobTriggerStatus": 1,
  "completionPercent": null,
  "totalAssetCount": null,
  "assetResultReceivedCount": null,
  "jobSource": 3,
  "readOnly": false,
  "notification": null,
  "linkedJobId": null,
  "linkedToJob": null,
  "linkedJobs": null,
  "jobStartCountdown": null,
  "passwordAction": null,
  "subCategory": "Patch",
  "additionalDynamicQQLType": null,
  "additionalDynamicPatchesQQL": null,
  "downloadRandomizeTime": 0,
  "downloadRandomizeTimeUnit": "MINUTES",
  "customPatchURLId": null,
  "isVulnContext": false,
  "remediationQids": null,
  "isAssetImported": false,
  "hostIsolationConfig": null,
  "quarantineAssetRequestNotification": null,
  "enableReattemptFailedPatches": null,
  "reattemptFailedPatches": null
}