The JSPM API is hosted at
https://api.jspm.io and provides some hosted package management services
for JSPM workflows.
Like the CDN itself, this API is designed to have reliable uptime and includes autoscaling under higher load.
The service is supported by project donations and is approaching sustainability. If you plan to heavily rely on this API, and anticipate bringing heavier load, support for the project would always be appreciated.
Build Queue Request
https://api.jspm.io/build API provides an API for requesting a build of a new package that was recently published and hasn't yet been prioritised in the JSPM build queue.
This API accepts any
GET request of the form:
It is important to ensure the exact semver version is provided.
The JSON response will either provide an
"error" field or successfully send the biuld to the JSPM CDN build queue.
https://api.jspm.io/generate API provides a hosted version of JSPM Generator running
as a service.
https://api.jspm.io/generate API accepts either a
GET or a
POST requests are taken as JSON, and return JSON for all requests.
Error responses will always have an
error field and non-error responses will always omit an
When making a
GET request, each of the arguments is encoded as a string, comma-separated string or JSON encoding for objects, as appropriate.
The main argument to provide is the
install list which is an array of targets - this is the list of package targets to install, of the form:
The registry is optional, the version can be a partial version like
@5 or even just
@ for the latest non-stable version, and the subpath is optional as well.
env is a list of environment condition strings. The default is
['browser', 'development', 'module']. It is usually advisable
to provide the
module condition to ensure ESM modules are used wherever possible.
inputMap import map (with imports and scopes) can be provided for custom manual resolutions that should take precedence in the output map.
The provider sets the
defaultProvider option in JSPM Generator. Supported options are
'jspm' | 'jspm.system' | 'skypack' | 'jsdelivr' | 'unpkg'.
When provided, this option will return an import map with just
imports and no scopes whenever possible.