Source Map Upload API
To upload your source map files to Honeybadger, POST them to
https://api.honeybadger.io/v1/source_maps with the following parameters:
- The API key of your Honeybadger project (see the API Key tab in project settings).
*can be used as a wildcard.
- The minified file itself.
- The source map for your minified file.
revision(optional — default: "master")
- The deploy revision (i.e. commit sha) that your source map applies to. This could also be a code version. For best results, set it to something unique every time your code changes. The
revisionoption must also be configured in honeybadger.js.
<additional source files>(optional)
- One or more additional source files which may be referenced by your source map. The name should be the URL that would normally be used to access the file, and the value should be the file itself. Many source map generators include the sources in the
sourcesContentkey inside the source map, so you may not need to send these.
*in the name can be used as a wildcard.
Here's an example using
$ curl https://api.honeybadger.io/v1/source_maps \ -F api_key=PROJECT_API_KEY \ -F revision=dcc69529edf375c72df39b0e9195d60d59db18ff \ -F minified_url=https://example.com/assets/application.min.js \ -F source_map=@path/to/application.js.map \ -F minified_file=@path/to/application.min.js \ -F http://example.com/assets/application.js=@path/to/application.js \ -F http://example.com/assets/utils.js=@path/to/utils.js
/v1/source_maps API endpoint responds with the following codes:
- The files were uploaded successfully.
400- Bad Request
- You're missing a required parameter or have exceeded the maximum file size of 40MB per file (check the error message).
- Your API key is invalid.
In some cases you may want to upload the same source map for different URLs—for instance, if you serve your files from multiple subdomains, or via both HTTP and HTTPS.
An asterisk (
*) can be used in URLs to perform a wildcard match. For example, the following example will match both the
https:// version of the URL:
...matches the following URLs: