Skip to main content
GET
Match metadata + component + licenses for one file

Authorizations

Authorization
string
header
required

An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.

Path Parameters

scanId
string<uuid>
required

Query Parameters

path
string
required

Path within the archive (e.g.

Response

Array of matches (possibly empty for no_match files).

id
string<uuid>
required

scans.file_components row id.

kind
enum<string>
required
Available options:
file,
snippet
component
object
required

Denormalised view of an scans.components row, embedded in MatchView.

licenses
object[]
required
matched_pct
integer | null
Required range: 0 <= x <= 100
line_ranges
object[]

All matched spans for this match, in order. A snippet may match several discontiguous ranges; a full-file match has none. Each span pairs a range in the scanned file with the corresponding OSS range (oss_* null when the scan did not report one).

oss_file_url
string | null

Relative URL the web UI fetches to retrieve the OSS file bytes (e.g. /v1/scans/<scanId>/oss-files/content?source_hash=<hash>). earnie-api proxies the upstream SCANOSS file-content service so the X-Api-Key header stays server-side. Null when source_hash is unavailable for this match.