Use this API to create a deployment job by providing inputs in the request body. When you create a Windows or Linux deployment job and the request is successful, you get a 201 response code.
While creating Windows or Linux jobs, you can add patches from another job (which you can call a parent or a linked job). 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.
You can choose to always show the Patch Job Deployment Completion Pop-Up Window on patched machines, for Windows deployment jobs regardless of whether the patches are failed, skipped, or successfully deployed.
Parameter |
Mandatory/Optional |
Data Type |
Description |
|
---|---|---|---|---|
approvedPatches |
Optional |
string |
Specify a list of patches that you want to add to the job |
|
filterType |
Optional |
string |
Specify the relationship between selected tags. Available values: Any, All Default value: Any |
|
exclusionFilterType |
Optional |
string |
Specify the relationship between excluded tags. Available values: Any, All Default value: Any |
|
scheduleType |
Mandatory |
string |
Specify the schedule to run the job. Available values: On-demand, Once, Daily, Weekly, and Monthly. |
|
startDateTime |
Optional: On-demand job. Mandatory: Other job types. |
string |
Specify the time to start the job. Format example: 2022-2-20 01:18:30 PM |
|
recurring |
Optional |
Specify if the job is recurring. Available values: True, False |
||
dayOfMonth |
Optional |
string |
Specify a day between 1 to 31 to run the job. |
|
recurringLastDayOfMonth |
Optional |
Specify if you want to job to run on the last day of the month. Available values: True, False |
||
monthlyRecurringType |
Optional |
string |
Specify if you want to run the job on the Patch Tuesday schedule Available values: 0 (not - Patch Tuesday), and 1 (Patch Tuesday). Default value: 0 |
|
patchTuesdayPlusXDays |
Optional |
string |
Specify the value to set the schedule to run the job up to 27 days before or after Patch Tuesday. |
|
recurringDayOfMonth |
Optional |
string |
Specify a value between 1 to 5 to run the job on a specific day of a week in the month. For example, the second Monday of the month. |
|
recurringWeekDayOfMonth |
Optional |
string |
Specify a value between 0-6 to run a job on a specific day of the week. For example, 0=Sunday, 1=Monday, and so on. |
|
recurringWeekDays |
Optional |
string |
Replace 0 with 1 in the "0,0,0,0,0,0,0" sequence to run the job on a specific day of the week. For example, "0,0,1,0,0,0,0" to run the job on Tuesday. |
|
dynamicQQLType |
Optional |
string |
Specify if the job is QQL type. Available values: 0 (no QQL), 1 (Patch QQL), 2 (Vulnerability QQL) Default value: 0 |
|
isDynamicPatchesQQL |
Optional |
Boolean |
Specify if the QQL-job uses Patches tokens. Available values: True, False |
|
continueOnPatchFailure |
Optional |
Boolean (Linux job only) |
Specify if the Linux installation job should run after a patch in the package fails to install. Available values: True, False |
|
preDeployment |
Optional |
string |
Specify a message you want to show before the deployment starts. If you don't want to show a message, keep the value as null. |
|
duringDeployment |
Optional |
string |
Specify a message you want to show before the deployment starts. If you don't want to show a message, keep the value null. |
|
postDeployment |
Optional |
string |
Specify a message you want to show after the job is deployed. If you don't want to show a message, keep the value null. |
|
onComplete |
Optional |
string |
Specify a message you want to show after the job is complete. If you don't want to show a message, keep the value null. |
|
rebootCountdown |
Optional |
string |
Specify a message you want to show before reboot countdown starts. If you don't want to show a message, keep the value null. |
|
rebootOption |
Optional |
string |
Specify a message you want to show when the reboot is complete. If you don't want to show a message, keep the value null. |
|
suppressReboots |
Optional |
string |
Specify if you want to allow users to suppress a reboot after the job. Available values: True, False Default value: False |
|
platform |
Optional |
string |
Specify the platform type. - Available values: Linux, Windows - Default value: Windows |
|
minimizeWindow |
Optional |
Boolean (Windows job only) |
Specify if you want to allow users to minimize the job window. Available values: True, False Default value: False |
|
type |
Mandatory |
string |
Specify the job type. Available values: Install (Windows and Linux), Rollback (Windows and Linux) Default value: Install |
|
status |
Optional |
string |
Specify the job status. Available values: Disabled, Enabled Default value: Disabled |
|
timeout/timeoutUnit |
Optional |
string |
Specify if the job should time out in hours (1 to 168) or minutes (1 to 10080) |
|
timezoneType |
Optional |
string |
Specify if you want to run the job in the agent time zone of a specific time zone. Available values: AGENT_TZ, SPECIFIC_TZ |
|
timezone |
Optional |
string |
Specify the time zone in which you want to run the job. To refer to the available time zones, see List of Time Zones. |
|
opportunisticDownloads |
Optional |
Boolean (Windows job only) |
Specify if you want the agent to attempt to download the patches before the job starts. Available values: True, False Default value: False |
|
action |
Optional |
string (Windows job only) |
Specify if you want to execute an action before or after a job runs. Available values (pre-actions): Run Script, Install Software, Change Registry Key, Uninstall Software, and System Reboot.
Available values (post-actions): Run Script, Install Software, Change Registry Key, and Uninstall Software. |
|
script/detectionScript |
Optional |
string (Windows job only) |
Specify the Base 64 encoded script that you want to run as an action |
|
scriptType |
Optional |
string (Windows job only) |
Specify the Powershell script that you want to run as a part of the job. |
|
detectionScriptType |
Optional |
string (Windows job only) |
Specify the Powershell script that you want to run as a part of the job |
|
linkedJobId |
Optional |
string |
Specify a job ID you want to link. If you do not want to link a job, keep the value "null". |
|
notification |
- |
Optional |
- |
Notify the user at the start and end of the job. |
notificationTypes |
Boolean |
Enter "true" for email. |
||
notificationConfigs
|
|
Enter the email IDs of recipients and the completion percentage between 1 to 100. If you do not want to notify, keep the value null. |
||
notificationEvents |
Boolean |
Enter "true" for at least one of the following parameters: "onJobStart" or "onJobComplete". Available values: true, false |
||
downloadRandomizeTime
|
Optional
|
string |
Provide the job randomize time in hours or minutes. - This value must be less than the timeout/timeoutUnit.(Patch Window)
|
|
downloadRandomizeTimeUnit |
Optional
|
string |
Provide the download Randomize time unit as "HOURS" or "MINUTES". |
|
additionalDynamicQQLType
|
Optional
|
string
|
Specify if the job is QQL type.
|
|
customPatchURLId |
Optional |
Integer |
Specify the customPatchURLId value. This is nothing but the "id" value received from the Fetch Custom Patch Download URLs API. |
|
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 |
|
chainedJobRule |
- |
Optional
|
string
|
Specify the 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 |
string |
Specify the value: postDeployAction |
||
actionIds |
Integer |
Specify the parent job post-action ID. You can provide a single or multiple IDs as per your requirement. |
||
threshold |
Integer |
The threshold in hours. Available values: 1 to 100 |
||
condition |
string |
Specify the condition: Post Actions were successfully executed |
||
preDeployActions |
action |
Optional |
String |
Specify the action. |
|
actionItem |
Optional |
String |
Specify the actionItem. |
|
defaultScriptType |
Optional |
String |
Specify the default script type. |
|
scriptType |
Optional |
String |
Specify the scriptType. |
|
script |
Optional |
String |
The value must be empty. |
reattemptFailedPatches |
Optional |
Boolean |
Specify the value as True or false. |
|
noOfReattempts |
Optional |
Integer |
Specify the number of re-attempts. Provide values between 1-5. |
|
exponentialBackoffInterval |
Optional |
Integer |
Specify valid backoff interval between retries. Provide values between 1 to 15. |
API request
Request Body - Specify the inputs to create a deployment job
{ "name": "Public API on demand Window job with specific patches", "description": "Created via public API", "approvedPatches": [ "444ba31a-0f94-3199-870e-ef8ab1a5a477", "b91fca0e-2a07-3155-909c-fc50ba1863ed" ], "assetIds": [ "38aa48ca-a53f-4591-af01-8bce75de4ce7" ], "assetTagIds": [], "filterType": "Any", "exclusionAssetIds": [], "exclusionFilterType": "Any", "exclusionTagIds": [], "coAuthorUserIds": [], "preDeployment": null, "duringDeployment": { "description": "During deployment Description", "userMessage": "During deployment userMessage" }, "postDeployment": { "onComplete": { "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, "enableReattemptFailedPatches": true, "reattemptFailedPatches": { "noOfReattempts": 5, "exponentialBackoffInterval": 15 }, "downloadRandomizeTime": 2, "downloadRandomizeTimeUnit": "HOURS", "notification": { "notificationTypes": { "email": true }, "notificationConfigs": { "recipientEmails": "abc@gmail.com", "completedPercentage": 80 }, "notificationEvents": { "onJobStart": true, "onJobComplete": false } }, "preDeployActions": [ { "action": "Run Script", "params": { "actionItem": "Notepad detection script" }, "script": "CJOb3RlcGFkKysgaXMgbm90IG.....luc3RhbGxlZCBvbiB5b3VyIG1hY2hpbmUuIgp9IA", "scriptType": "ps" }, { "action": "Change Registry Key", "params": { "actionItem": "DisableUpdate", "regKey": "SEtFWV9MT0NBTF9NQUNISU5FXFNPRlRXQVJFXFpvb21cTVNJ", "regValueType": "REG_SZ", "regValue": "dHJ1ZQ==", "regKeyAddNew": false }, "scriptType": "ps" }, { "action": "System Reboot", "params": { "actionItem": "Reboot" } } ], "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": "JHcNlewogICAgV3JpdG.....vbiB5b3VyIG1hY2hpbmUuIgp9IA==", "scriptType": "ps", "detectionScript": "", "detectionScriptType": "ps" }, { "action": "Uninstall Software", "params": { "actionItem": "Uninstall Chrome", "unInstallRegistryKey": "SEtFWV9MT0NBTF9NQUNISU5FXFNPRlRXQVJFXFdPVzY0MzJOb2RlXE1pY3Jvc29mdFxXaW5kb3dzXEN1cnJlbnRWZXJzaW9uXFVuaW5zdGFsbFxHb29nbGUgQ2hyb21l", "unInstallSoftwareDisplayName": "Google Chrome", "unInstallSoftwareVersion": "109.0.5414.168", "unInstallSoftwareVersionMatch": "Equals" }, "scriptType": "ps" }, { "action": "Install Software", "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", "fileChecksum": "613f36bf5e98be7e56b7ea0c678cfb8534077c2ec1cbe839a854dd0a60278ebb", "installMethod": 1 }, "detectionScript": "", "detectionScriptType": "ps", "script": "", "scriptType": "ps" } ] }
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": [], "matchAllTagIds": null, "exclusionTagIds": [], "exclusionAssetIds": [], "coAuthorUserIds": [], "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": "2e5bc89e-4670-d067-83f2-b873a00f4531/e4fac150-804b-4857-ae9b-606d1b136b20/Script", "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": "2e5bc89e-4670-d067-83f2-b873a00f4531/b479d640-189a-48d8-b4e1-6f79f034f8f3/Script", "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 } }
API request
Request Body - Specify the inputs to create a QQL-based Windows deployment job for Patch Tuesday without actions
Response
API request
Request Body - Specify the inputs to create a uninstall job
Response
API request
Request Body - Specify the inputs to create a Linux deployment job
Response
API Request
Request Body
API Response
{ "customerId": "8ac1558c-cbdf-c133-80c6-0fcf7d68e79c", "id": "8df80cf0-e24c-4d7c-877f-10700250c906", "schemaVersion": "1.0", "name": "Demo_MakeCache", "type": "Install", "status": "Enabled", "assetIds": [ "08a028e6-7e1d-4dbf-b040-48d9059dee08" ], "assetTagIds": [], "matchAllTagIds": [], "exclusionTagIds": [], "exclusionAssetIds": [], "coAuthorUserIds": [], "approvedPatches": [], "disabledPatches": null, "patchCount": 0, "scheduleType": "On-demand", "startDateTime": "2025-3-19 04:59:17 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": 1742360357346 }, "updatedBy": { "user": null, "date": null }, "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": "926ff25c-e1c4-4613-a446-53268fed1b52", "action": "Run Script", "actionType": "predeploy", "params": { "actionItem": "makecache Pre-Action", "timeout": 180, "remediationScope": false, "defaultScriptType": "MakeCache" }, "script": "default/MakeCache/makecache", "scriptType": "sh", "actionLinkedToJob": false } ], "postDeployActions": null, "applicableAssetCount": 1, "monthlyRecurringType": null, "patchTuesdayPlusXDays": null, "recurringLastDayOfMonth": false, "jobCategory": 3, "jobTriggerStatus": null, "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": [], "isAssetImported": false, "hostIsolationConfig": null, "quarantineAssetRequestNotification": null, "enableReattemptFailedPatches": null, "reattemptFailedPatches": null }
API request
Request Body - Specify the inputs to create a Linux rollback job
Response
API request
Request Body - Specify the inputs to create a Job with patches added from a parent job and show the Patch Job Deployment Completion Pop-Up Window
Response