add, remove, and replace — applied to the envelope’s attribute and subject fields. You choose the scope of the comparison (all fields, only attributes, or the full envelope) and whether to include evidence attribution for the changed paths. A change_summary object gives you operation counts at a glance, and you can request cryptographic verification of both source snapshots in the same call.
GET /v1/subjects/:subject_type/:subject_id/diff
Compare two snapshots for a subject by their integer version numbers.Path parameters
Must be
"entity" or "individual".The subject’s stable identifier, e.g.
"ent_acme_001".Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
from_version | integer | — | Required. The snapshot version to diff from (the “before” state). Must be ≥ 1. |
to_version | integer | — | Required. The snapshot version to diff to (the “after” state). Must be ≥ 1. |
format | string | rfc6902 | Diff output format. Currently only "rfc6902" is supported. |
include | string | /subject,/attributes | Comma-separated JSON Pointer roots that scope the diff. Allowed values: /subject, /attributes, / (full envelope). Multiple roots are comma-separated, e.g. include=/subject,/attributes. |
include_attribution | string | changed_only | Whether to include evidence attribution for changed paths. "changed_only" adds an attribution array; "none" omits it. |
verify | string | none | Verification mode for both source snapshots: "none", "hash", or "chain". |
GET /v1/snapshots/:from_snapshot_id/diff/:to_snapshot_id
Compare two snapshots by their UUIDs. Both snapshots must belong to the same subject; Tally returns400 validation_error if they don’t.
Path parameters
UUID of the snapshot to diff from (the “before” state).
UUID of the snapshot to diff to (the “after” state). Must be a UUID for the same subject as
from_snapshot_id.Query parameters
Same as the version-based endpoint above, minusfrom_version and to_version.
| Parameter | Type | Default | Description |
|---|---|---|---|
format | string | rfc6902 | Diff output format. Only "rfc6902" is supported. |
include | string | /subject,/attributes | Scope of the diff. |
include_attribution | string | changed_only | Whether to annotate changed paths with evidence attribution. |
verify | string | none | Verification mode: "none", "hash", or "chain". |
Response shape
Both diff endpoints return the same response structure.Present on the version-based endpoint. Contains
subject_type and subject_id.Always
"rfc6902" in the current API version.References the “before” snapshot:
snapshot_id and snapshot_version.References the “after” snapshot:
snapshot_id and snapshot_version.Sorted array of JSON Pointer roots that scoped this diff, e.g.
["/attributes", "/subject"].Array of RFC 6902 patch operations. Each operation has
op ("add", "remove", or "replace"), path (a JSON Pointer string), and value (present for add and replace operations).A deterministic hash of the
ops array. Use this to confirm that two diff responses for the same snapshot pair produce identical operations.Aggregated operation counts.
Present when
include_attribution=changed_only (the default). An array of objects, one per distinct changed path, each containing:path— the JSON Pointer pathfrom— the evidence references from thefromsnapshot’sattribute_paths, ornullto— the evidence references from thetosnapshot’sattribute_paths, ornull
Present when
verify is not "none". Contains mode, hash, and chain sub-objects covering both the from and to snapshots.Example: relationship ownership change
The following diff compares version 3 and version 4 ofent_acme_001. Between those versions, a beneficial owner’s ownership_percent was updated from 35 to 40, and a new last_reviewed field was added to the relationship.
Example: diff with attribution
When you leaveinclude_attribution at its default (changed_only), Tally appends an attribution array that maps each changed path to the evidence items recorded in both snapshots.
Example: diff with hash verification
Passverify=hash to ask Tally to recompute and validate the envelope hash for both the from and to snapshots inline with the diff response.
Error responses
| HTTP status | Error code | When it occurs |
|---|---|---|
400 | validation_error | Missing or invalid from_version / to_version, invalid format, include, include_attribution, or verify value, or the two snapshot IDs belong to different subjects. |
404 | not_found | One or both of the requested snapshot versions (or IDs) do not exist for the subject. |
403 | forbidden | On tenant-scoped paths: the authenticated principal does not hold read_diff access for the subject. |