Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-GitHits-Client-Name
string

Optional trimmed printable ASCII client name, maximum 80 bytes.

X-GitHits-Client-Version
string

Optional trimmed printable ASCII client version, maximum 80 bytes.

X-GitHits-Agent
string

Optional trimmed printable ASCII agent attribution, maximum 160 bytes.

X-GitHits-Session-ID
string

Optional session attribution, maximum 128 printable ASCII bytes; malformed values are dropped.

Query Parameters

fields
string
default:files.patch

Finite comma-separated selectors: files, files.stats, and files.patch. The default is files.patch. Dependencies are additive; repeated selector tokens are idempotent. Unknown, empty, leaf, and wildcard selectors, plus repeated fields query parameters, are rejected.

Use the case-sensitive selectors in the catalogue. Order and duplicate selectors do not affect the result. ASCII whitespace around selectors is ignored. The decoded value is limited to 2048 UTF-8 bytes. Empty or unknown selectors and repeated fields query parameters return 400 VALIDATION_ERROR. A group does not include nested groups unless the catalogue says so; only listed wildcard bundles are supported.

Maximum string length: 2048

Body

application/json

Compare two package versions or two repository refs.

from_ref
string

Explicit base ref, at most 255 UTF-8 bytes.

from_version
string

Base package version or registry-compatible constraint.

max_files
integer<int32>
default:50

Maximum relevance-ranked files returned after filtering.

Required range: 1 <= x <= 300
max_patch_bytes
integer<int32>
default:262144

Total patch-byte budget, used only when files.patch is selected.

Required range: 1024 <= x <= 2097152
name
string

Package name; requires registry and both version endpoints.

path_glob
string

Repository-relative bounded glob intersected with path_prefix.

path_prefix
string

Repository-relative component prefix, normalized without edge slashes.

registry
enum<string>

Package registry; requires name and both version endpoints.

Available options:
npm,
pypi,
hex,
crates,
vcpkg,
zig,
nuget,
maven,
packagist,
rubygems,
go,
swift
repo_url
string

Supported credential-free public GitHub, GitLab or Codeberg URL.

to_ref
string

Explicit head ref, at most 255 UTF-8 bytes.

to_version
string

Head package version or registry-compatible constraint.

Response

Exact-tree inventory and selected content evidence

Resolved commits, complete inventory counts, and selected file details.

content_coverage
enum<string>
required

Coverage of optional content for returned files.

Available options:
not_requested,
complete,
partial,
failed
content_failure
null | object
required

Bounded content-phase failure; null unless content_coverage is failed.

files
object[]
required

Files in relevance order, limited by max_files; paths that cannot be represented are omitted.

from_resolution
object
required

Immutable base-side resolution used by the diff.

has_more_files
boolean
required

Whether additional matching files with representable paths were omitted by max_files.

package
null | object
required

Canonical package identity; null for repository addressing.

scope
object
required

Effective repository inventory scope and caller filters.

summary
object
required

Complete caller-filtered repository inventory counts before file projection.

to_resolution
object
required

Immutable head-side resolution used by the diff.