---
title: "Get diff tree"
method: GET
path: "/api/repos/{namespace}/{repo_name}/compare/{base_head}/tree"
tags: ["Compare"]
---

# Get diff tree

`GET /api/repos/{namespace}/{repo_name}/compare/{base_head}/tree`

## Request

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

Get a tree structure of directories that have changed between two revisions.

## Path parameters

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

## Response `200`

Directory diff tree found successfully

- DirTreeDiffResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `dirs` DirDiffTreeSummary[], required
    - `can_display` boolean, required
    - `children` DirDiffStatus[], required
      - `name` string, required
      - `status` 'added' | 'modified' | 'removed', required
    - `name` string, required
    - `num_subdirs` integer, required
    - `status` 'added' | 'modified' | 'removed', required

## Other responses

- `404`: Repository or one of the revisions 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/2ae578129949?raw)
