Create Deployment Policy

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Creates a new deployment policy template with deployment window, pre-deployment, and post-deployment configurations.

Request URL

https://{server-hostname}:8383/dcapi/patch/deploymentPolicy

Scope

PatchMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

- Request Body

application/json
JSON Object
Hide Sub-Attributes
templateIDlongOptional

Unique identifier of the deployment policy template

templateNamestringOptional

Name of the deployment policy template

templateDescstringOptional

Description of the deployment policy template

templateInUsebooleanOptional

Whether this template is currently in use

associatedModulebooleanOptional

Whether associated with a specific module

filesizelongOptional

File size associated with the template in bytes

deploymentDetailsJSON ObjectOptional

Deployment window configuration

Show Sub-Attributes
weekTypestringOptional

Week type for scheduling

deploymentOptionstringOptional

Deployment option type

enableStagingbooleanOptional

Whether staging is enabled

timeZonestringOptional

Timezone for deployment window (e.g., Asia/Kolkata)

deploymentWindowScheduleJSON ArrayOptional

List of deployment window schedule entries

Show Sub-Attributes
JSON Object
Show Sub-Attributes
startTimestringOptional

Start time in HH:mm format

stopTimestringOptional

Stop time in HH:mm format

daysarrayOptional

Days of the week (1-7)

weeksarrayOptional

Weeks of the month (1-5)

monthsarrayOptional

Months of the year (0-11)

datesarrayOptional

Dates of the month (1-31)

preDeploymentDetailsJSON ArrayOptional

List of pre-deployment activity configurations

Show Sub-Attributes
JSON Object
Show Sub-Attributes
configNamestringOptional

Configuration type: WOL_CONFIG, PRE_REBOOT_CONFIG, CUSTOM_SCRIPT_CONFIG, PRE_USER_NOTIFICATION_CONFIG

proceedOnFailurebooleanOptional

Continue deployment if this step fails

performNoDeploymentSuccessbooleanOptional

Skip deployment on success

isWOLEnabledbooleanOptional

Enable Wake-on-LAN (WOL_CONFIG only)

enableRebootNotifyUserbooleanOptional

Notify user before pre-reboot (PRE_REBOOT_CONFIG)

excludeRebootForServersbooleanOptional

Exclude servers from reboot (PRE_REBOOT_CONFIG)

skipRebootIfNotRequiredbooleanOptional

Skip reboot when not required (PRE_REBOOT_CONFIG)

rebootNotificationTitlestringOptional

Reboot notification dialog title (PRE_REBOOT_CONFIG)

rebootNotificationMessagestringOptional

Reboot notification message (PRE_REBOOT_CONFIG)

rebootNotificationTimeoutstringOptional

Reboot notification timeout in seconds (PRE_REBOOT_CONFIG)

scriptNamestringOptional

Script file name (CUSTOM_SCRIPT_CONFIG)

scriptDescriptionstringOptional

Description of the script (CUSTOM_SCRIPT_CONFIG)

argumentsstringOptional

Script arguments (CUSTOM_SCRIPT_CONFIG)

exitCodesstringOptional

Comma-separated expected exit codes (CUSTOM_SCRIPT_CONFIG)

scriptIDlongOptional

Unique script identifier (CUSTOM_SCRIPT_CONFIG)

platformIDstringOptional

Platform: 1=Windows, 2=Mac, 3=Linux (CUSTOM_SCRIPT_CONFIG)

dependencyFilesJSON ArrayOptional

List of dependency files (CUSTOM_SCRIPT_CONFIG)

Show Sub-Attributes
JSON Object
Show Sub-Attributes
fileNamestringOptional

Dependency file name

fileIDlongOptional

Unique file identifier

fileURLstringOptional

URL to the dependency file

fileStatuslongOptional

Status of the file

deploymentTitlestringOptional

Notification title (PRE_USER_NOTIFICATION_CONFIG)

deploymentMessagestringOptional

Notification message (PRE_USER_NOTIFICATION_CONFIG)

deploymentNotificationTimeoutstringOptional

Notification timeout in seconds (PRE_USER_NOTIFICATION_CONFIG)

enableAllowSkipDeploymentbooleanOptional

Allow users to skip deployment (PRE_USER_NOTIFICATION_CONFIG)

enableForceDeploymentIfSkippedbooleanOptional

Force deployment if user skipped (PRE_USER_NOTIFICATION_CONFIG)

forceDeploymentAfterNDaysstringOptional

Days after which to force deployment (PRE_USER_NOTIFICATION_CONFIG)

initiateDeploymentWithoutNotifybooleanOptional

Start deployment without notification (PRE_USER_NOTIFICATION_CONFIG)

systemIdleTimeoutstringOptional

System idle timeout in seconds (PRE_USER_NOTIFICATION_CONFIG)

enableProgressbooleanOptional

Show deployment progress (PRE_USER_NOTIFICATION_CONFIG)

postDeploymentDetailsJSON ArrayOptional

List of post-deployment activity configurations

Show Sub-Attributes
JSON Object
Show Sub-Attributes
configNamestringOptional

Configuration type: CUSTOM_SCRIPT_CONFIG, POST_REBOOT_SHUTDOWN_CONFIG

proceedOnFailurebooleanOptional

Continue if this step fails

performNoDeploymentSuccessbooleanOptional

Skip on success

scriptNamestringOptional

Script file name (CUSTOM_SCRIPT_CONFIG)

scriptDescriptionstringOptional

Description of the script (CUSTOM_SCRIPT_CONFIG)

argumentsstringOptional

Script arguments (CUSTOM_SCRIPT_CONFIG)

exitCodesstringOptional

Expected exit codes (CUSTOM_SCRIPT_CONFIG)

scriptIDlongOptional

Script identifier (CUSTOM_SCRIPT_CONFIG)

platformIDstringOptional

Platform: 1=Windows, 2=Mac, 3=Linux (CUSTOM_SCRIPT_CONFIG)

dependencyFilesJSON ArrayOptional

Dependency files (CUSTOM_SCRIPT_CONFIG)

Show Sub-Attributes
JSON Object
Show Sub-Attributes
fileNamestringOptional

Dependency file name

fileIDlongOptional

Unique file identifier

fileURLstringOptional

URL to the dependency file

fileStatuslongOptional

Status of the file

rebootPreferencestringOptional

0=Do Nothing, 1=Reboot, 2=Shutdown (POST_REBOOT_SHUTDOWN_CONFIG)

rebootMethodstringOptional

1=Force, 2=Postpone (POST_REBOOT_SHUTDOWN_CONFIG)

forceRebootOptionstringOptional

1=Immediately, 2=Window Specified (POST_REBOOT_SHUTDOWN_CONFIG)

rebootNotificationTitlestringOptional

Reboot notification title (POST_REBOOT_SHUTDOWN_CONFIG)

rebootNotificationMessagestringOptional

Reboot notification message (POST_REBOOT_SHUTDOWN_CONFIG)

rebootNotificationTimeoutstringOptional

Notification timeout in seconds (POST_REBOOT_SHUTDOWN_CONFIG)

skipRebootIfNotRequiredbooleanOptional

Skip reboot when not required (POST_REBOOT_SHUTDOWN_CONFIG)

excludeRebootForServersbooleanOptional

Exclude servers from reboot (POST_REBOOT_SHUTDOWN_CONFIG)

rebootWindowScheduleJSON ArrayOptional

Reboot window schedule (POST_REBOOT_SHUTDOWN_CONFIG)

Show Sub-Attributes
JSON Object
Show Sub-Attributes
startTimestringOptional

Start time in HH:mm format

stopTimestringOptional

Stop time in HH:mm format

daysarrayOptional

Days of the week (1-7)

weeksarrayOptional

Weeks of the month (1-5)

monthsarrayOptional

Months of the year (0-11)

datesarrayOptional

Dates of the month (1-31)

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/dcapi/patch/deploymentPolicy \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --data '{"preDeploymentDetails":[{"configName":"WOL_CONFIG","performNoDeploymentSuccess":false,"isWOLEnabled":true,"proceedOnFailure":true}],"deploymentDetails":{"enableStaging":false,"weekType":1,"deploymentOption":1,"timeZone":"Asia/Kolkata","deploymentWindowSchedule":[{"weeks":["1","2","3","4"],"months":["0","1","2"],"days":["1","2","3","4","5"],"startTime":"09:00","stopTime":"18:00","dates":["1","15"]}]},"postDeploymentDetails":[{"configName":"POST_REBOOT_SHUTDOWN_CONFIG","rebootNotificationMessage":"System will reboot after patching.","rebootPreference":1,"rebootNotificationTitle":"Reboot Required","rebootMethod":1,"rebootWindowSchedule":[{"days":["6","7"],"startTime":"02:00","stopTime":"05:00"}],"skipRebootIfNotRequired":true,"forceRebootOption":1,"rebootNotificationTimeout":300,"excludeRebootForServers":true}],"templateName":"My Deployment Policy","templateDesc":"Description of the policy","filesize":1024}'

Sample Request Body

Create a deployment policy with deployment window and pre/post activities

Copied!
  {
    "preDeploymentDetails": [
      {
        "configName": "WOL_CONFIG",
        "performNoDeploymentSuccess": false,
        "isWOLEnabled": true,
        "proceedOnFailure": true
      }
    ],
    "deploymentDetails": {
      "enableStaging": false,
      "weekType": 1,
      "deploymentOption": 1,
      "timeZone": "Asia/Kolkata",
      "deploymentWindowSchedule": [
        {
          "weeks": [
            "1",
            "2",
            "3",
            "4"
          ],
          "months": [
            "0",
            "1",
            "2"
          ],
          "days": [
            "1",
            "2",
            "3",
            "4",
            "5"
          ],
          "startTime": "09:00",
          "stopTime": "18:00",
          "dates": [
            "1",
            "15"
          ]
        }
      ]
    },
    "postDeploymentDetails": [
      {
        "configName": "POST_REBOOT_SHUTDOWN_CONFIG",
        "rebootNotificationMessage": "System will reboot after patching.",
        "rebootPreference": 1,
        "rebootNotificationTitle": "Reboot Required",
        "rebootMethod": 1,
        "rebootWindowSchedule": [
          {
            "days": [
              "6",
              "7"
            ],
            "startTime": "02:00",
            "stopTime": "05:00"
          }
        ],
        "skipRebootIfNotRequired": true,
        "forceRebootOption": 1,
        "rebootNotificationTimeout": 300,
        "excludeRebootForServers": true
      }
    ],
    "templateName": "My Deployment Policy",
    "templateDesc": "Description of the policy",
    "filesize": 1024
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
templateIDlong

Unique identifier of the created deployment policy template

statusstring

Operation result: success

- HTTP code 413

Response Body - application/json
JSON Object
Hide Sub-Attributes
error_codestring

Error code: CONFIG_DEPLOY_POLICY_INVALID for storage limit exceeded

error_descriptionstring

Storage limit exceeded message

Possible Response Codes

200HTTP code
413HTTP code

Sample Response: HTTP 200

Deployment policy created

Copied!
  {
    "templateID": 12345,
    "status": "success"
  }
                
Show full

Sample Response: HTTP 413

Storage limit exceeded

Copied!
  {
    "error_description": "Storage limit exceeded",
    "error_code": "CONFIG_DEPLOY_POLICY_INVALID"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.