---
title: "GET /api/v1/two-way-sync/{spaceId}/files/history"
method: GET
path: "/api/v1/two-way-sync/{spaceId}/files/history"
---

# GET /api/v1/two-way-sync/{spaceId}/files/history

`GET /api/v1/two-way-sync/{spaceId}/files/history`

## Request

- Base URL: `https://falconer.com` (the document declares no server; this is the origin it was published from)
- URL: `https://falconer.com/api/v1/two-way-sync/{spaceId}/files/history`
- Auth: none declared

## Path parameters

- `spaceId` integer, required: Space id, from GET /spaces.

## Query parameters

- `path` string: Path relative to the sync root. Pass this or fileNodeId.
- `fileNodeId` string

## Headers

- `x-organization-id` string: Required when using OAuth bearer tokens.

## Response `200`

A page's last pushed and pulled commits and its open pull request.

- TwoWaySyncFileHistory
  - `path` string, required
  - `repository` object, nullable, required
    - `owner` string, required
    - `repo` string, required
    - `fullName` string, required
    - `url` string, required
  - `mergeStrategy` 'direct_commit' | 'review_request' | 'pull_request', nullable, required
  - `pushed` object, nullable, required: The last commit Falconer pushed for this page.
    - `sha` string, required
    - `shortSha` string, required
    - `url` string, required
    - `message` string, required
    - `authoredAt` string, nullable, required
    - `author` object, nullable, required
      - `name` string, nullable, required
      - `login` string, nullable, required
      - `avatarUrl` string, nullable, required
    - `pr` object, nullable, required
      - `number` integer, required
      - `title` string, required
      - `url` string, required
  - `source` object, nullable, required: The last repository commit this page was pulled from.
    - `sha` string, required
    - `shortSha` string, required
    - `url` string, required
    - `message` string, required
    - `authoredAt` string, nullable, required
    - `author` object, nullable, required
      - `name` string, nullable, required
      - `login` string, nullable, required
      - `avatarUrl` string, nullable, required
    - `pr` object, nullable, required
      - `number` integer, required
      - `title` string, required
      - `url` string, required
  - `openPullRequest` object, nullable, required
    - `number` integer, required
    - `url` string, required
    - `isMine` boolean, required

## Other responses

- `400`: Bad request, or a folder that is not the sync root
- `403`: Permission is missing
- `404`: Folder not synced, or file not found
- `422`: The file is not a markdown page

---

[API](https://skmtc.dev/falconer/apis/falconer-public-api.md) · [All operations](https://skmtc.dev/falconer/apis/falconer-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/falconer/apis/falconer-public-api/revisions/7b303b7ddf6a?raw)
