Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

POST compliance/run

Schedules a Compliance Check Job

Since Product Version: 3.1

Resource Information

Rate Limiting?

No

Sorting?

No

Paging?

No

Filtering?

No

Group Filtering?

No

Aggregation?

No

Response Formats

xml

json

User Group

NBI Write

HTTP Methods

POST

API version v1 is deprecated

This API version has been deprecated. It will be removed in a future release of the product. Please develop new clients using the latest API version. Please modify your existing clients to use a later API version.

Resource URL

/webacs/api/v1/op/compliance/run

Request Payload Parameters

Attribute Description

configFileFrom String

One of LATEST_FROM_DEVICE (collects the config from Device), LATEST_FROM_ARCHIVE (collects the config from Database which already collected). By default LATEST_FROM_DEVICE.

jobDto Arrow image ComplianceJob

Job details.

policyProfileName String

Profile name.

targets Arrow image ComplianceJobTarget[]

Targets to check, devices or groups.

Response Parameters

Attribute Description

isSuccess boolean

If true, the action was successfully performed. If false, it ended in some failure condition.

message String

The action status message.

Sample Payloads

Sample payloads are for information only. They are automatically generated and the values included may not be representative of actual valid data values.

Sample XML Request Payload

https://localhost/webacs/api/v1/op/compliance/run

<?xml version="1.0" ?>
<complianceJobRun>
  <configFileFrom>String value</configFileFrom>
  <jobDto>
    <description>String value</description>
    <jobName>String value</jobName>
    <jobSchedule>
      <daily>true</daily>
      <dayOfWeek>String value</dayOfWeek>
      <dayRepetition>String value</dayRepetition>
      <fortnight>true</fortnight>
      <hourRepetition>String value</hourRepetition>
      <hourly>true</hourly>
      <jobScheduleTime>
        <day>String value</day>
        <endDate>String value</endDate>
        <hour>String value</hour>
        <minute>String value</minute>
        <month>String value</month>
        <startDate>String value</startDate>
        <year>String value</year>
      </jobScheduleTime>
      <minute>true</minute>
      <monthly>true</monthly>
      <monthlyDay>String value</monthlyDay>
      <monthlyMonth>String value</monthlyMonth>
      <monthlyWeek>String value</monthlyWeek>
      <monthlyWeekDay>String value</monthlyWeekDay>
      <noOfRepetitions>String value</noOfRepetitions>
      <now>true</now>
      <weekly>true</weekly>
      <yearly>true</yearly>
    </jobSchedule>
    <jobType>String value</jobType>
  </jobDto>
  <policyProfileName>String value</policyProfileName>
  <targets>
    <targets>
      <groupHierarchy>String value</groupHierarchy>
      <groupId>String value</groupId>
      <groupName>String value</groupName>
      <ipAddress>String value</ipAddress>
      <type>DEVICE</type>
    </targets>
  </targets>
</complianceJobRun>

Sample JSON Request Payload

https://localhost/webacs/api/v1/op/compliance/run.json

{
  "complianceJobRun" : {
    "configFileFrom" : "String value",
    "jobDto" : {
      "description" : "String value",
      "jobName" : "String value",
      "jobSchedule" : {
        "daily" : true,
        "dayOfWeek" : "String value",
        "dayRepetition" : "String value",
        "fortnight" : true,
        "hourRepetition" : "String value",
        "hourly" : true,
        "jobScheduleTime" : {
          "day" : "String value",
          "endDate" : "String value",
          "hour" : "String value",
          "minute" : "String value",
          "month" : "String value",
          "startDate" : "String value",
          "year" : "String value"
        },
        "minute" : true,
        "monthly" : true,
        "monthlyDay" : "String value",
        "monthlyMonth" : "String value",
        "monthlyWeek" : "String value",
        "monthlyWeekDay" : "String value",
        "noOfRepetitions" : "String value",
        "now" : true,
        "weekly" : true,
        "yearly" : true
      },
      "jobType" : "String value"
    },
    "policyProfileName" : "String value",
    "targets" : {
      "targets" : {
        "groupHierarchy" : "String value",
        "groupId" : "String value",
        "groupName" : "String value",
        "ipAddress" : "String value",
        "type" : "DEVICE"
      }
    }
  }
}

Sample XML Response Payload

https://localhost/webacs/api/v1/op/compliance/run

<?xml version="1.0" ?>
<mgmtResponse responseType="operation" requestUrl="https://localhost/webacs/api/v1/op/compliance/run" rootUrl="https://localhost/webacs/api/v1/op">
  <complianceResult>
    <isSuccess>true</isSuccess>
    <message>String value</message>
  </complianceResult>
</mgmtResponse>

Sample JSON Response Payload

https://localhost/webacs/api/v1/op/compliance/run.json

{
  "mgmtResponse" : {
    "@responseType" : "operation",
    "@requestUrl" : "https : \/\/localhost\/webacs\/api\/v1\/op\/compliance\/run",
    "@rootUrl" : "https : \/\/localhost\/webacs\/api\/v1\/op",
    "complianceResult" : {
      "isSuccess" : true,
      "message" : "String value"
    }
  }
}