---
title: "Recent Commits"
method: GET
path: "/projects/{project_id}/repository/recent_commits"
tags: ["Repositories"]
---

# Recent Commits

`GET /projects/{project_id}/repository/recent_commits`

## Request

- Base URL: `https://sg.deployhq.com`
- URL: `https://sg.deployhq.com/projects/{project_id}/repository/recent_commits`
- Auth: HTTP basic

Returns recent commits and tags for the specified branch. Set update to '1' to fetch the latest data from the remote before returning results.
Renders the data for the commit selector popup

## Path parameters

- `project_id` string, required

## Query parameters

- `branch` string, required
- `update` string

## Response `200`

Success

- CommitsTagsReleasesObject
  - `commits` object[]
    - `ref` string, required
    - `author` string, required
    - `email` string, required
    - `timestamp` string
    - `message` string
    - `short_message` string
    - `tags` string[]
    - `avatar_url` string
  - `tags` object[]
    - `name` string, required
    - `ref` string, required
    - `message` string, required
  - `releases` object[]
    - `name` string
    - `ref` string

## Other responses

- `401`: You are not authorized to access this resource. You need to authenticate yourself first.
- `403`: You are not allowed to access this resource. You do not have the necessary permissions.
- `500`: An unexpected error occurred on the server. The server was unable to process the request.
- `502`: Repository Unreachable

---

[API](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation.md) · [All operations](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/revisions/830264ae58be?raw)
