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

# Get root commit

`GET /api/repos/{namespace}/{repo_name}/commits/root`

## Request

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

Get the root (initial) commit of the repository, or None if empty.

## Path parameters

- `namespace` string, required
- `repo_name` string, required

## Response `200`

Root commit found (None if empty repository)

- RootCommitResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `commit` Commit
    - `author` string, required
    - `email` string, required
    - `id` string, required
    - `message` string, required
    - `parent_ids` string[], required
    - `timestamp` string, date-time, required

---

[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/2ae578129949?raw)
