---
title: "List Custom Rulesets"
method: GET
path: "/api/v2/static-analysis/custom/rulesets"
tags: ["Static Analysis"]
---

# List Custom Rulesets

`GET /api/v2/static-analysis/custom/rulesets`

Get all custom rulesets for the authenticated organization.

## Response `200`

OK

- CustomRulesetListResponse — Response containing a list of custom rulesets for the authenticated organization.
  - `data` CustomRuleset[], required — The list of custom rulesets.
    - `attributes` CustomRulesetAttributes, required — Attributes of a custom ruleset, including its name, description, and rules.
      - `created_at` string, date-time, required — Creation timestamp
      - `created_by` string, required — Creator identifier
      - `description` string, required — Base64-encoded full description
      - `name` string, required — Ruleset name
      - `rules` CustomRule[], nullable, required — Rules in the ruleset
        - `created_at` string, date-time, required — Creation timestamp
        - `created_by` string, required — Creator identifier
        - `last_revision` CustomRuleRevision, required — A specific revision of a custom static analysis rule.
          - `attributes` CustomRuleRevisionAttributes, required — Attributes of a custom rule revision, including code, metadata, and test cases.
            - `arguments` Argument[], required — Rule arguments
              - …
            - `category` 'SECURITY' | 'BEST_PRACTICES' | 'CODE_STYLE' | 'ERROR_PRONE' | 'PERFORMANCE', required — Rule category
            - `checksum` string, required — Code checksum
            - `code` string, required — Rule code
            - `created_at` string, date-time, required — Creation timestamp
            - `created_by` string, required — Creator identifier
            - `creation_message` string, required — Revision creation message
            - `cve` string, nullable, required — Associated CVE
            - `cwe` string, nullable, required — Associated CWE
            - `description` string, required — Full description
            - `documentation_url` string, nullable, required — Documentation URL
            - `is_published` boolean, required — Whether the revision is published
            - `is_testing` boolean, required — Whether this is a testing revision
            - `language` 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT' | 'JAVA' | 'GO' | 'YAML' | 'RUBY' | 'CSHARP' | 'PHP' | 'KOTLIN' | 'SWIFT', required — Programming language
            - `severity` 'ERROR' | 'WARNING' | 'NOTICE', required — Rule severity
            - `short_description` string, required — Short description
            - `should_use_ai_fix` boolean, required — Whether to use AI for fixes
            - `tags` string[], required — Rule tags
            - `tests` CustomRuleRevisionTest[], required — Rule tests
              - …
            - `tree_sitter_query` string, required — Tree-sitter query
          - `id` string, required — Revision identifier
          - `type` 'custom_rule_revision', required — Resource type
        - `name` string, required — Rule name
      - `short_description` string, required — Base64-encoded short description
    - `id` string, required — Ruleset identifier
    - `type` 'custom_ruleset', required — Resource type

## Other responses

- `401` — Unauthorized
- `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)
