---
title: "List commit history"
method: GET
path: "/api/repos/{namespace}/{repo_name}/commits/history/{resource}"
tags: ["Commits"]
---

# List commit history

`GET /api/repos/{namespace}/{repo_name}/commits/history/{resource}`

## Request

- Base URL: `https://hub.oxen.ai`
- URL: `https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/history/{resource}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oxen/apis/oxen-server/docs/api/repos/:namespace/:repo_name/commits/history/:resource/get.ts> (a function with typed inputs; its response is checked against the schema)

List paginated commit history for a revision or file path. Supports revision ranges (base..head) and path-specific history.

## Path parameters

- `namespace` string, required
- `repo_name` string, required
- `resource` string, required
- `page` integer, nullable, required
- `page_size` integer, nullable, required

## Response `200`

A page of commits, newest first. A revision's history carries its total count, and a file or directory's history reports whether a later page exists.

- union: A commit history response: a revision's history carries its totals, and a file or directory's history reports whether a later page exists.
  - PaginatedCommits
    - `oxen_version` string, nullable
    - `status` string, required
    - `status_message` string, required
    - `page_number` integer, required
    - `page_size` integer, required
    - `total_entries` integer, required
    - `total_pages` integer, required
    - `commits` Commit[], required
      - `author` string, required
      - `email` string, required
      - `id` string, required
      - `message` string, required
      - `parent_ids` string[], required
      - `timestamp` string, date-time, required
  - PathHistoryPage: One page of the commits that changed a file or directory, newest first. The history is not counted, so the page reports whether a later one exists rather than how many there are.
    - `oxen_version` string, nullable
    - `status` string, required
    - `status_message` string, required
    - `commits` Commit[], required
      - `author` string, required
      - `email` string, required
      - `id` string, required
      - `message` string, required
      - `parent_ids` string[], required
      - `timestamp` string, date-time, required
    - `has_more` boolean, required
    - `page_number` integer, required
    - `page_size` integer, required

## Other responses

- `404`: Repository or resource not found

---

[API](https://skmtc.dev/oxen/apis/oxen-server.md) - [All operations](https://skmtc.dev/oxen/apis/oxen-server/llms.txt) - [OpenAPI document](https://skmtc.dev/oxen/apis/oxen-server/revisions/8021aa6fa5bc?raw)
