Diff two versions of an entity
GET /Platform/entities/{entity_type}/{entity_id}/diff
Diff two versions of an entity.
Modes (first match wins):
since/until: diff by timestamp window. Each timestamp resolves to the commit that was CURRENT as of that moment (the latest commit withcommitted_at <= ts). Accepts any value thetimestampdtype parses (ISO-8601,2026-06-22,2026-06-22T18:00:00Z, etc.).sinceonly -> diff the as-of-sincestate against the current (latest) state. ("What changed since <ts>?")untilonly -> diff the initial state against the as-of-untilstate.- both -> diff the as-of-
sincestate against the as-of-untilstate.
last=N: diff the Nth most recent commit against its predecessor.last=1shows what the latest commit changed.commit_idonly: diff that commit against its immediate parent (auto-detected from history).commit_id+parent_commit_id: diff between the two explicit commits.
Returns {"diff", "changed_fields", "commit_id", "parent_commit_id", "committed_at"}.
Path parameters
entity_type: str. Entity class name.entity_id: str. Entity id to diff.
Query parameters
commit_id: optional str. Right-side commit (diffed against its parent unlessparent_commit_idis given).parent_commit_id: optional str. Left-side commit for an explicit two-commit diff.last: optional int. Diff the Nth most recent commit against its predecessor.since: optional str. Timestamp -> left side is the entity's state as of then (diff against current unlessuntilis given).until: optional str. Timestamp -> right side is the entity's state as of then.branch: optional str. Hilus branch (defaultmain).
Returns
EntityDiffResponse
diff: optional str or null. Unified diff; empty when the versions are identical.changed_fields: optional List[str] or null. Top-level fields that differ.commit_id: optional str or null. Right-side (newer) commit.parent_commit_id: optional str or null. Left-side (older) commit.committed_at: optional moment or null. When the right-side commit was made.
Example request
curl -X GET "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}/diff" \
-H "Authorization: Bearer $HILUS_API_KEY"