Skip to main content
GET
Diff Version
Retrieve the difference between a version and the kept version before it; with fromVersionId, everything a range of versions changed; or, with baseVersionId, the difference from one version you name. Name the version by its own ID (versionId), or name the artifact (artifactId) to diff its current version. Text artifacts (markdown, html, code, text, json) return a word-level diff; csv artifacts return a line-level diff. Auth: the same read rules as Get Artifact. A version you cannot read answers 404 NOT_FOUND, the same as an unknown ID. Without fromVersionId, the diff is a version against the version kept before it; when the artifact keeps no earlier version (history off, the default), there is nothing to compare and payload is null. It is computed on first request and cached, so repeat calls are fast. With fromVersionId, the diff covers the versions from fromVersionId up to the diffed version: it compares the version just before fromVersionId with it. Use it to see what a run of saves changed in one diff, for example from the first to the last version an agent saved in one step. A range diff is computed on each request and not cached. fromVersionId equal to the diffed version is the plain diff. When fromVersionId is the earliest version there is nothing to compare against, so baseVersionId, baseVersion and payload are null. With baseVersionId, the diff compares that version itself with the diffed version: a draft file against its base, the same file in an earlier review round at the same step (each draft part on Get Task names its base.versionId). It must be a version of the same artifact, not later than the diffed version. It is computed on each request and not cached. Send fromVersionId or baseVersionId, never both.

Query Parameters

Send exactly one of versionId and artifactId. Any other query parameter is refused with 400 INVALID_FIELD.

Example Request

Example Response

Response Fields

Text payload (strategy: "text")

Rows payload (strategy: "rows")

Error Codes