List the indexed versions of one nixpkgs attribute
GET/api/packages/{attr}
getNixPackage
Returns every (version, system) the corpus carries for `attr`, with each row's availability. Versions are ordered as TEXT, which is not a version ordering — nixpkgs versions are not semver, so there is deliberately no `latest`. Pass `?version=` to ask about one version specifically. A version the corpus does not carry comes back in `requested` with `availability: not_indexed`, which means the pair predates the indexed window — it is never a stored row.
Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.
curl
curl -X GET 'https://neosource.dev/api/packages/ATTR'fetch
fetch("https://neosource.dev/api/packages/ATTR", {
method: "GET",
});Path parameters
attrrequiredThe nixpkgs attribute path, e.g. `python311`.
Query parameters
versionAsk about one specific version. See [`NixPackageVersionsResponse::requested`].
Responses
200Indexed versions
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 404Not Found — one of: not_found
- 429Rate limited — retry after the interval in 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.
PackageAvailability
Whether a package's bytes can be fetched, and if not, why not. The distinction the enum exists to hold is one a narinfo probe **cannot** make on its own: a `404` from `cache.nixos.org` is the same `404` whether nixpkgs never built the pair or the pair predates the corpus entirely. What tells them apart is *presence in the index*, not the probe.
"substitutable""never_built""not_indexed"