ghreplica does not claim full GitHub parity. This document is the current supported subset.
GET /healthzGET /readyzGET /metricsPOST /webhooks/github
ghreplica now serves a versioned split between:
/v1/github/...for GitHub-compatible mirrored resources/v1/github-ext/...for explicit mirror-backed extensions that do not exist on GitHub itself/v1/changes/...for normalized Git-backed change data/v1/search/...for overlap and related-change queries
GET /v1/github/repos/{owner}/{repo}GET /v1/github/repos/{owner}/{repo}/issuesGET /v1/github/repos/{owner}/{repo}/issues/{number}GET /v1/github/repos/{owner}/{repo}/issues/{number}/commentsGET /v1/github/repos/{owner}/{repo}/pullsGET /v1/github/repos/{owner}/{repo}/pulls/{number}GET /v1/github/repos/{owner}/{repo}/pulls/{number}/reviewsGET /v1/github/repos/{owner}/{repo}/pulls/{number}/comments
POST /v1/github-ext/repos/{owner}/{repo}/objects/batch
Batch object-read request shape:
{
"objects": [
{ "type": "pull_request", "number": 24 },
{ "type": "issue", "number": 11 }
]
}Batch object-read response shape:
{
"results": [
{
"type": "pull_request",
"number": 24,
"found": true,
"object": {
"...": "stored GitHub-shaped payload"
}
},
{
"type": "issue",
"number": 11,
"found": false
}
]
}Current batch object-read rules:
- supported types:
pull_requestissue
- reads from the mirror only
- preserves request order
- returns one result per input object
- reports misses with
found: false - rejects malformed input with
400 Bad Request - currently caps requests at
100objects per call
GET /v1/changes/repos/{owner}/{repo}/statusGET /v1/changes/repos/{owner}/{repo}/pulls/{number}GET /v1/changes/repos/{owner}/{repo}/pulls/{number}/statusGET /v1/changes/repos/{owner}/{repo}/pulls/{number}/filesGET /v1/changes/repos/{owner}/{repo}/commits/{sha}GET /v1/changes/repos/{owner}/{repo}/commits/{sha}/filesGET /v1/changes/repos/{owner}/{repo}/compare/{base}...{head}
GET /v1/mirror/reposGET /v1/mirror/repos/{owner}/{repo}GET /v1/mirror/repos/{owner}/{repo}/status
Repository change-status response features:
targeted_refresh_pendingtargeted_refresh_runninginventory_generation_currentinventory_generation_buildinginventory_needs_refreshinventory_last_committed_atinventory_scan_runningbackfill_runningbackfill_generationbackfill_cursorbackfill_cursor_updated_atopen_pr_totalopen_pr_currentopen_pr_staleopen_pr_missinglast_error
GET /v1/search/repos/{owner}/{repo}/pulls/{number}/relatedPOST /v1/search/repos/{owner}/{repo}/pulls/by-pathsPOST /v1/search/repos/{owner}/{repo}/pulls/by-rangesGET /v1/search/repos/{owner}/{repo}/statusPOST /v1/search/repos/{owner}/{repo}/mentionsPOST /v1/search/repos/{owner}/{repo}/ast-grep
Text-search request features:
querymodeftsfuzzyregex
scopespull_requestsissuesissue_commentspull_request_reviewspull_request_review_comments
stateauthorlimitpage
Text-search response features:
-
status response:
repositoryownernamefull_name
text_index_statusdocument_countlast_indexed_atlast_source_update_atfreshnesscoveragelast_error
-
resourcetypeidnumberapi_urlhtml_url
-
matched_field -
excerpt -
score
Structural-search request features:
- exactly one target:
commit_sharefpull_request_number
languagerulepathschanged_files_onlylimit
Structural-search response features:
repositoryownernamefull_name
resolved_commit_sharesolved_refmatchespathstart_linestart_columnend_lineend_columntextmeta_variables
truncated
The ghr CLI now covers all three read surfaces:
repo,issue, andprmap to/v1/github/...changesmaps to/v1/changes/...searchmaps to/v1/search/...
See CLI for the command mapping and examples.
- compatibility is strongest for the repository, issue, and pull endpoints listed in Compatibility Strategy
- comments and reviews are mirrored and served, but do not yet have the same breadth of contract coverage as the core read endpoints
GET /v1/mirror/repos/{owner}/{repo}andGET /v1/mirror/repos/{owner}/{repo}/statusare intentionallyghreplica-specific and expose mirror metadata and live sync state- the versioned path structure for new work is
/v1/github/...,/v1/changes/..., and/v1/search/... - unsupported endpoints should be treated as out of scope until explicitly added here
- text-search endpoints stay under
/v1/search/..., not/v1/github/... - structural
ast-grepsearch also stays under/v1/search/...because it is a derived Git-mirror feature, not a GitHub-native resource POST /v1/github-ext/repos/{owner}/{repo}/objects/batchis an explicit extension endpoint; the endpoint shape isghreplica-specific, but any returnedobjectpayload is still the stored GitHub-shaped resource