Upload build info and mappings
/buildsMeasure will use build information like mapping files and build sizes uploaded via this API for deobfuscation and to track app size changes.
This API only accepts the build metadata and does not actually upload the
files. It returns pre-signed URLs for uploading the files directly to the
returned URLs. For uploading the files, you can issue a standard http request
using cURL or any other way, using the upload_url as the URL and headers
as the headers for the upload request.
Usage notes:
-
Putting
build_sizefor the sameversion_name,version_codeandbuild_typecombination replaces the last size with the latest size. -
Depending on the platform,
build_typecan beaab,apkfor Android oripafor iOS. -
Depending on the platform, mapping
typecan beproguardfor Android,dsymorelf_debugfor iOS, orjsbundlefor React Native. -
mappingsis optional. When themappingsarray is not present, only the build size information will be updated. -
Each mapping file for iOS must be a gzipped tarball of
dSYMbundles ending with a.tgzfile extension. -
For React Native, upload the JS bundle and its sourcemap as two separate
jsbundlemappings in the same request, not bundled together. Each must be a gzipped tarball ending with.tgz, wrapping a single inner file: one.tgzcontaining the minified JS bundle (for examplemain.jsbundlefor iOS,index.android.bundlefor Android) and a second.tgzcontaining the matching sourcemap (for examplemain.jsbundle.map,index.android.bundle.map). Symbolication pairs the two server-side via the inner filename's.mapsuffix, so the inner filenames must follow the<bundle>/<bundle>.mapconvention. -
For Over-The-Air patches (for example CodePush for React Native, Shorebird for Flutter), use PUT
/builds/otainstead. -
For mapping filename, only provide the filename, not a path.
-
When
mappingsis present, the server returns a mappings array containing the pre-signed URL for uploading each mapping file. -
Each pre-signed mapping file upload URL has an expiry set which is the same as the
expires_atfield. -
Each mapping also contains a
headersobject containing all the header keys and values that should be added in the file upload request. Make sure all the headers are included in the file upload request, otherwise your file upload request will fail. -
File upload requests must use the PUT http method. Example:
curl -X PUT \ --header 'x-amz-meta-mapping_id: 77ac8159-9f0e-4cc7-a9f1-60c05fccd4dc' \ --header 'x-amz-meta-original_file_name: somefile.tgz' \ --data-binary @/path/to/somefile.tgz \ <upload-url>
Authorization
measureApiKey Measure API key for the app, sent as Authorization: Bearer <api-key>.
The app is determined from the API key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
App version info, build info and optional build mapping info.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/builds" \ -H "Content-Type: application/json" \ -d '{ "version_name": "1.0", "version_code": "10", "build_size": 10241024, "build_type": "ipa", "mappings": [ { "type": "dsym", "filename": "DemoApp.app.dSYM.tgz" }, { "type": "elf_debug", "filename": "app.symbols" }, { "type": "jsbundle", "filename": "main.jsbundle.tgz" }, { "type": "jsbundle", "filename": "main.jsbundle.map.tgz" } ] }'{ "ok": "build info updated"}{ "error": "string", "details": "string"}{ "error": "string"}{ "error": "string"}{ "error": "string"}Think this page can be better?
Open an issue