Diff endpoints allow you to compare branches and identify changes to files, artifacts, and data. These are essential for change management and code review workflows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OpsMill/infrahub/llms.txt
Use this file to discover all available pages before exploring further.
Get Diff Files
Retrieve file differences from Git repositories between branches or time periods.Query Parameters
Name of the branch to compare. Defaults to the main branch.
Start time for the diff in absolute or relative format (e.g., “2024-01-01T00:00:00Z” or “-1d”)
End time for the diff in absolute or relative format (e.g., “2024-01-02T00:00:00Z” or “now”)
If true, only show changes specific to this branch. If false, show all changes.
Response
Returns a nested object structure organized by branch name and repository ID.Object containing repositories with file changes for the branch
Repository information and file changes
Repository unique identifier
Human-readable repository name
Starting commit hash
Ending commit hash
Branch name
Example
Example Response
Get Diff Artifacts
Retrieve artifact differences between the current branch and the default branch.Query Parameters
Name of the branch to compare against the default branch
Response
Returns an object mapping artifact IDs to their diff information.Artifact difference information
Artifact unique identifier
Branch name where the change occurred
Human-readable artifact name
Type of change: “added”, “updated”, “removed”, or “unchanged”
Example
Example Response
Compare Time Ranges
Branch Comparison Workflow
Authentication
All diff endpoints require authentication using either:- Bearer Token: Include
Authorization: Bearer YOUR_ACCESS_TOKENheader - API Key: Include
X-API-KEY: YOUR_API_KEYheader
Use Cases
- Change Review: Review all changes before merging a branch
- Impact Analysis: Understand which artifacts will be affected by schema or data changes
- Audit Trail: Track what changed and when in Git repositories
- CI/CD Integration: Automate checks based on file or artifact changes
Diff Actions
Theaction field in responses indicates the type of change:
added- New artifact or file createdupdated/modified- Existing artifact or file changedremoved/deleted- Artifact or file deletedunchanged- No changes detected