On-demand GitHub source materialization
Resolves a GitHub org/repo coordinate to a registry source. Idempotent — if the source already exists, returns it with status: "existing"; otherwise probes GitHub, inserts a hidden on_demand source row (and a new on_demand org when no curated org claims the segment), and ingests up to 100 releases.
Negative results (not_found, empty) are cached in KV (24h and 6h respectively) so repeat probes don't re-hit GitHub. deferred outcomes (rate-limit, 5xx) are not cached and let the next cron pass retry.
Body requires provider: "github" — other providers are explicitly rejected, not silently accepted. Coordinate must match {org}/{repo} (case-insensitive; URLs are deduped via LOWER(sources.url)).
bearerAuthAuthorizationBearer <relk_… | relu_… | OAuth JWT>Machine/operator tokens use the relk_ prefix; self-serve read-only user keys use relu_; Sign in with Releases supplies an OAuth access token. Required scope depends on the endpoint.
application/json- body
provider*stringcoordinate*string^[^/\s]+\/[^/\s]+$Lookup result. Inspect status to disambiguate outcomes.
application/json- response
status*string"indexed""existing""empty""not_found""deferred"source?releases?array<>relatedOrg*|nullcurl -X POST 'https://api.releases.sh/v1/lookups' \ -H 'Content-Type: application/json' \ -d '{ "provider": "github", "coordinate": "string"}'{ "status": "indexed", "source": { "id": "string", "slug": "string", "name": "string", "type": "string", "url": "string", "orgId": "string", "productId": "string", "isHidden": true, "discovery": "curated", "metadata": "string", "stars": 0, "starsFetchedAt": "string", "createdAt": "string", "property1": null, "property2": null }, "releases": [ { "id": "string", "sourceId": "string", "version": "string", "title": "string", "url": "string", "publishedAt": "string", "property1": null, "property2": null } ], "relatedOrg": { "org": { "id": "string", "slug": "string", "name": "string" }, "sources": [ { "id": "string", "slug": "string", "name": "string", "url": "string" } ] }}