Get the audit log for an organization
Gets the audit log for an organization. For more information, see "Reviewing the audit log for your organization."
By default, the response includes up to 30 events from the past three months. Use the phrase parameter to filter results and retrieve older events. For example, use the phrase parameter with the created qualifier to filter events based on when the events occurred. For more information, see "Reviewing the audit log for your organization."
Use pagination to retrieve fewer or more than 30 events. For more information, see "Using pagination in the REST API."
This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "Rate limits for the REST API" and "Best practices for integrators."
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:audit_log scope to use this endpoint.
Path parameters
The organization name. The name is not case sensitive.
Query parameters
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.
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.
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Response
Response