Skip to main content

GET /compliancePolicies/compareResult

Use this method to determine whether devices are compliant with the assigned compliance policy using the job or task ID that was returned when the compliance policy was assigned.

Authentication

Authentication with username and password is required.

Request URL

GET https://{management_server_IP}/compliancePolicies/compareResult

Query parameters

ParametersRequired / OptionalDescription
jobid={job_id}RequiredJob ID that was returned by POST /compliancePolicies/compareResult
uuid={uuid}RequiredUUID of the device to which the compliance policy was assigned using the specified job ID

If the value is null or empty, compliance information is returned for all devices in the job.

The following example returns information about whether a device is compliant with the assigned compliance policy.
GET https://192.0.2.0/compliancePolicies/compareResult?jobid=15&uuid=4DE3B51797C311E2B41F3440B5EABAE8

Request body

None

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
assignCountIntegerNumber of assignment requests
failedCountIntegerNumber of failed assignments
failedDevicesArray of objectsInformation about devices with a compliance error
 originalPolicyStringID of the original compliance policy
 targetPolicyStringID of the target compliance policy that failed to be assigned
 uuidStringDevice UUID
successCountIntegerNumber of successful assignments
jobidStringJob ID
percentageIntegerPercent complete
resultArray 
 endpointCompliantStringIdentifies whether the device is compliant with the policy. This can be one of the following values.
  • yes. The device is compliant.
  • no. The device is not compliant.
  • failed. There is a compliance error.
 messageArray of objectsMessage that is returned from the assignment of the policy
 statusStringTask status (same as the job status)
 targetFirmwareArray of objectsInformation about each firmware update in the compliance policy
  categoryStringFirmware-update category
  buildStringFirmware-update build
  compliantStringCompliance result after the policy is assigned. This can be one of the following values.
  • yes. Compliant.
  • no. Not compliant
  • DoNotUpdate. Do not update this component.
  componentIDStringComponent ID. For CMMs or switches, this is the UUID. For server components this is specified as server UUID:component name.
  componentNameStringComponent name
  dateStringFirmware update package release date
  fixidStringFirmware-update ID
  levelStringFirmware-update level
  packageExistenceBooleanIdentifies whether the firmware update package exists in the updates repository. This can be one of the following values.
  • yes. The firmware update exists.
  • no. The firmware update does not exists.
  reasonStringExplanation of the result of the compliance check
  versionListArray of stringsVersion list of firmware update package (one firmware update package might contain multiple parts)
 taskidStringTask ID
 uuidStringUUID
statusStringStatus of the job. This can be one of the following values.
  • notstarted
  • inprogress
  • failed
  • finished
  • cancel
The following example is returned if the request is successful.
{
"assignCount": 23,
"failedCount": 2,
"failedDevices": [{
"originalPolicy": "v3.2.0-2018-10-26-SystemX-Switch-DEV",
"targetPolicy": "v3.2.0-2018-10-26-SystemX-Switch-DEV",
"uuid": "4DE3B51797C311E2B41F3440B5EABAE8"
},
{
"originalPolicy": "v3.2.0-2018-10-26-SystemX-Switch-DEV",
"targetPolicy": "v3.2.0-2018-10-26-SystemX-Switch-DEV",
"uuid": "4DE3B51797C311E2B41F3440B5EABAE8"
}],
"successCount": 21,
"jobid": "14",
"percentage": 100,
"result": [{
"endpointCompliant": "no"
"message": [],
"status": "finished",
"targetFirmware": [{
"build": "0708",
"category": "Swithes",
"compliant": "no",
"componentID": "A3F8482B012B32188E68375DD5FF40EE",
"componentName": "Demo - 00004X4093",
"date": "2015-02-13",
"fixid": "fw_scsw_en4093r-7.8.9.0_anyos_noarch",
"level": "higher",
"packageExistence": "yes",
"reason": "The installed version is down level than the version defined in compliance
policy.",
"versionList": ["7.8.9.0"]
}],
"taskid": "0",
"uuid": "A3F8482B012B32188E68375DD5FF40EE"
}],
"status": "finished"
}