---
title: "Get diff for a sync item"
method: GET
path: "/sync/items/{itemId}/diff"
tags: ["sync"]
---

# Get diff for a sync item

`GET /sync/items/{itemId}/diff`

Returns the diff between local and remote versions of a sync item

## Path parameters

- `itemId` string, required

## Query parameters

- `remoteNode` string

## Response `200`

Diff retrieved successfully

- SyncItemDiffResponse — Diff between local and remote versions of a sync item
  - `itemId` string, required — The sync item identifier
  - `filePath` string, required — Relative file path with extension
  - `status` 'synced' | 'modified' | 'untracked' | 'conflict' | 'missing', required — Sync status of an item
  - `kind` 'dag' | 'doc' | 'doc-asset' | 'file' — Type of sync item
  - `binary` boolean — True for binary items; content fields are omitted and sizes are reported instead
  - `localContent` string — Current local file content. Omitted for binary items.
  - `remoteContent` string — Content from remote repository. Omitted for binary items.
  - `localSize` integer — Local file size in bytes. Only set for binary items.
  - `remoteSize` integer — Remote file size in bytes. Only set for binary items.
  - `remoteCommit` string — Commit hash being compared against
  - `remoteAuthor` string — Author of the remote commit
  - `remoteMessage` string — Commit message of the remote version
  - `remoteDeleted` boolean — Whether the remote file was deleted
  - `localExecutable` boolean — Whether the local supporting file is executable
  - `remoteExecutable` boolean — Whether the remote supporting file is executable

## Other responses

- `404` — Sync item not found
- `default` — Unexpected error

## Changes

- **2026-08-30** (v1) `9fcb8e054188` — 1 warning, 3 info
  - added the new `file` enum value to the `kind` response property for the response status `200`
  - added the optional property `localExecutable` to the response with the `200` status
  - added the optional property `remoteDeleted` to the response with the `200` status
  - added the optional property `remoteExecutable` to the response with the `200` status
- **2026-08-09** (v1) `7ae18b0c7883` — 1 breaking, 4 info
  - the response property `localContent` became optional for the status `200`
  - added the optional property `binary` to the response with the `200` status
  - added the optional property `kind` to the response with the `200` status
  - added the optional property `localSize` to the response with the `200` status
  - …1 more
- **2026-07-23** (v1) `75b8e91aaf57` — 6 warning
  - added the new `conflict` enum value to the `code` response property for the response status `404`
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `404`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `default`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/dagucloud/apis/dagu/changes/sync/items/:itemId/diff/get.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/9fcb8e054188/schema)
