Policy

Assets Compliance For Policy Rule

Changed on

Retrieves asset resources with rule compliance results for the specified policy policy rule.

get/api/3/policies/{policyId}/rules/{ruleId}/assets

Request

Path parameters

policyIdinteger required

The identifier of the policy

Example:84
ruleIdinteger required

The identifier of the policy rule.

Example:53

Query parameters

applicableOnlyboolean

An optional boolean parameter indicating the assets retrieved should only include those with rule results of either PASS or FAIL. Default value is false, which will also include assets with a compliance status of NOT_APPLICABLE.

pageinteger

The index of the page (zero-based) to retrieve.

sizeinteger

The number of records per page to retrieve.

sortstring[]

The criteria to sort the records by, in the format: property[,ASC|DESC]. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Response

OK

Example response

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "page": {
    "number": 6,
    "size": 10,
    "totalPages": 13,
    "totalResources": 123
  },
  "resources": [
    {
      "links": [
        {
          "href": "https://hostname:3780/api/3/...",
          "rel": "self"
        }
      ],
      "os": {
        "architecture": "x86",
        "configurations": [
          {
            "name": "<name>",
            "value": "<value>"
          }
        ],
        "cpe": {
          "edition": "enterprise",
          "part": "o",
          "product": "windows_server_2008",
          "update": "sp1",
          "v2.2": "cpe:/o:microsoft:windows_server_2008:-:sp1:enterprise",
          "v2.3": "cpe:2.3:o:microsoft:windows_server_2008:-:sp1:enterprise:*:*:*:*:*",
          "vendor": "microsoft",
          "version": "-"
        },
        "description": "Microsoft Windows Server 2008 Enterprise Edition SP1",
        "family": "Windows",
        "id": 35,
        "product": "Windows Server 2008 Enterprise Edition",
        "systemName": "Microsoft Windows",
        "type": "Workstation",
        "vendor": "Microsoft",
        "version": "SP1"
      }
    }
  ]
}

Changes

    • info

      added the media type application/json;charset=UTF-8 for the response with the status

    • info

      added the media type application/json;charset=UTF-8 for the response with the status

    • info

      added the media type application/json;charset=UTF-8 for the response with the status

    • info

      added the media type application/json;charset=UTF-8 for the response with the status

    • info

      added the media type application/json;charset=UTF-8 for the response with the status