{"meta":{"title":"Points de terminaison d’API REST pour les suites de règles","intro":"Utilisez l’API REST pour gérer les suites de règles pour les référentiels.","product":"API REST","breadcrumbs":[{"href":"/fr/rest","title":"API REST"},{"href":"/fr/rest/repos","title":"Référentiels"},{"href":"/fr/rest/repos/rule-suites","title":"Suites de règles"}],"documentType":"article"},"body":"# Points de terminaison d’API REST pour les suites de règles\n\nUtilisez l’API REST pour gérer les suites de règles pour les référentiels.\n\n\n> [!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n\n## List repository rule suites\n\n```\nGET /repos/{owner}/{repo}/rulesets/rule-suites\n```\n\nLists suites of rule evaluations at the repository level.\nFor more information, see \"Managing rulesets for a repository.\"\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n- **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n- **`ref`** (string)\n  The name of the ref. Cannot contain wildcard characters. Optionally prefix with refs/heads/ to limit to branches or refs/tags/ to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned.\n\n- **`time_period`** (string)\n  The time period to filter by.\nFor example, day will filter for rule suites that occurred in the past 24 hours, and week will filter for rule suites that occurred in the past 7 days (168 hours).\n  Default: `day`\n  Can be one of: `hour`, `day`, `week`, `month`\n\n- **`actor_name`** (string)\n  The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.\n\n- **`rule_suite_result`** (string)\n  The rule suite results to filter on. When specified, only suites with this result will be returned.\n  Default: `all`\n  Can be one of: `pass`, `fail`, `bypass`, `all`\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **500** - Internal Error\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/rulesets/rule-suites\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n  * `id`: integer\n  * `actor_id`: integer\n  * `actor_name`: string\n  * `before_sha`: string\n  * `after_sha`: string\n  * `ref`: string\n  * `repository_id`: integer\n  * `repository_name`: string\n  * `pushed_at`: string, format: date-time\n  * `result`: string, enum: `pass`, `fail`, `bypass`\n  * `evaluation_result`: string, enum: `pass`, `fail`, `bypass`\n\n\n\n\n\n## Get a repository rule suite\n\n```\nGET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\n```\n\nGets information about a suite of rule evaluations from within a repository.\nFor more information, see \"Managing rulesets for a repository.\"\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n- **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n- **`rule_suite_id`** (integer) (required)\n  The unique identifier of the rule suite result.\nTo get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites\nfor repositories and GET /orgs/{org}/rulesets/rule-suites\nfor organizations.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **500** - Internal Error\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/rulesets/rule-suites/RULE_SUITE_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: integer\n* `actor_id`: integer or null\n* `actor_name`: string or null\n* `before_sha`: string\n* `after_sha`: string\n* `ref`: string\n* `repository_id`: integer\n* `repository_name`: string\n* `pushed_at`: string, format: date-time\n* `result`: string, enum: `pass`, `fail`, `bypass`\n* `evaluation_result`: string or null, enum: `pass`, `fail`, `bypass`, `null`\n* `rule_evaluations`: array of objects:\n  * `rule_source`: object:\n    * `type`: string\n    * `id`: integer or null\n    * `name`: string or null\n  * `enforcement`: string, enum: `active`, `evaluate`, `deleted ruleset`\n  * `result`: string, enum: `pass`, `fail`\n  * `rule_type`: string\n  * `details`: string or null"}