GET /repos/{owner}/{repo}/activity

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."

Servers

Path parameters

Name Type Required Description
repo String Yes

The name of the repository without the .git extension. The name is not case sensitive.

owner String Yes

The account owner of the repository. The name is not case sensitive.

Query parameters

Name Type Required Description
activity_type String No

The activity type to filter by.

For example, you can choose to filter by "force_push", to see all force pushes to the repository.

Possible values:

  • "branch_creation"
  • "push"
  • "branch_deletion"
  • "pr_merge"
  • "merge_queue_merge"
  • "force_push"
direction String No

The direction to sort the results by.

Possible values:

  • "desc"
  • "asc"

Default value: "desc"

time_period String No

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).

Possible values:

  • "month"
  • "day"
  • "week"
  • "year"
  • "quarter"
per_page Integer No

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

Default value: 30

after String No

A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."

ref String No

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.

before String No

A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."

actor String No

The GitHub username to use to filter by the actor who performed the activity.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.