Measure logo
REST API ReferenceSDK APIBuilds

Upload build info and mappings

PUT/builds

Measure 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_size for the same version_name, version_code and build_type combination replaces the last size with the latest size.

  • Depending on the platform, build_type can be aab, apk for Android or ipa for iOS.

  • Depending on the platform, mapping type can be proguard for Android, dsym or elf_debug for iOS, or jsbundle for React Native.

  • mappings is optional. When the mappings array is not present, only the build size information will be updated.

  • Each mapping file for iOS must be a gzipped tarball of dSYM bundles ending with a .tgz file extension.

  • For React Native, upload the JS bundle and its sourcemap as two separate jsbundle mappings in the same request, not bundled together. Each must be a gzipped tarball ending with .tgz, wrapping a single inner file: one .tgz containing the minified JS bundle (for example main.jsbundle for iOS, index.android.bundle for Android) and a second .tgz containing the matching sourcemap (for example main.jsbundle.map, index.android.bundle.map). Symbolication pairs the two server-side via the inner filename's .map suffix, so the inner filenames must follow the <bundle> / <bundle>.map convention.

  • For Over-The-Air patches (for example CodePush for React Native, Shorebird for Flutter), use PUT /builds/ota instead.

  • For mapping filename, only provide the filename, not a path.

  • When mappings is 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_at field.

  • Each mapping also contains a headers object 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
AuthorizationBearer <token>

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"}
Empty
Empty
{  "error": "string"}
Empty

Think this page can be better?

Open an issue