---
title: "List all rules"
method: GET
path: "/api/v2/scorecard/rules"
tags: ["Scorecards"]
---

# List all rules

`GET /api/v2/scorecard/rules`

Fetch all rules.

## Query parameters

- `page[size]` integer
- `page[offset]` integer
- `include` string
- `filter[rule][id]` string
- `filter[rule][enabled]` boolean
- `filter[rule][custom]` boolean
- `filter[rule][name]` string
- `filter[rule][description]` string
- `fields[rule]` string
- `fields[scorecard]` string

## Response `200`

OK

- ListRulesResponse — Scorecard rules response.
  - `data` ListRulesResponseDataItem[] — Array of rule details.
    - `attributes` RuleAttributes — Details of a rule.
      - `category` string — The scorecard name to which this rule must belong.
      - `created_at` string, date-time — Creation time of the rule outcome.
      - `custom` boolean — Defines if the rule is a custom rule.
      - `description` string — Explanation of the rule.
      - `enabled` boolean — If enabled, the rule is calculated as part of the score.
      - `level` integer — The maturity level of the rule (1, 2, or 3).
      - `modified_at` string, date-time — Time of the last rule outcome modification.
      - `name` string — Name of the rule.
      - `owner` string — Owner of the rule.
      - `scope_query` string — A query to filter which entities this rule applies to.
      - `scorecard_name` string — The scorecard name to which this rule must belong.
    - `id` string — The unique ID for a scorecard rule.
    - `relationships` RelationshipToRule — Scorecard create rule response relationship.
      - `scorecard` RelationshipToRuleData — Relationship data for a rule.
        - `data` RelationshipToRuleDataObject — Rule relationship data.
          - `id` string — The unique ID for a scorecard.
          - `type` 'scorecard' — The JSON:API type for scorecard.
    - `type` 'rule' — The JSON:API type for scorecard rules.
  - `links` ListRulesResponseLinks — Links attributes.
    - `next` string — Link for the next set of rules.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
