{"meta":{"title":"适用于安全管理器的 REST API 端点","intro":"使用 REST API 管理组织中的安全管理器。","product":"REST API","breadcrumbs":[{"href":"/zh/rest","title":"REST API"},{"href":"/zh/rest/orgs","title":"组织"},{"href":"/zh/rest/orgs/security-managers","title":"安全管理员"}],"documentType":"article"},"body":"# 适用于安全管理器的 REST API 端点\n\n使用 REST API 管理组织中的安全管理器。\n\n## 关于安全管理器\n\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## List security manager teams\n\n```\nGET /orgs/{org}/security-managers\n```\n\nWarning\n\nClosing down notice: This operation is closing down and will be removed starting January 1, 2026. Please use the \"Organization Roles\" endpoints instead.\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- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n- **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/security-managers\n```\n\n**Response schema (Status: 200):**\n\nArray of `Team Simple`:\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `url`: required, string, format: uri\n  * `members_url`: required, string\n  * `name`: required, string\n  * `description`: required, string or null\n  * `permission`: required, string\n  * `privacy`: string\n  * `notification_setting`: string\n  * `html_url`: required, string, format: uri\n  * `repositories_url`: required, string, format: uri\n  * `slug`: required, string\n  * `ldap_dn`: string\n  * `type`: required, string, enum: `enterprise`, `organization`\n  * `organization_id`: integer\n  * `enterprise_id`: integer\n\n## Add a security manager team\n\n```\nPUT /orgs/{org}/security-managers/teams/{team_slug}\n```\n\nWarning\n\nClosing down notice: This operation is closing down and will be removed starting January 1, 2026. Please use the \"Organization Roles\" endpoints instead.\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- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`team_slug`** (string) (required)\n  The slug of the team name.\n\n### HTTP response status codes\n\n- **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/security-managers/teams/TEAM_SLUG\n```\n\n**Response schema (Status: 204):**\n\n## Remove a security manager team\n\n```\nDELETE /orgs/{org}/security-managers/teams/{team_slug}\n```\n\nWarning\n\nClosing down notice: This operation is closing down and will be removed starting January 1, 2026. Please use the \"Organization Roles\" endpoints instead.\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- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`team_slug`** (string) (required)\n  The slug of the team name.\n\n### HTTP response status codes\n\n- **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/security-managers/teams/TEAM_SLUG\n```\n\n**Response schema (Status: 204):**"}