Skip to main content

PUT /compliancePolicies

Use this method to modify or export a firmware-update compliance policy.

Authentication

Authentication with username and password is required.

Request URL

PUT https://{management_server_IP}/compliancePolicies

Query parameters

ParametersRequired / OptionalDescription
action={action}RequiredAction type. This can be one of the following values.
  • edit. Modifies the specified compliance policy.
  • export. Compresses the specified compliance policy .xml file into a .zip file, and downloads the .zip file to the local system.

    Use the GET /tasks/{job_list} (where {job_id} is the job ID) to retrieve the overall job status. If a job was not successfully started, refer to the response code and response body for details.

    Note
    A compliance policy that includes packages might take a longer time to import.
  • exportWithPackages. Compresses the specified compliance policy .xml file and the update files used by the policy into a .zip file and downloads the .zip file to the local system.

    Use the GET /tasks/{job_list} (where {job_id} is the job ID) to retrieve the overall job status. If a job was not successfully started, refer to the response code and response body for details.

The following example modifies a compliance policy.
PUT https://192.0.2.0/compliancePolicies?type=edit

Request body

Modify a compliance policy
AttributesRequired / OptionalTypeDescription
policyRequiredObjectInformation about the compliance policy
 actionRequiredStringAction to take. This is always edit.
 descriptionOptionalStringCompliance policy description
 detailsOptionalArray of objectsDetails about the compliance policy
  baseVersionOptionalStringFor CMMs or switches, this is the fix ID of the package. For servers, the following is returned.
xxxx_utl_uxsp_xxxxxx-1.00_xxxx_32-64
  componentsOptionalArray of objectsInformation about each firmware component
   isDefaultRequiredStringSpecifies if the component update is the default component (the latest component update). This can be one of the following values.
  • yes. This firmware component is the default.
  • no. This firmware component is not the default.
   nameRequiredStringComponent name
   ruleRequiredStringRule for raising a non-compliant alert. This can be one of the following values.
  • alertIfNotExactMatch. Show non-compliance when the installed version on device does not exactly match the compliance target.
  • alertIfDownlevel. Show non-compliance when the installed version on device is earlier than the compliance target.
  • noAlerting. Never show non-compliance.
   targetVersionRequiredStringFirmware level that is the baseline for the specified device type
   typeRequiredString(Servers only) Package type. This can be one of the following values.
  • IMM
  • IMM
  • UEFI
  • UEFI-Backup
  idOptionalStringSystem type used to identify the CMM. Internal use only
  isDefaultOptionalStringIndicates if the update package is the default package (the latest package). This can be one of the following values.
  • yes. This is the default update package

  • no. This is not the default update package

  isUXSPOptionalStringIndicates if this update package is a UXSP package. This can be one of the following values.
  • yes. This is a UXSP package

  • no. This is not a UXSP package

  ruleOptionalStringRule for raising a non-compliant alert. This can be one of the following values.
  • alertIfNotExactMatch. Show non-compliance when the installed version on device does not exactly match the compliance target.
  • alertIfDownlevel. Show non-compliance when the installed version on device is earlier than the compliance target.
  • noAlerting. Never show non-compliance.
  • custom. Follow the detailed rules of each firmware component.
  systemTypeOptionalStringType of device for which the policy applies
 filterTypeOptionalStringFilter type. This can be one of the following values.
  • all. All supported machine types

  • managed. Only managed machine types.

 nameOptionalStringCompliance policy name
 oldPolicyNameOptionalString 
 updateRuleOptionalStringInternal use only
 userOptionalStringName of the user that created the policy
The following example modifies a compliance policy when the query parameter ​action=edit is specified.
{
"policy": {
"action": "edit",
"description": "",
"details": [{
"baseVersion": "lnvgy_fw_cmm_1aon12a-1.5.0a_anyos_noarch",
"components": [],
"id": "8721_Lenovo",
"isDefault": "yes",
"isUXSP": "no",
"rule": "alertIfDownlevel",
"systemType": "8721"
}],
"filterType": "managed",
"name": "Test11",
"oldPolicyName": "Test11",
"updateRule": "",
"user": "USERID"
}
}
Export a compliance policy policy with or without packages
AttributesRequired / OptionalTypeDescription
exportRequiredStringList of names of the compliance policies to be exported, separate by a comma. To obtain a list of compliance policy names, use the GET /compliancePolicies method.
The following example deletes four compliance policies only if those policies are not in the Assigned state when the query parameter ​action=export is specified
{
"export": "test, Copy-test, Copy-Copy-test"
}

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

Edit a compliance policy
AttributesTypeDescription
{message_attributes}variesStatus messages (see Status messages)

The result attribute can be one of the following values.

  • informational. The request completed successfully.

  • minor. The request failed with a minor issue.

  • major. The request failed with a major issue.

The following example is returned if the request is successful.
{
"result": "informational",
"messages": [{
"id": "FQXHMUP3006I",
"text": "Policy operation completed successfully."
}]
}
Export a compliance policy
AttributesTypeDescription
exportURLStringZip file name of exported files
resultStringResults of the request. This can be one of the following values.
  • informational. The request completed successfully.
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.
messagesArrayInformation about one or more messages
 explanationStringAdditional information to clarify the reason for the message
 idStringMessage identifier of a returned message
 recoveryArrayRecovery 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
The following example is returned when compliance policies were exported successfully.
{
"exportURL": "policies2016042517245649.zip",
"success": "success",
"result": "informational",
"messages": [{
"id": "FQXHMUP3031I",
"text": "Policy export completed successfully."
}]
}
Export a compliance policy
AttributesTypeDescription
jobidIntegerJob ID
The following example is returned when compliance policies were exported successfully.
{
"jobid": "1027"
}