GET
/repos/{owner}/{repo}/activityList repository activities
Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users.
For more information about viewing repository activity, see "Viewing activity and data for your repository."
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
directionstringoptional
The direction to sort the results by.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
beforestringoptional
A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
afterstringoptional
A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
refstringoptional
The Git reference for the activities you want to list.
The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch.
actorstringoptional
The GitHub username to use to filter by the actor who performed the activity.
time_periodstringoptional
The time period to filter by.
For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours).
activity_typestringoptional
The activity type to filter by.
For example, you can choose to filter by "force_push", to see all force pushes to the repository.
200Response
idintegerrequired
node_idstringrequired
beforestringrequired
The SHA of the commit before the activity.
afterstringrequired
The SHA of the commit after the activity.
refstringrequired
The full Git reference, formatted as `refs/heads/<branch name>`.
timestampstringrequired
The time when the activity occurred.
activity_typestringrequired
The type of the activity that was performed.
actorobjectrequired
A GitHub user.
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<string>optional
Error handling
A 422 is returned: Validation failed, or the endpoint has been spammed.