Skip to main content

Diese Version von GitHub Enterprise Server wurde eingestellt am 2024-07-09. Es wird keine Patch-Freigabe vorgenommen, auch nicht für kritische Sicherheitsprobleme. Für bessere Leistung, verbesserte Sicherheit und neue Features aktualisiere auf die neueste Version von GitHub Enterprise Server. Wende dich an den GitHub Enterprise-Support, um Hilfe zum Upgrade zu erhalten.

Die REST-API verfügt jetzt über eine Versionskontrolle. Weitere Informationen findest du unter Informationen zur API-Versionsverwaltung.

REST-API-Endpunkte für Sicherheits-Manager

Verwende die REST-API, um Sicherheits-Manager in einer Organisation zu verwalten.

Informationen zu Sicherheits-Managern

Hinweis: Die Rolle des Sicherheitsmanagers befindet sich in der öffentlichen Betaversion und unterliegt Änderungen.

„Sicherheits-Manager“ ist eine Rolle auf Organisationsebene, die Organisationsbesitzer jedem Team in einer Organisation zuweisen können. Damit erhält jedes Teammitglied die Berechtigung, Sicherheitswarnungen einzusehen und Einstellungen für die Codesicherheit in Ihrem Unternehmen zu verwalten, sowie Leseberechtigungen für alle Repositorys im Unternehmen.

List security manager teams

Lists teams that are security managers for an organization. For more information, see "Managing security managers in your organization."

The authenticated user must be an administrator or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

Parameter für „List security manager teams“

Header
Name, type, BESCHREIBUNG
accept string

Setting to application/vnd.github+json is recommended.

Pfadparameter
Name, type, BESCHREIBUNG
org string Erforderlich

The organization name. The name is not case sensitive.

HTTP-Antwortstatuscodes für „List security manager teams“

StatuscodeBESCHREIBUNG
200

OK

Codebeispiele für „List security manager teams“

Anforderungsbeispiel

get/orgs/{org}/security-managers
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers

Response

Status: 200
[ { "id": 1, "node_id": "MDQ6VGVhbTE=", "url": "https://HOSTNAME/teams/1", "html_url": "https://github.com/orgs/github/teams/justice-league", "name": "Justice League", "slug": "justice-league", "description": "A great team.", "privacy": "closed", "permission": "admin", "members_url": "https://HOSTNAME/teams/1/members{/member}", "repositories_url": "https://HOSTNAME/teams/1/repos", "parent": null } ]

Add a security manager team

Adds a team as a security manager for an organization. For more information, see "Managing security for an organization for an organization."

The authenticated user must be an administrator for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

Parameter für „Add a security manager team“

Header
Name, type, BESCHREIBUNG
accept string

Setting to application/vnd.github+json is recommended.

Pfadparameter
Name, type, BESCHREIBUNG
org string Erforderlich

The organization name. The name is not case sensitive.

team_slug string Erforderlich

The slug of the team name.

HTTP-Antwortstatuscodes für „Add a security manager team“

StatuscodeBESCHREIBUNG
204

No Content

409

The organization has reached the maximum number of security manager teams.

Codebeispiele für „Add a security manager team“

Anforderungsbeispiel

put/orgs/{org}/security-managers/teams/{team_slug}
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204

Remove a security manager team

Removes the security manager role from a team for an organization. For more information, see "Managing security managers in your organization team from an organization."

The authenticated user must be an administrator for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameter für „Remove a security manager team“

Header
Name, type, BESCHREIBUNG
accept string

Setting to application/vnd.github+json is recommended.

Pfadparameter
Name, type, BESCHREIBUNG
org string Erforderlich

The organization name. The name is not case sensitive.

team_slug string Erforderlich

The slug of the team name.

HTTP-Antwortstatuscodes für „Remove a security manager team“

StatuscodeBESCHREIBUNG
204

No Content

Codebeispiele für „Remove a security manager team“

Anforderungsbeispiel

delete/orgs/{org}/security-managers/teams/{team_slug}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/orgs/ORG/security-managers/teams/TEAM_SLUG

Response

Status: 204