---
title: "Get a repository rule suite"
method: GET
path: "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
tags: ["repos"]
---

# Get a repository rule suite

`GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}`

## Request

- Base URL: `https://api.github.com`
- URL: `https://api.github.com/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}`
- Auth: none declared

Gets information about a suite of rule evaluations from within a repository.
For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)."

## Path parameters

- `owner` string, required
- `repo` string, required
- `rule_suite_id` integer, required

## Query parameters

- `include_metadata` boolean

## Response `200`

Response

- RuleSuite: Response
  - `id` integer: The unique identifier of the rule insight.
  - `actor_id` integer, nullable: The number that identifies the user.
  - `actor_name` string, nullable: The handle for the GitHub user account.
  - `before_sha` string: The previous commit SHA of the ref.
  - `after_sha` string: The new commit SHA of the ref.
  - `ref` string: The ref name that the evaluation ran on.
  - `repository_id` integer: The ID of the repository associated with the rule evaluation.
  - `repository_name` string: The name of the repository without the `.git` extension.
  - `pushed_at` string, date-time
  - `result` 'pass' | 'fail' | 'bypass': The result of the rule evaluations for rules with the `active` enforcement status.
  - `evaluation_result` 'pass' | 'fail' | 'bypass', nullable: The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`. Null if no rules with `evaluate` enforcement status were run.
  - `rule_evaluations` object[]: Details on the evaluated rules.
    - `rule_source` object
      - `type` string: The type of rule source.
      - `id` integer, nullable: The ID of the rule source.
      - `name` string, nullable: The name of the rule source.
    - `enforcement` 'active' | 'evaluate' | 'deleted ruleset': The enforcement level of this rule source.
    - `result` 'pass' | 'fail': The result of the evaluation of the individual rule.
    - `rule_type` string: The type of rule.
    - `metadata` union: Additional metadata about the rule evaluation.
      - object: Metadata for a pull request rule evaluation result.
        - `pull_request` object: The pull request associated with the rule evaluation.
          - `id` integer: The unique identifier of the pull request.
          - `number` integer: The number of the pull request.
          - `user` object: The user who created the pull request.
            - `id` integer: The unique identifier of the user.
            - `login` string: The handle for the GitHub user account.
            - `type` string: The type of the user.
          - `reviews` object[]: The reviews associated with the pull request.
            - `id` integer: The unique identifier of the review.
            - `user` object: The user who submitted the review.
              - …
            - `state` string: The state of the review.
          - `proof_of_presence` object, nullable: The proof of presence evaluation for the pull request. Null if proof of presence was not evaluated.
            - `state` string: The state of the proof of presence evaluation.
            - `code` string: A code describing the reason for the proof of presence state.
            - `base_sha` string: The base commit SHA the proof of presence evaluation applies to. Empty if unavailable.
            - `head_sha` string: The head commit SHA the proof of presence evaluation applies to. Empty if unavailable.
            - `required_level` string: The authentication level required by the rule. Empty if unavailable.
            - `verified_level` string: The authentication level that was verified. Empty if proof of presence has not been completed.
            - `verified_at` string: The time proof of presence was verified, in ISO 8601 format. Empty if proof of presence has not been completed.
            - `verifier` object, nullable: The user who provided proof of presence. Null if no proof of presence was recorded.
              - …
      - object: Metadata for a required status checks rule evaluation result.
        - `checks` object[]: The status checks associated with the rule evaluation.
          - `id` integer: The unique identifier of the status check.
          - `context` string: The context name of the status check.
          - `state` string: The state of the status check.
          - `type` string: The type of the status check.
          - `app` object, nullable: The GitHub App associated with the status check.
            - `id` integer: The unique identifier of the GitHub App.
            - `slug` string: The slug of the GitHub App.
            - `name` string: The name of the GitHub App.
    - `details` string, nullable: The detailed failure message for the rule. Null if the rule passed.

## Other responses

- `404`: Resource not found
- `500`: Internal Error

## Changes

> 85 revisions in range; 1 not diffed.

- **2026-10-15** (2022-11-28) `2bf6ea0a5e8b`: 2 info
  - added the new optional `query` request parameter `include_metadata`
  - added the optional property `rule_evaluations/items/metadata` to the response with the `200` status

[Operation history](https://skmtc.dev/github/apis/rest/changes/repos/:owner/:repo/rulesets/rule-suites/:rule_suite_id/get.md)

---

[API](https://skmtc.dev/github/apis/rest.md) - [All operations](https://skmtc.dev/github/apis/rest/llms.txt) - [OpenAPI document](https://skmtc.dev/github/apis/rest/revisions/309e30296b21?raw)
