엔터프라이즈 검증을 위한 엔드포인트 REST API
REST API를 사용하여 GitHub 엔터프라이즈에서 엔터프라이즈 액세스 검증 구성을 관리합니다.
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"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe 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"에 대한 매개 변수
| 속성, 형식, 설명 |
|---|
accept string Setting to |
| 속성, 형식, 설명 |
|---|
enterprise string RequiredThe 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"
}