{"meta":{"title":"Puntos de conexión de la API de REST para reglas","intro":"Usa la API REST para administrar conjuntos de reglas para una empresa. Los conjuntos de reglas controlan cómo las personas pueden interactuar con repositorios y código.","product":"REST API","breadcrumbs":[{"href":"/es/enterprise-server@3.22/rest","title":"REST API"},{"href":"/es/enterprise-server@3.22/rest/enterprise-admin","title":"Administración empresarial"},{"href":"/es/enterprise-server@3.22/rest/enterprise-admin/rules","title":"Reglas"}],"documentType":"article"},"body":"# Puntos de conexión de la API de REST para reglas\n\nUsa la API REST para administrar conjuntos de reglas para una empresa. Los conjuntos de reglas controlan cómo las personas pueden interactuar con repositorios y código.\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## Get enterprise ruleset history\n\n```\nGET /enterprises/{enterprise}/rulesets/{ruleset_id}/history\n```\n\nGet the history of an enterprise ruleset.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\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- **`ruleset_id`** (integer) (required)\n  The ID of the ruleset.\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **404** - Resource not found\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/rulesets/RULESET_ID/history\n```\n\n**Response schema (Status: 200):**\n\nArray of `Ruleset version`:\n  * `version_id`: required, integer\n  * `actor`: required, object:\n    * `id`: integer\n    * `type`: string\n  * `updated_at`: required, string, format: date-time\n\n## Get enterprise ruleset version\n\n```\nGET /enterprises/{enterprise}/rulesets/{ruleset_id}/history/{version_id}\n```\n\nGet a version of an enterprise ruleset.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n- **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n- **`ruleset_id`** (integer) (required)\n  The ID of the ruleset.\n\n- **`version_id`** (integer) (required)\n  The ID of the version\n\n### HTTP response status codes\n\n- **200** - OK\n\n- **404** - Resource not found\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/rulesets/RULESET_ID/history/VERSION_ID\n```\n\n**Response schema (Status: 200):**\n\n* all of:\n  * **Ruleset version**\n    * `version_id`: required, integer\n    * `actor`: required, object:\n      * `id`: integer\n      * `type`: string\n    * `updated_at`: required, string, format: date-time\n  * **object**\n    * `state`: required, object"}