Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,199 of 9,199 pages
About the help in other languages
All help pages

Endpoints

Paths are at the host's root with [Registry] CleanURLs (doc/hosting.md), else below /registry/serve/.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/ext/exp_package_registry/api.md

On this page

Endpoints

Paths are at the host's root with [Registry] CleanURLs (doc/hosting.md), else below /registry/serve/.

Composer v2

Path
GET /packages.jsonroot: 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>.jsontagged versions, minified ("minified": "composer/2.0"); Last-Modified, 304 on If-Modified-Since
GET /p2/<vendor>/<name>~dev.jsonbranches
GET /dists/<vendor>/<name>/<normalized>/<reference>.zipthe dist zip (counts a download); .sha256 and .sig beside it
POST /downloads/Composer's notify-batch (metadata mode)
GET /keys/registry.pubthe 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>/scansthe checks of the package's versions
GET /rest/statsdownloads 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 } } } }

Something wrong on this page? Report an error

Documentation license

This page is part of the documentation of the extension exp_package_registry and is distributed under the license of that extension.