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

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

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

## 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/diff`
- 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`

What pushing the file would change in the repository.

- FileDiff
  - `path` string, required
  - `repoPath` string, required
  - `fileNodeId` string, required
  - `kind` 'markdown' | 'text' | 'config' | 'opaque', required
  - `change` 'none' | 'modified' | 'added' | 'deleted', required
  - `baseCommitSha` string, nullable, required: Commit the repository side of the diff was read at.
  - `unifiedDiff` string, required: Repository version to Falconer version; empty when equal.

## Other responses

- `400`: Bad request, or a folder that is not the sync root
- `403`: Two-way sync is not enabled or permission is missing
- `404`: Folder not synced, or file not found
- `422`: File has no text diff

---

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