Create an APD Task

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 Automated Patch Deployment (APD) task.

Request URL

https://{serverurl}/api/1.4/patch/createAPDTask Copied!

Scope

DesktopCentralCloud.PatchMgmt.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
settingsJSON ObjectOptional

Automated Patch Deployment task settings

Show Sub-Attributes
taskNamestringOptional

Name of the patch task (mandatory field). Example: windows create task

descriptionstringOptional

Short description of the task purpose. Example: task for windows

platformstringOptional

Target OS platform for deployment (Windows, Mac, or Linux). Example: Windows

security_updatebooleanOptional

Includes security updates that fix vulnerabilities (applicable for Windows, Mac, Linux). Example: true

security_update_severitiesOptional

Severities of security updates to include. Example: [Critical, Important]

non_security_updatebooleanOptional

Includes non-security updates that fix functional or performance issues (applicable for Windows and Mac only). Example: true

non_security_update_severitiesOptional

Severities of non-security updates to include. Example: [Moderate, Low]

thirdparty_updatebooleanOptional

Includes updates from external vendors or third-party applications (applicable for Windows, Mac, Linux). Example: true

thirdparty_update_severitiesOptional

Severities of third-party updates to include. Example: [Critical]

definition_updatebooleanOptional

Includes definition updates like antivirus or Windows Defender signatures (Windows only). Example: true

servicepack_updatebooleanOptional

Includes cumulative sets of fixes and enhancements, typically service packs (Windows only). Example: true

featurepack_updatebooleanOptional

Includes feature packs that add new capabilities (Windows only). Example: true

failure_notify_enablebooleanOptional

Enable or disable failure notifications for deployment. Example: false

NeedFailureAttachmentbooleanOptional

Whether to attach failure reports in notification emails. Example: true

report_notify_enablebooleanOptional

Enable or disable success report notifications. Example: false

NeedReportAttachmentbooleanOptional

Whether to attach success reports in notification emails. Example: true

attachmentFormatForFailurestringOptional

File format of failure report attachment. Example: xls

attachmentFormatForReportstringOptional

File format of success report attachment. Example: pdf

rollupsbooleanOptional

Includes rollup updates that bundle multiple patches into one package (Windows only). Example: true

driverbooleanOptional

Includes driver updates (Windows only). Example: true

preview_rollupsbooleanOptional

Includes preview rollup updates (Windows only). Example: true

optional_updatesbooleanOptional

Includes optional updates such as non-critical enhancements. At least one applicable update type must be selected for the chosen platform. Example: true

include_tp_app_typestringOptional

Defines how third-party applications should be patched (All, Specific, or All Except). Example: Patch Specific Applications

include_os_app_typestringOptional

Defines how OS applications should be patched (All, Specific, or All Except). Example: Patch All Applications Except

os_applicationsstringOptional

List of OS applications to include or exclude during patching. Example: Windows Defender x64

tp_applicationsstringOptional

List of third-party applications to include or exclude during patching. Example: Notepad++

delay_deployment_by_approved_timestringOptional

Delay deployment by specified time after patch approval (in hours/days). Example: 5

delay_deployment_by_released_timestringOptional

Delay deployment by specified time after patch release (in hours/days). Example: 5

EXPIRY_TIMEstringOptional

Task expiry date and time after which deployment becomes invalid (MM/DD/YYYY, HH:MM). Example: 08/29/2018, 00:00

report_notify_durationintegerOptional

Interval in days for sending success report notifications. Example: 3

failure_notify_durationintegerOptional

Interval in days for sending failure notifications. Example: 1

emailstringOptional

Recipient email address for receiving notifications and reports. Example: user@example.com

templateNamestringOptional

Name of the deployment policy to use (mandatory field). Example: Force reboot excluding servers. Get the names from Get Deployment Policies api

target_liststringOptional

Name of the target for deployment, matching target_type. Get domain names from Get Domains, remote office names from Get Remote Offices, or custom group names from Get Custom Groups api. Example: Local Office

target_typestringOptional

Target type for deployment (DOMAIN, REMOTE_OFFICE, CUSTOM_GROUP). Example: REMOTE_OFFICE

deadlineSettingsJSON ObjectOptional

Deadline configuration details for patch deployment

Show Sub-Attributes
forceRebootOptionstringOptional

2->Force Reboot outside the deployment/reboot window, 1-Force reboot within the deployment/reboot window, 0->Disable force reboot

preferredDaysintegerOptional

Specify after how many days the unpatched system should be

enableDeadlinebooleanOptional

true-To enable deadline settings, false-To disable deadline settings.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomains/api/1.4/patch/createAPDTask \
  --header 'Accept: application/json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{}'

Sample Request Body

Copied!
  {
    "settings": {
      "taskName": "windows create task",
      "description": "task for windows",
      "platform": "Windows",
      "security_update": "true",
      "non_security_update": "true",
      "thirdparty_update": "true",
      "definition_update": "true",
      "servicepack_update": "true",
      "featurepack_update": "true",
      "rollups": "true",
      "optional_updates": "true",
      "include_tp_app_type": "Patch Specific Applications",
      "include_os_app_type": "Patch All Applications Except",
      "os_applications": "Windows Defender x64",
      "tp_applications": "Notepad++",
      "delay_deployment_by_approved_time/delay_deployment_by_released_time": "5",
      "EXPIRY_TIME": "08/29/2018, 00:00",
      "templateName": "Force reboot excluding servers",
      "target_type": "REMOTE_OFFICE",
      "target_list": "Local Office",
      "failure_notify_enable": "false",
      "failure_notify_duration": "1",
      "NeedFailureAttachment": "true",
      "attachmentFormatForFailure": "xls",
      "report_notify_enable": "false",
      "report_notify_duration": "3",
      "NeedReportAttachment": "true",
      "attachmentFormatForReport": "pdf",
      "email": "user@example.com"
    }
  }
                
▼ Show full

Response Parameters

- HTTP code 200

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

Value: createAPDTask

message_responseobject

Task creation result with status message

message_versionstring

API version: 1.4

statusstring

Operation status: success

- HTTP code 401

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

Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required)

errorMsgstring

Authentication failure reason

- HTTP code 403

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

Forbidden error code returned when the authenticated user does not have the required uem-roles (e.g., DataEncryption_Admin or DataEncryptionRecoveryKey_Admin)

errorMsgstring

Message indicating insufficient privileges to access this resource

- HTTP code 429

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

Rate limit error code returned when the API call threshold (configured via threshold/duration in security XML) is exceeded; client is locked out for lock-period minutes

errorMsgstring

Rate limit exceeded message with retry guidance

Sample Response: HTTP 200

Copied!
  {
    "message_type": "createAPDTask",
    "message_response": {
      "createapdtask": {
        "status": "windows create task  task created successfully"
      }
    },
    "message_version": "1.4",
    "status": "success"
  }
                
▼ Show full

Sample Response: HTTP 401

Authentication credentials are missing, expired or invalid

Copied!
  {
    "error_code": "UAC_UNAUTHORIZED",
    "error_description": "dc.rest.authentication.unauthorized"
  }
                
▼ Show full

Sample Response: HTTP 403

Authenticated user lacks the required role or scope

Copied!
  {
    "errorCode": "FORBIDDEN",
    "errorMessage": "You do not have sufficient privileges to perform this operation"
  }
                
▼ Show full

Sample Response: HTTP 429

API call threshold exceeded

Copied!
  {
    "errorCode": "RATE_LIMIT_EXCEEDED",
    "errorMessage": "API call limit exceeded. Retry after the lock period elapses"
  }
                
▼ 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.