Decline Patches

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

Declines one or more patches for the specified custom group(s) and customers, with each patch requiring a reasonId and remarks. The API does not support the Linux platform; therefore, Linux patches were automatically excluded.

Request URL

https://{serverurl}/dcapi/patch/settings/declinePatch/declinePatches

Scope

DesktopCentralCloud.PatchMgmt.UPDATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/declinePatches.v1+jsonapplication/declinePatches.v1+jsonCopied!
AcceptstringMandatory
application/declinePatches.v1+jsonapplication/declinePatches.v1+jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
patchesJSON ArrayOptional

List of patch objects to decline. Each object contains patch ID, reason ID and remarks.

Show Sub-Attributes
JSON Object
Show Sub-Attributes
idlongOptional
platformstringOptional
customGroupIDJSON ArrayOptional

List of custom group resource IDs to decline patches for. Cannot be empty.

Show Sub-Attributes
string

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request PUT \
  --url https://appdomains/dcapi/patch/settings/declinePatch/declinePatches \
  --header 'Accept: application/declinePatches.v1+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/declinePatches.v1+json' \
  --data '{}'

Sample Request Body

Decline a single patch for one custom group

Copied!
  {
    "patches": [
      {
        "reasonId": "1",
        "id": "110001",
        "remarks": "Vendor reported crash on reboot"
      }
    ],
    "customGroupID": [
      "301"
    ]
  }
                
Show full

Decline multiple patches with different reasons for multiple custom groups

Copied!
  {
    "patches": [
      {
        "reasonId": "1",
        "id": "110001",
        "remarks": "Vendor-reported patch issue causing BSOD"
      },
      {
        "reasonId": "3",
        "id": "110002",
        "remarks": "Conflicts with in-house CRM application v4.2"
      },
      {
        "reasonId": "5",
        "id": "110003",
        "remarks": "Awaiting approval from change advisory board"
      }
    ],
    "customGroupID": [
      "501",
      "502"
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

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

Operation result: 'success' when patches are declined successfully

messagestring

Localized success message

- HTTP code 400

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

Validation error code: INSUFFICIENT_DATA=missing required fields, INVALID_DATA=invalid format or business rule violation (e.g., All Computers mixed with other groups, non-numeric id/reasonId)

errorMessagestring

Detailed message describing the specific validation failure

- HTTP code 401

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

Unauthorized error code: credentials missing, expired, or invalid

errorMsgstring

Authentication failure reason

- HTTP code 403

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

Authorization error code: UAC_UNAUTHORIZED when user lacks access to selected custom groups

errorMessagestring

Message indicating the user is not authorized to decline patches for the selected groups

- HTTP code 500

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

Internal error code: unexpected server error during decline operation

errorMessagestring

Error message describing the internal failure

Possible Response Codes

200HTTP code
400HTTP code
401HTTP code
403HTTP code
500HTTP code

Sample Response: HTTP 200

Patches declined successfully

Copied!
  {
    "message": "Patches declined successfully",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 400

Patches list is empty or null

Copied!
  {
    "errorMessage": "Patches list is empty",
    "errorCode": "INSUFFICIENT_DATA"
  }
                
Show full

A patch object is missing the required reasonId

Copied!
  {
    "errorMessage": "reasonId is mandatory for patch id: 110001",
    "errorCode": "INSUFFICIENT_DATA"
  }
                
Show full

All Computers group selected with other custom groups

Copied!
  {
    "errorMessage": "All Computer Groups cannot be selected with other Custom Groups",
    "errorCode": "INVALID_DATA"
  }
                
Show full

Sample Response: HTTP 401

Authentication credentials missing or invalid

Copied!
  {
    "errorMessage": "Authentication credentials are missing or invalid",
    "errorCode": "UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 403

User lacks access to the selected custom groups

Copied!
  {
    "errorMessage": "The user is not authorized to perform this operation!",
    "errorCode": "UAC_UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 500

Unexpected server error during decline

Copied!
  {
    "errorMessage": "An internal error occurred while processing the request",
    "errorCode": "INTERNAL_ERROR"
  }
                
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.