---
title: "Commits that changed one path, newest first"
description: "`git log --first-parent -- <path>`, paged. A page may stop short of\n`limit` when its walk spent its budget (`complete_page: false`); ask\nagain with `next`. Renames are not followed. The walk stops at\n10,000 commits from the ref (`capped`).\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.gitpando.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Pando API › repos

`GET /v1/monorepos/{owner}/{monorepo}/repos/{repo}/history`

`git log --first-parent -- <path>`, paged. A page may stop short of
`limit` when its walk spent its budget (`complete_page: false`); ask
again with `next`. Renames are not followed. The walk stops at
10,000 commits from the ref (`capped`).

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `getHistory.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `getHistory.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `getHistory.path.repo` (string, required) — The repo's `name` (`projects-web`).

## Query parameters

- `getHistory.query.ref` (string, optional)
- `getHistory.query.path` (string, optional) — A file or a folder. Default: the root (every commit).
- `getHistory.query.limit` (integer, optional)
  - min 1; max 100; default `30`
- `getHistory.query.cursor` (string, optional) — A `next` from an earlier page.

## Code samples

### cURL

```curl
curl --request GET \
  --url https://app.gitpando.com/v1/monorepos/string/string/repos/string/history \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/repos/string/history';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/repos/string/history"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "ref": "string",
  "path": "string",
  "commits": [
    {
      "sha": "string",
      "title": "string",
      "author": {
        "name": "string",
        "email": "string"
      },
      "at": "2019-08-24T14:15:22Z",
      "merged_branch": {
        "branch": "string",
        "title": "string"
      }
    }
  ],
  "next": "string",
  "capped": true,
  "complete_page": true
}
```

- `getHistory.response.200.ref` (string | null, required) — Null on a page asked with a cursor.
- `getHistory.response.200.path` (string, required)
- `getHistory.response.200.commits` (array<object>, required)
  - `getHistory.response.200.commits.sha` (string, required)
  - `getHistory.response.200.commits.title` (string, required) — The message's first line.
  - `getHistory.response.200.commits.author` (object, required)
    - `getHistory.response.200.commits.author.name` (string, optional)
    - `getHistory.response.200.commits.author.email` (string, optional)
  - `getHistory.response.200.commits.at` (string, required) — The author date.
    - format `date-time`
  - `getHistory.response.200.commits.merged_branch` (object | null, required) — On a merge into main, the branch it merged.
    - `getHistory.response.200.commits.merged_branch.branch` (string, optional)
    - `getHistory.response.200.commits.merged_branch.title` (string | null, optional)
- `getHistory.response.200.next` (string | null, required)
- `getHistory.response.200.capped` (boolean, required)
- `getHistory.response.200.complete_page` (boolean, required)

### 400

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getHistory.response.400.error` (object, required)
  - `getHistory.response.400.error.code` (string, required)
  - `getHistory.response.400.error.message` (string, required)
  - `getHistory.response.400.error.paths` (array<string>, optional)
  - `getHistory.response.400.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getHistory.response.400.error.checks.sha` (string | null, required)
    - `getHistory.response.400.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getHistory.response.400.error.checks.required` (array | null, required) — Null while unknown.
    - `getHistory.response.400.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getHistory.response.400.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getHistory.response.400.error.checks.statuses.sha` (string, required)
      - `getHistory.response.400.error.checks.statuses.context` (string, required)
      - `getHistory.response.400.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getHistory.response.400.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getHistory.response.400.error.checks.statuses.target_url` (string | null, optional)
      - `getHistory.response.400.error.checks.statuses.description` (string | null, optional)
      - `getHistory.response.400.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getHistory.response.400.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getHistory.response.400.error.checks.missing` (array<string>, optional)

### 404

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getHistory.response.404.error` (object, required)
  - `getHistory.response.404.error.code` (string, required)
  - `getHistory.response.404.error.message` (string, required)
  - `getHistory.response.404.error.paths` (array<string>, optional)
  - `getHistory.response.404.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getHistory.response.404.error.checks.sha` (string | null, required)
    - `getHistory.response.404.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getHistory.response.404.error.checks.required` (array | null, required) — Null while unknown.
    - `getHistory.response.404.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getHistory.response.404.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getHistory.response.404.error.checks.statuses.sha` (string, required)
      - `getHistory.response.404.error.checks.statuses.context` (string, required)
      - `getHistory.response.404.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getHistory.response.404.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getHistory.response.404.error.checks.statuses.target_url` (string | null, optional)
      - `getHistory.response.404.error.checks.statuses.description` (string | null, optional)
      - `getHistory.response.404.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getHistory.response.404.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getHistory.response.404.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/repos/getHistory/index.md
