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.
"Disable access restrictions for an enterprise" のきめ細かいアクセス トークン
このエンドポイントは、GitHub アプリのユーザー アクセス トークン、GitHub アプリのインストール アクセス トークン、またはきめ細かい個人用アクセス トークンでは機能しません。
"Disable access restrictions for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. |
"Disable access restrictions for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
"Disable access restrictions for an enterprise" のコード サンプル
GHE.com で GitHub にアクセスする場合は、api.github.com を api.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。
要求の例
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/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.
"Enable access restrictions for an enterprise" のきめ細かいアクセス トークン
このエンドポイントは、GitHub アプリのユーザー アクセス トークン、GitHub アプリのインストール アクセス トークン、またはきめ細かい個人用アクセス トークンでは機能しません。
"Enable access restrictions for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. |
"Enable access restrictions for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
"Enable access restrictions for an enterprise" のコード サンプル
GHE.com で GitHub にアクセスする場合は、api.github.com を api.SUBDOMAIN.ghe.com にあるエンタープライズの専用サブドメインに置き換えます。
要求の例
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/enableResponse
Status: 200{
"message": "Enterprise access restrictions successfully enabled.",
"header_name": "sec-GitHub-allowed-enterprise",
"header_value": "12345"
}