apicheats.dev github/llms.txt Raw .md
GET

GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id} — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Get a repository rule suite

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 263 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X GET 'https://api.github.com/repos/example-owner/example-repo/rulesets/rule-suites/10?include_metadata=false' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10'

Parameters

Name In Type Required Description
owner path string Yes The account owner of the repository. The name is not case sensitive.
repo path string Yes The name of the repository without the `.git` extension. The name is not case sensitive.
rule_suite_id path integer Yes The unique identifier of the rule suite result. To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites) for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites) for organizations.
include_metadata query boolean No When set to `true`, the response will include additional metadata for pull request and required status check rule evaluation. Results are capped at 50 entries.

Response 200 OK

{
  "id": 0,
  "actor_id": 0,
  "actor_name": "string",
  "before_sha": "string",
  "after_sha": "string",
  "ref": "string",
  "repository_id": 0,
  "repository_name": "string",
  "pushed_at": "2011-01-26T19:06:43Z",
  "result": "pass",
  "evaluation_result": "pass",
  "rule_evaluations": [
    {
      "rule_source": {
        "type": "string",
        "id": 0,
        "name": "string"
      },
      "enforcement": "active",
      "result": "pass",
      "rule_type": "string",
      "metadata": {
        "pull_request": {
          "id": 0,
          "number": 0,
          "user": {
            "id": "[recursive or deeply nested schema]",
            "login": "[recursive or deeply nested schema]",
            "type": "[recursive or deeply nested schema]"
          },
          "reviews": [
            "[recursive or deeply nested schema]"
          ],
          "proof_of_presence": {
            "state": "[recursive or deeply nested schema]",
            "code": "[recursive or deeply nested schema]",
            "base_sha": "[recursive or deeply nested schema]",
            "head_sha": "[recursive or deeply nested schema]",
            "required_level": "[recursive or deeply nested schema]",
            "verified_level": "[recursive or deeply nested schema]",
            "verified_at": "[recursive or deeply nested schema]",
            "verifier": "[recursive or deeply nested schema]"
          }
        }
      },
      "details": "string"
    }
  ]
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.