---
title: "Get the rule-based view of compliance findings"
method: GET
path: "/api/v2/compliance_findings/rule_based_view"
tags: ["Compliance"]
deprecated: true
---

# Get the rule-based view of compliance findings

`GET /api/v2/compliance_findings/rule_based_view`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/compliance_findings/rule_based_view`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `security_monitoring_findings_read`

> **Deprecated.**

**This endpoint is deprecated.** Use the [Security Monitoring - Search Security Findings](https://docs.datadoghq.com/api/latest/security-monitoring/search-security-findings/) endpoint instead.

Get an aggregated view of compliance rules with their pass, fail, and muted finding counts.
Supports filtering by compliance framework, framework version, and additional query filters.

## Query parameters

- `to` integer, required
- `framework` string
- `version` string
- `query_findings_without_framework_version` boolean
- `include_rules_without_findings` boolean
- `is_custom` boolean
- `query` string

## Response `200`

OK

- RuleBasedViewResponse: Response containing an aggregated view of compliance rules with their finding statistics.
  - `data` RuleBasedViewData, required: Data envelope for the rule-based view response.
    - `attributes` RuleBasedViewAttributes, required: Attributes of the rule-based view.
      - `count` integer, required: Total number of rules in the view.
      - `rules` RuleBasedViewRule[], required: List of rules in the rule-based view.
        - `compliance_frameworks` RuleBasedViewComplianceFramework[], required: List of compliance framework mappings associated with the rule.
          - `control` string: Identifier of the control inside the requirement.
          - `framework` string: Handle of the compliance framework.
          - `is_default` boolean: Whether the framework is a Datadog default framework. `true` indicates a Datadog framework and `false` indicates a custom framework.
          - `message` string: Optional message describing the framework mapping for the rule.
          - `requirement` string: Name of the requirement that contains the control.
          - `version` string: Version of the compliance framework.
        - `enabled` boolean, required: Whether the rule is enabled.
        - `id` string, required: Unique identifier of the rule.
        - `name` string, required: Human-readable name of the rule.
        - `resourceAttributes` string[], required: List of resource attribute names exposed by the rule.
        - `resourceCategory` string, required: Resource category targeted by the rule.
        - `resourceType` string, required: Resource type targeted by the rule.
        - `stats` RuleBasedViewRuleStats, required: Counts of findings for the rule, grouped by their evaluation status.
          - `fail` integer, required: Number of findings that failed evaluation.
          - `muted` integer, required: Number of findings that have been muted.
          - `pass` integer, required: Number of findings that passed evaluation.
        - `status` string, required: Severity associated with the rule (for example, `info`, `low`, `medium`, `high`, or `critical`).
        - `tags` string[], required: List of tags attached to the rule.
        - `type` 'cloud_configuration' | 'infrastructure_configuration' | 'api_security', required: The category of the security rule.
    - `id` string, required: Unique identifier of the rule-based view document.
    - `type` 'rule_based_view', required: The type of the resource. The value should always be `rule_based_view`.

## Other responses

- `400`: Bad Request
- `403`: Not Authorized
- `429`: Too many requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
