Download PDF
Download page Upload ProGuard Mappings.
Upload ProGuard Mappings
This article explains on how to upload ProGuard mappings by using the Controller UI and REST APIs.
Upload ProGuard Mappings in the Controller UI
- From the left-hand panel, click Configuration.
- Click ProGuard Mapping & NDK Symbol Files.
This page lists the ProGuard Mapping uploads. Each upload has a unique Build ID. - Click Add ProGuard File.
- From the Upload Missing ProGuard Mapping dialog:
- Enter the version code (a number) for the package. This is the
versionCode
property specified in either theAndroidManifest.xml
file or thebuild.gradle
file of the application for which this mapping file was generated. - Click Choose File.
The uploader expects a file with the.txt
extension. The file is namedmapping.txt
. - In the file browser, locate and select the mapping file and click Open.
- Click Upload.
- Enter the version code (a number) for the package. This is the
Upload ProGuard Mappings with the REST API
The API uses HTTP basic authentication. The username is your Splunk AppDynamics EUM account name and the password is your EUM license key.
If you wish to disable this REST API and use the Controller API that uses the token-based upload, contact Cisco AppDynamics Support.
Send the mapping file
Send the mapping file as a text file in the body of the PUT request to the following URL:
https://api.eum-appdynamics.com/v2/account/<MyAccountName>/<androidPackageName>/<versionCode>/proguard-mapping
https://fra-api.eum-appdynamics.com/v2/account/<MyAccountName>/<androidPackageName>/<versionCode>/proguard-mapping
https://syd-api.eum-appdynamics.com/v2/account/<MyAccountName>/<androidPackageName>/<versionCode>/proguard-mapping
See Cisco AppDynamics SaaS Domains and IP Ranges for more EUM server locations.
These parameters are required:
MyAccountName
: the URL-encoded version of your account name.androidPackagename
: the name of the Android package for which this mapping file was generated.versionCode
: the string representation of the "versionCode" property specified in either theAndroidManifest.xml
file or thebuild.gradle
file of the application for which this mapping file was generated.
The request body contains the mapping file. You are required to add a Content-Type
header, -H Content-Type:text/plain,
and your account name and license key/password to the call.
Sample Request and Response Using the REST API
This is a sample request and response using the REST API.
Upload Request
The following example uses curl to send a ProGuard mapping file. You would use a similar command to send a DexGuard mapping file. The account name is "Example account" and the license key/password is "Example-License-Key-4e8ec2ae6cfe". The plus signs replace spaces in the account name when the account name is URL-encoded. The package name of the Android application is "com.example.networklogger". The mapping file corresponds to the version with versionCode
.
Android
curl -v -H Content-Type:text/plain --upload-file mapping.txt --user Example+account:Example-License-Key-4e8ec2ae6cfe https://api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1/proguard-mapping
iOS
curl -v -H Content-Type:text/plain --upload-file main.jsbundle.map" --user Example+account:Example-License-Key-4e8ec2ae6cfe https://api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1.0/iOS/jssource-mapping
Android
curl -v -H Content-Type:text/plain --upload-file mapping.txt --user Example+account:Example-License-Key-4e8ec2ae6cfe https://fra-api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1/proguard-mapping
iOS
curl -v -H Content-Type:text/plain --upload-file main.jsbundle.map" --user Example+account:Example-License-Key-4e8ec2ae6cfe https://fra-api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1.0/iOS/jssource-mapping
Android
curl -v -H Content-Type:text/plain --upload-file mapping.txt --user Example+account:Example-License-Key-4e8ec2ae6cfe https://syd-api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1/proguard-mapping
iOS
curl -v -H Content-Type:text/plain --upload-file main.jsbundle.map" --user Example+account:Example-License-Key-4e8ec2ae6cfe https://syd-api.eum-appdynamics.com/v2/account/Example+account/com.example.networklogger/1.0/iOS/jssource-mapping
Upload Response
The successful output of the example request looks like this:
* About to connect() to api.eum-appdynamics.com port 443 (#0)
* Trying ::1...
* connected
* Connected to api.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+account/com.example.networklogger/1/proguard-mapping HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: api.eum-appdynamics.com
> Accept: */*
> Content-Length: 4
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host api.eum-appdynamics.com left intact
* Closing connection #0
* About to connect() to fra-api.eum-appdynamics.com port 443 (#0)
* Trying ::1...
* connected
* Connected to fra-api.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+account/com.example.networklogger/1/proguard-mapping HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: fra-api.eum-appdynamics.com
> Accept: */*
> Content-Length: 4
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host fra-api.eum-appdynamics.com left intact
* Closing connection #0
* About to connect() to syd-api.eum-appdynamics.com port 443 (#0)
* Trying ::1...
* connected
* Connected to syd.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+account/com.example.networklogger/1/proguard-mapping HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: syd-api.eum-appdynamics.com
> Accept: */*
> Content-Length: 4
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host syd-api.eum-appdynamics.com left intact
* Closing connection #0
Check Uploaded Mapping Files Using the REST API
You can check to make sure that your mapping files have successfully uploaded using two REST APIs.
- Get a list of the GUIDs for the last 50 mapping files you have uploaded.
- Check if a specific mapping file has been uploaded.
Each upload has a unique Build ID. You can also view the uploads in the Controller UI. See Upload ProGuard Files.
List of the Last 50 Mapping Files Uploaded
The proguardQuery
method allows you to retrieve a list of GUIDs for up to the last 50 mapping files (ProGuard or DexGuard) that have been uploaded to your account, along with the time they were uploaded. The response is displayed as JSON, by upload time, with the most recent first.
Set up your authentication as described in Upload with the API.
Create a GET request of the form:
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://<EUM_Cloud/EUM_Server_Host:port>/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard
BASH- EUM_Cloud
refers to SaaS-based EUM Cloud URLs. For a complete list, see Cisco AppDynamics SaaS Domains and IP Ranges.- EUM_Server_Host
refers to the URL pointing to your on-premises EUM Server.- EUM_Account_Name
is your EUM account name.- GUID_To_Check
is the GUID of the ProGuard file in which you are interested.
Sample Request
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://fra-api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://syd-api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard
Sample Response
{"proguardFiles": [
{"packageName":"my_package_name1", "version":"1", "uploadTime":"mm/dd/yyyy 16:09:23","GUID":"my_build_id1"},
{"packageName":"my_package_name2", "version":"1", "uploadTime":"mm/dd/yyyy 16:09:23","GUID":"my_build_id2"}
]}
Check for Specific Mapping File by GUID
The checkForProguardFile
method allows you to check if a specific ProGuard or DexGuard file by GUID has been uploaded. The upload time is returned in the response.
- Set up your authentication as described in Upload with the REST API.
Create a GET request of the form:
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://<EUM_Cloud/EUM_Server_Host:port>/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard/guid/<GUID_To_Check>
BASH- EUM_Cloud
refers to SaaS-based EUM Cloud URLs. For a complete list, see Cisco AppDynamics SaaS Domains and IP Ranges.- EUM_Server_Host
refers to the URL pointing to your on-premises EUM Server.- EUM_Account_Name
is your EUM account name.- GUID_To_Check
is the GUID of the ProGuard file in which you are interested.Sample Request
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard/guid/my_build_id1
BASHcurl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://fra-api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard/guid/my_build_id1
BASHcurl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://syd-api.eum-appdynamics.com:443/v2/account/<EUM_Account_Name>/crash-symbol-file-query/proguard/guid/my_build_id1
BASH
Sample Response{"packageName":"mypackagename","version":"1","uploadTime":"mm/dd/yyyy 16:09:23","GUID":"my_build_id1"}
JSON
Use the Token to Upload ProGuard Mappings with the REST API
Ensure that the following property is enabled to use the token-based upload:
MAPPING_FILE_UPLOAD_API_DISABLED: True
The Controller API supports token-based authentication to upload ProGuard Mappings. This upload method requires the generated token and application ID along with your credentials.
Complete the following steps to upload the ProGuard mapping file:
- Generate a token to upload the file:
curl -L -X GET -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/fileUploadToken'
CODE - Obtain the application ID:
curl -L -X GET -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/getApplicationId/<App key>'
CODE - Upload the ProGuard mapping file:
curl -L -X POST -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/uploadProGuardFile/<applicationID>?token=<token>' -F 'fileData=@"<proguard file path>"' -F 'androidPackageName="<android Package Name>"' -F 'versionCode="<code version>"'
CODE