hosted

Push a package archive

Changed on

Stores the request body as the archive for name@version. It is served in place of the upstream archive with the same version and is never evicted. Generic files are pushed to /api/hosted/generic/{name}/{version}/{file} and served at /generic/hosted/{name}/{version}/{file}. A file that was already pushed is refused with 409; delete it first to push it again.

put/api/hosted/{ecosystem}/{name}/{version}

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header Authorization

Path parameters

ecosystemstring required

Ecosystem (npm, composer or generic)

namestring required

Package name, including an npm scope or the Composer vendor

versionstring required

Version

Query parameters

sha256string

Expected sha256 of the body, hex-encoded; a mismatch is refused

Response

Created

ecosystemstring
filenamestring
namestring
pushed_atstring
sha256string
sizeinteger
versionstring

Changes