Install All Missing Patches in Specific Systems

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

Installs all patches currently missing from the target systems named in the request.

Request URL

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

Scope

DesktopCentralCloud.PatchMgmt.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

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

- Query Parameters

customeridlongOptional

Applicable only for MSP editions. A unique identifier of the customer on whom the action needs to be performed. Get the customer id from Customer Details api

- Request Body

application/json
JSON Object
Hide Sub-Attributes
isOnlyApprovedstringOptional

(Optional): true = deploy only approved patches, false = deploy all

ResourceIDsarrayOptional

List of resource IDs of the systems with missing patches, E.g. ResourceIDs:[601,602]. Get the resource IDs from Get All Systems api

PatchIDsarrayOptional

List of missing patch IDs to act on, E.g. PatchIDs:[103980,103981]. Get the patch IDs from Get All Patches api

ConfigNamestringOptional

Provide a name for the Install Patch configuration,E.g. ConfigName:API install patch test1

ConfigDescriptionstringOptional

Provide a description for the Install Patch configuration,E.g. ConfigDescription:API test

actionToPerformstringOptional

This will initiate deployment of the defined Install Patches Configuration to the specified targets in accordance with the provided criteria,E.g. actionToPerform:Deploy/ DeployImmediately/ Draft,Deploy : The deployment will initiate upon the agent's contact with the server,DeployImmediately : Deployed instantly without waiting for agent contact,Draft : Save the configuration as a draft.

DeploymentPolicyTemplateIDlongOptional

ID of the deployment policy to apply. Get the template_id from Get Deployment Policies api

installaftertimestringOptional

Specify the date and time for patch installation to begin. Patches will be installed based on the selected options after the scheduled time. Use the format: yyyy-MM-dd HH:MM.

expirytimestringOptional

This configuration will not be applied after the specified time. Use the format yyyy-MM-dd HH:MM.

deploymentTypestringOptional

Provide the preferred deployment option here. Accepted values : 0/1/2,E.g. deploymentType: 0/1/2,0 - Deploy only (default)This option enables you to deploy the selected patches to the targeted endpoints according to the relevant deployment policies,1 - Publish in Self Service Portal only (DeploymentPolicyTemplateID will be ignored),This option enables administrators to publish the selected patches to the Self Service Portal. End users and server owners can then initiate the installation process at their convenience,2 - This option incorporates both deployment and publication actions.Note: If deploymentType is set to 0 or 1, then the DeploymentPolicyTemplateID field is mandatory.

deadlineTimelongOptional

Specify the time, in milliseconds, for force deploying the patches to unpatched systems in your network,E.g. deadlineTime: 1691393760 (Time in milliseconds),Note : Max of 1 year is supported

forceRebootOptionstringOptional

Depending on the selected Deployment Policy, you can choose to enable Force Reboot either within or outside the deployment window. Accepted Values : 0/1/2,E.g. forceRebootOption:0/1/2,0 - Not configured,1 - Within the deployment/reboot window,2 - Outside the deployment/reboot window.

resourceNamesarrayOptional

Names of the systems to deploy to, ex:resourceNames:[win-1422,wind-144d]. Get the names from Get All Systems api

customGroupsarrayOptional

Names of the custom groups to deploy to, ex:customGroups:[cg-1,cg-2]. Get the names from Get Custom Groups api

remoteOfficesarrayOptional

Names of the remote offices to deploy to, ex:remoteOffices:[Local Office,Remote-1]. Get the names from Get Remote Offices api

ipAddressesarrayOptional

IP addresses of the systems to deploy to, ex:ipAddresses:[127.0.0.1,126.0.0.1]

retrySettingsJSON ObjectOptional

Enabling this option will redeploy the configuration on failed targets.E.g. "retrySettings":{"enableRetrySettings": true,"noOfRetries": 2,"logonStartupMinRetry": 1,"refreshMinRetry": 1} enableRetrySettings,true : To enable retry settings,false: To disable retry settings,noOfRetries:Total number of retries count , Accepted values 1-10,logonStartupMinRetry Retry during system startup,refreshMinRetry Retry during refresh cycle,Note : Enabled by default. To disable, set 'enableRetrySettings' to false. Retry count: logonStartupMinRetry + refreshMinRetry.

Show Sub-Attributes
enableRetrySettingsstringOptional

true-To enable retry, false-To disable retry.

noOfRetriesstringOptional

Specify retry values range from 1-10

logonStartupMinRetrystringOptional

Specify retry count range from 0-9 during user logon

refreshMinRetrystringOptional

Specify the retry count range (0—9) for computers that complete the 90-minute refresh cycle.

Sample Request

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

Sample Request Body

Copied!
  {
    "ResourceIDs": [
      601
    ],
    "isOnlyApproved": "true",
    "ConfigName": "API install patch test1",
    "ConfigDescription": "API test",
    "actionToPerform": "Deploy",
    "DeploymentPolicyTemplateID": 1,
    "deploymentType": 2,
    "deadlineTime": 1691393760,
    "forceRebootOption": 2,
    "retrySettings": {
      "enableRetrySettings": true,
      "noOfRetries": 2,
      "logonStartupMinRetry": 1,
      "refreshMinRetry": 1
    }
  }
                
▼ Show full

Response Parameters

- HTTP code 200

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

Value: installpatch

message_responseJSON Object

Install patch action result

Show Sub-Attributes
installpatchobject

Result detail for the install action; empty when the action was accepted without per-patch detail

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": "installpatch",
    "message_response": {
      "installpatch": {}
    },
    "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.