Skip to main content
GET

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 client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Client-Version
string

Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Agent
string

Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.

X-GitHits-Session-ID
string

Optional caller-defined session ID: one to 64 ASCII letters, digits, underscores or hyphens, preserved exactly. Supply the header at most once. Invalid supplied IDs return 400 INVALID_SESSION_ID; no session is created.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_-]{1,64}$

Query Parameters

target
string
required

Required nonblank read target. Pass an emitted read action target unchanged: a documentation page ID or URL, a scoped site: target, a package in :[@] form, or a supported public repository locator. Repository refs use @. Encode literal + as %2B and literal # as %23.

path
string

Exact path from a read action, preserved after query decoding. Omit null or blank paths. For a scoped site, / reads its landing page; trailing slashes, query bytes, and literal percent bytes can identify distinct pages. Encode path as a query value without normalizing it. NUL and control characters are rejected. Pkgseer validates source-file paths within the addressed target; absolute paths, dot segments, and trailing slashes are invalid for source files.

start_line
integer

Optional positive inclusive start line. Either bound overrides a documentation URL fragment and requires content.

Required range: 1 <= x <= 2147483647
end_line
integer

Optional positive inclusive end line. It must not precede start_line and requires content.

Required range: 1 <= x <= 2147483647
wait_timeout_ms
integer
default:20000

Milliseconds to wait for code indexing, from 0 to 60000; defaults to 20000. Zero returns 503 PACKAGE_INDEXING immediately when code is not ready. Documentation reads do not use this budget for indexing. The overall request deadline includes the selected budget.

Required range: 0 <= x <= 60000
fields
string
default:metadata,content

Comma-separated metadata and content response groups; both are selected by default. Supplying fields replaces the defaults. Explicit line bounds require content; kind and branch identity remain present.

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.

Response

Documentation page or source file

A documentation page or source file, selected by kind.

docs_read_target
string
required

Exact target accepted by a subsequent read.

id
string
required

Opaque documentation page ID.

kind
enum<string>
required
Available options:
documentation
source
object
required

Mandatory source attribution and repository locator when applicable.

content
object

Page body and returned range, absent when unselected.

metadata
object

Atomic descriptive metadata, absent when unselected.