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

REST API endpoints for enterprise access verification

Use the REST API to manage enterprise access verification configuration in your GitHub enterprise.

Disable access restrictions for an enterprise

Disable access restriction by proxy header using the network proxy owned by the enterprise.

Differenzierte Zugriffstoken für "Disable access restrictions for an enterprise"

Dieser Endpunkt funktioniert nicht mit GitHub-App-Benutzerzugriffstoken, GitHub-App-Installationszugriffstoken oder differenzierten persönlichen Zugriffstoken.

Parameter für „Disable access restrictions for an enterprise“

Header
Name, type, BESCHREIBUNG
accept string

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

Pfadparameter
Name, type, BESCHREIBUNG
enterprise string Erforderlich

The slug version of the enterprise name.

HTTP-Antwortstatuscodes für „Disable access restrictions for an enterprise“

StatuscodeBESCHREIBUNG
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

Codebeispiele für „Disable access restrictions for an enterprise“

Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com unter api.SUBDOMAIN.ghe.com mit der dedizierten Unterdomäne deines Unternehmens.

Anforderungsbeispiel

post/enterprises/{enterprise}/access-restrictions/disable
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/enterprises/ENTERPRISE/access-restrictions/disable

Response

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.

Differenzierte Zugriffstoken für "Enable access restrictions for an enterprise"

Dieser Endpunkt funktioniert nicht mit GitHub-App-Benutzerzugriffstoken, GitHub-App-Installationszugriffstoken oder differenzierten persönlichen Zugriffstoken.

Parameter für „Enable access restrictions for an enterprise“

Header
Name, type, BESCHREIBUNG
accept string

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

Pfadparameter
Name, type, BESCHREIBUNG
enterprise string Erforderlich

The slug version of the enterprise name.

HTTP-Antwortstatuscodes für „Enable access restrictions for an enterprise“

StatuscodeBESCHREIBUNG
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

Codebeispiele für „Enable access restrictions for an enterprise“

Wenn du unter GHE.com auf GitHub zugreifst, ersetze api.github.com unter api.SUBDOMAIN.ghe.com mit der dedizierten Unterdomäne deines Unternehmens.

Anforderungsbeispiel

post/enterprises/{enterprise}/access-restrictions/enable
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/enterprises/ENTERPRISE/access-restrictions/enable

Response

Status: 200
{ "message": "Enterprise access restrictions successfully enabled.", "header_name": "sec-GitHub-allowed-enterprise", "header_value": "12345" }