Endpoints
Paths are at the host's root with [Registry] CleanURLs (doc/hosting.md), else below /registry/serve/.
Composer v2
| Path | |
|---|---|
GET /packages.json | root: metadata-url, available-packages (public, plus the private ones the request's key opens), notify-batch, search, list, providers-api, and exp-registry (name, mode, public key, API URLs) |
GET /p2/<vendor>/<name>.json | tagged versions, minified ("minified": "composer/2.0"); Last-Modified, 304 on If-Modified-Since |
GET /p2/<vendor>/<name>~dev.json | branches |
GET /dists/<vendor>/<name>/<normalized>/<reference>.zip | the dist zip (counts a download); .sha256 and .sig beside it |
POST /downloads/ | Composer's notify-batch (metadata mode) |
GET /keys/registry.pub | the Ed25519 public key (base64), X-Key-Id header |
Every version in a p2 file has dist (url, type: zip, reference, shasum = SHA-1) and, when built here,
dist-signature: {"sha256": ..., "signature": "ed25519:<key id>:<base64>", "public-key": <url>}. The signature
is over the text exp-dist-v1:<sha256>:<package>:<version>:<reference>. Private packages have no source.
In [Registry] Mode=api these paths answer 404 with a reason.
License keys
Private packages answer only with a key whose scope covers them:
composer config http-basic.packages.exponential.earth <account> <key> # the key is the password
composer config bearer.packages.exponential.earth <key>No key: 401 with WWW-Authenticate: Basic. A key that does not cover the package: 403. Keys are made in
Setup > Package registry > License keys or with ./console ext:exp_package_registry:key create --scope=...; only
their SHA-256 is stored. In wave 3, exp_app_market makes them for purchases.
Packagist's API
GET /packages/list.json[?vendor=&type=&fields[]=type&fields[]=repository&fields[]=abandoned],
GET /search.json?q=&type=&per_page=&page=, GET /packages/<vendor>/<name>.json,
GET /packages/<vendor>/<name>/stats.json, GET /providers/<vendor>/<name>.json, in Packagist's shapes, so a
Packagist client (the App Store's Packagist source among them) works with the registry as it is.
REST (rest/)
| Path | |
|---|---|
GET /rest/ | name, mode, package count, public key, endpoints |
GET /rest/packages?q=&type=&vendor=&page= | packages, 15 a page |
GET /rest/packages/<vendor>/<name> | a package with maintainers, readme and every version (dist checksums, signature, checks) |
GET /rest/packages/<vendor>/<name>/versions/<version> | one version with its last scan |
GET /rest/packages/<vendor>/<name>/scans | the checks of the package's versions |
GET /rest/stats | downloads of the registry |
Read only in 1.0.0.
GraphQL
POST /graphql with {"query": "...", "variables": {...}} (or GET ?query=). The schema is in
classes/exppackageregistrygraphql.php; example:
{ package(name: "se7enxweb/exp_request_shield") { name latest downloads { total } versions(development: false) { version reference dist { sha256 signature } scan { state summary } } } }