---
title: "List commits"
method: GET
path: "/api/projects/{projectId}/branches/{branchId}/commits"
tags: ["Branches"]
---

# List commits

`GET /api/projects/{projectId}/branches/{branchId}/commits`

Retrieves a paginated list of commits for a branch.

## Path parameters

- `branchId` union, required
  - string, uuid
  - 'main'
- `projectId` string, uuid, required

## Query parameters

- `page` number
- `perPage` number
- `search` string

## Response `200`

Paginated list of commits

- object — Paginated list of commits
  - `data` object[], required — List of commits
    - `id` string, uuid, required — Commit ID
    - `message` string, nullable, required — Commit message
    - `branchId` string, uuid, required — Branch ID
    - `projectId` string, uuid, required — Project ID
    - `createdById` string, uuid, nullable, required — ID of user who created the commit
    - `createdBy` object, nullable — User who created the commit
      - `id` string, uuid, required — User ID
      - `email` string, required — User email
      - `firstName` string, nullable, required — User first name
      - `lastName` string, nullable, required — User last name
    - `createdAt` string, date-time, required — Creation timestamp
    - `files` unknown[] — Commit files
      - unknown
  - `pagination` object, required — Pagination information
    - `current` number, required — Current page number
    - `from` number, required — Starting record number
    - `to` number, required — Ending record number
    - `total` number, required — Total number of records
    - `pageSize` number, required — Number of records per page

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
