REST-API-Endpunkte für die Überprüfung des Unternehmenszugriffs
Verwende die REST-API, um die Konfiguration der Überprüfung des Unternehmenszugriffs in deinem GitHub-Unternehmen zu verwalten.
Disable access restrictions for an enterprise
Disable access restriction by proxy header using the network proxy owned by the enterprise.
Feinkörnige Zugriffstoken für "Disable access restrictions for an enterprise"
Dieser Endpunkt funktioniert nicht mit GitHub App-Benutzerzugriffstoken, GitHub App-Installationszugriffstoken oder fein abgestimmten persönlichen Zugriffstoken.
Parameter für "Disable access restrictions for an enterprise"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
enterprise string ErforderlichThe slug version of the enterprise name. |
HTTP-Antwortstatuscodes für "Disable access restrictions for an enterprise"
| Statuscode | BESCHREIBUNG |
|---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Codebeispiele für "Disable access restrictions for an enterprise"
Wenn Sie bei GHE.com auf GitHub zugreifen, ersetzen Sie api.github.com durch die dedizierte Unterdomäne Ihres Unternehmens unter api.SUBDOMAIN.ghe.com.
Anforderungsbeispiel
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/access-restrictions/disableResponse
Status: 200{
"message": "Enterprise access restrictions successfully disabled.",
"header_name": "sec-GitHub-allowed-enterprise",
"header_value": "12345"
}Enable access restrictions for an enterprise
Enable access restriction by proxy header using the network proxy owned by the enterprise.
Feinkörnige Zugriffstoken für "Enable access restrictions for an enterprise"
Dieser Endpunkt funktioniert nicht mit GitHub App-Benutzerzugriffstoken, GitHub App-Installationszugriffstoken oder fein abgestimmten persönlichen Zugriffstoken.
Parameter für "Enable access restrictions for an enterprise"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
enterprise string ErforderlichThe slug version of the enterprise name. |
HTTP-Antwortstatuscodes für "Enable access restrictions for an enterprise"
| Statuscode | BESCHREIBUNG |
|---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Codebeispiele für "Enable access restrictions for an enterprise"
Wenn Sie bei GHE.com auf GitHub zugreifen, ersetzen Sie api.github.com durch die dedizierte Unterdomäne Ihres Unternehmens unter api.SUBDOMAIN.ghe.com.
Anforderungsbeispiel
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/access-restrictions/enableResponse
Status: 200{
"message": "Enterprise access restrictions successfully enabled.",
"header_name": "sec-GitHub-allowed-enterprise",
"header_value": "12345"
}