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.
Tokens de acceso específicos para "Disable access restrictions for an enterprise"
Este punto de conexión no funciona con tokens de acceso de usuario de aplicación de GitHub, tokens de acceso de instalación de aplicaciones de GitHub ni tokens de acceso personales específicos.
Parámetros para "Disable access restrictions for an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
enterprise string RequeridoThe slug version of the enterprise name. |
Códigos de estado de respuesta HTTP para "Disable access restrictions for an enterprise"
status code | Descripción |
---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Ejemplos de código para "Disable access restrictions for an enterprise"
Si accedes a GitHub en GHE.com, reemplaza api.github.com
por el subdominio dedicado de la empresa en api.SUBDOMAIN.ghe.com
.
Ejemplo de solicitud
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.
Tokens de acceso específicos para "Enable access restrictions for an enterprise"
Este punto de conexión no funciona con tokens de acceso de usuario de aplicación de GitHub, tokens de acceso de instalación de aplicaciones de GitHub ni tokens de acceso personales específicos.
Parámetros para "Enable access restrictions for an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
enterprise string RequeridoThe slug version of the enterprise name. |
Códigos de estado de respuesta HTTP para "Enable access restrictions for an enterprise"
status code | Descripción |
---|---|
200 | OK |
400 | Forbidden |
404 | Resource not found |
500 | Internal Error |
Ejemplos de código para "Enable access restrictions for an enterprise"
Si accedes a GitHub en GHE.com, reemplaza api.github.com
por el subdominio dedicado de la empresa en api.SUBDOMAIN.ghe.com
.
Ejemplo de solicitud
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"
}