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 session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.

Query Parameters

target
string
required

Required nonblank documentation page ID or docs_read_target; when path is present, a code target in :[@] form or a supported public repository locator. Repository refs use @. Encode literal + as %2B and a documentation fragment marker as %23; literal # is not supported in code targets.

path
string

Exact target-relative source-file path. Omit or leave blank for documentation. The UTF-8 value is limited to 500 bytes and must not be absolute, use backslashes, contain . or .. path components, empty slash segments, NUL or control characters, or end in a slash.

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.