Skip to main content
REST API はバージョン化されました。 詳細については、「API のバージョン管理について」を参照してください。

Enterprise アクセス検証用の REST API エンドポイント

REST API を使って、GitHub Enterprise 内の Enterprise アクセスの検証構成を管理します。

Disable access restrictions for an enterprise

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

fine_grained_access

no_fine_grained_access

"Disable access restrictions for an enterprise" のパラメーター

ヘッダー
名前, タイプ, 説明
accept string

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

パスパラメーター
名前, タイプ, 説明
enterprise string 必須

The slug version of the enterprise name.

http_status_code

status_code説明
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

code_samples

data_residency_notice

request_example

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: 2026-03-10" \ 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.

fine_grained_access

no_fine_grained_access

"Enable access restrictions for an enterprise" のパラメーター

ヘッダー
名前, タイプ, 説明
accept string

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

パスパラメーター
名前, タイプ, 説明
enterprise string 必須

The slug version of the enterprise name.

http_status_code

status_code説明
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

code_samples

data_residency_notice

request_example

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: 2026-03-10" \ 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" }