Skip to main content

POST /compliancePolicies/persistedResult

Use this method to unassign compliance policies that are assigned to one or more specific devices.

This method unassigns one or more compliance policies that are assigned to specific devices, updates the persisted result on the disk drive, and caches in memory that is related to this policies and devices.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/compliancePolicies/persistedResult

Query parameters

None

Request body

AttributesRequired / OptionalTypeDescription
unassignRequiredArray of objectsList of managed devices for which you want to retrieve compare results
 uuidRequiredStringUnique ID of the managed device

The following example unassigns the compliance policy from the device with UUID C156CA72D6E811E48F0F6EAE8B4BDB07.

{
"unassign":[{
"uuid":"C156CA72D6E811E48F0F6EAE8B4BDB07"
}]
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.
409ConflictThere is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
failedCountIntegerNumber of failed unassignments
failedDevicesArray of objectsInformation about devices with failed compliance
 originalPolicyStringID of the original compliance policy
 uuidStringDevice UUID
successCountIntegerNumber of successful unassignments
unassignCountIntegerNumber of unassignment requests
successStringResults of the request. This can be one of the following values.
  • success. The request completed successfully.
  • failed. The request failed. A descriptive error message was returned.
messagesArray of objectsInformation about one or more messages
 explanationStringAdditional information to clarify the reason for the message
 idStringMessage identifier of a returned message
 recoveryArray of objectsRecovery information
  textStringUser actions that can be taken to recover from the event
  URLStringLink to the help system for more information, if available
 textStringMessage text associated with the message identifier
 originalPolicyStringID of the compliance policy that was unassigned
 uuidStringDevice UUID
The following example is returned if the request is successful.
{
"failedCount": 0,
"failedDevices": [],
"unassignCount": 29,
"successCount": 27,
"messages": [{
"explanation": "",
"id": "FQXHMUP2000I",
"recovery": [],
"text": "The command completed successfully."
"originalPolicy": "v2.2.0-2018-10-26-SystemX-Switch-DEV"
"uuid": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}]
}