Skip to main content
Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.

We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the Actions REST API page.

Registro de auditoría

Get the audit log for an enterprise

Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the admin:enterprise scope.


Nombre, Tipo, Descripción

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

Parámetros de ruta
Nombre, Tipo, Descripción

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parámetros de consulta
Nombre, Tipo, Descripción

A search phrase. For more information, see Searching the audit log.


The event types to include:

  • web - returns web (non-Git) events.
  • git - returns Git events.
  • all - returns both web and Git events.

The default is web.

Puede ser una de las siguientes: web, git, all


A cursor, as given in the Link header. If specified, the query only searches for events after this cursor.


A cursor, as given in the Link header. If specified, the query only searches for events before this cursor.


The order of audit log events. To list newest events first, specify desc. To list oldest events first, specify asc.

The default is desc.

Puede ser una de las siguientes: desc, asc


Page number of the results to fetch.

Predeterminado: 1


The number of results per page (max 100).

Predeterminado: 30

Códigos de estado de respuesta HTTP

Código de estadoDescripción


Ejemplos de código

curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \


Status: 200
[ { "@timestamp": 1606929874512, "action": "team.add_member", "actor": "octocat", "created_at": 1606929874512, "_document_id": "xJJFlFOhQ6b-5vaAFy9Rjw", "org": "octo-corp", "team": "octo-corp/example-team", "user": "monalisa" }, { "@timestamp": 1606507117008, "action": "org.create", "actor": "octocat", "created_at": 1606507117008, "_document_id": "Vqvg6kZ4MYqwWRKFDzlMoQ", "org": "octocat-test-org" }, { "@timestamp": 1605719148837, "action": "repo.destroy", "actor": "monalisa", "created_at": 1605719148837, "_document_id": "LwW2vpJZCDS-WUmo9Z-ifw", "org": "mona-org", "repo": "mona-org/mona-test-repo", "visibility": "private" } ]