Get current import/ingest job status
GET/api/repos/{owner}/{repo}/import-status
getRepositoryImportStatus
Returns the repo's lifecycle status plus a snapshot of the most recent import activity: the newest ingest job when one exists (`phase = "ingest"`, live object counters), else the fetch-phase state synthesized from the import job (`phase = "fetch"`). Sister surface to the `import-progress` SSE stream — same source of truth, single-shot rather than streamed, for first-paint fetches and non-streaming clients (CLI probes, tests). Live updates come from the SSE stream, not from polling this endpoint.
Authentication optional — this operation also accepts anonymous requests. When authenticating, use a bearer token or a session cookie.
curl
curl -X GET 'https://neosource.dev/api/repos/OWNER/REPO/import-status' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN'fetch
fetch("https://neosource.dev/api/repos/OWNER/REPO/import-status", {
method: "GET",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
},
});Path parameters
ownerrequiredRepository owner or organization slug.
reporequiredRepository name.
Responses
200Import status snapshot
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 403Forbidden — one of: forbidden
- 404Not Found — one of: not_found
- 423Locked — one of: busy
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
ImportPhase
Which part of the import lifecycle a snapshot describes. `Fetch` while the import worker pulls from the source forge (no ingest job yet, counters zero); `Ingest` once the pack is staged and the ingest worker is indexing it; `Metadata` once the git phases are done and a GitHub metadata backfill (issues/comments/labels — plans/github-metadata-import.md) is still in flight — its counters are **issues**, not objects. Plain pushes only ever see `Ingest`; imports without metadata sync never see `Metadata`. Modelled as an enum (not a free `String`) so the generated TS client gets a string-literal union the SPA can switch on exhaustively.
"fetch""ingest""metadata"
ImportJobState
Lifecycle of an ingest job mirrored to the wire. Matches `IngestJobStatus` so the SPA can switch on the same set of strings the SSE stream emits.
"pending""running""completed""failed"