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 user name and password is required.

Request URL

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

Query parameters

Parameters Required / Optional Description
jobid={job_id} Required Job ID that was returned by POST /compliancePolicies/compareResult
uuid={uuid} Required UUID 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

Code Description Comments
200 OK The request completed successfully.
400 Bad Request A 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.
403 Forbidden The 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.
409 Conflict There is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500 Internal Server Error An internal error occurred. A descriptive error message is returned in the response body.

Response body

Attributes Type Description
assignCount Integer Number of assignment requests
failedCount Integer Number of failed assignments
failedDevices Array of objects Information about devices with a compliance error
  originalPolicy String ID of the original compliance policy
  targetPolicy String ID of the target compliance policy that failed to be assigned
  uuid String Device UUID
successCount Integer Number of successful assignments
jobid String Job ID
percentage Integer Percent complete
result Array  
  endpointCompliant String Identifies 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.
  message Array of objects Message that is returned from the assignment of the policy
  status String Task status (same as the job status)
  targetFirmware Array of objects Information about each firmware update in the compliance policy
    category String Firmware-update category
    build String Firmware-update build
    compliant String Compliance 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.
    componentID String Component ID. For CMMs or switches, this is the UUID. For server components this is specified as server UUID:component name.
    componentName String Component name
    date String Firmware update package release date
    fixid String Firmware-update ID
    level String Firmware-update level
    packageExistence Boolean Identifies 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.
    reason String Explanation of the result of the compliance check
    versionList Array of strings Version list of firmware update package (one firmware update package might contain multiple parts)
  taskid String Task ID
  uuid String UUID
status String Status 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"
}