Summary
This article will provide you the information on how to get started with the Appdome Python APIs.
https://github.com/Appdome/appdome-api-python.
Minimum Requirements
Python version 2.26 or newer
Installation
git clone https://github.com/Appdome/appdome-api-python
or download the GitHub repository and install it on your machine.
Setup your main environment variables
We use default ENV variables for some of the arguments required to run the APIs.
By populating and using these ENV variables you won't need to pass them into the python calls and will unclutter the arguments list when calling the scripts.
APPDOME_API_KEY
The Appdome API Key can be found under your Profile --> Security Release Management --> Account and API.
If you do not see an API key please contact us.
APPDOME_TEAM_ID
The Appdome TEAM ID can be found under your Profile --> Security Release Management --> Team Management. Hover over the team and click on the three 'dots' for details
to see the Team ID.
APPDOME_IOS_FS_ID / APPDOME_ANDROID_FS_ID
The Appdome FUSION SET ID can be found by selecting the relevant team in/to which your App(s) reside / upload.
Select the App from your list, select the relevant fusion set by clicking on the drop-down, and once selected click on Details to see your Fusion Set ID.
Note
If the fusion set you selected does not show a Fusion ID means that this is the default fusion set. Please select a fusion set that is not the default fusion set or create a new fusion set to work with.
APP_ID
The APP_ID is provided as part of the upload response. You can capture it there.
danielbechtel$ p3 upload.py -a /Users/PasteBoard-1E0A370D-4148-4106-AF77-4831485E1B9D.ipa
[2022-03-08 16:50:35,094] [INFO] [upload.py:33 - upload] Preparing to upload [/Users/PasteBoard-1E0A370D-4148-4106-AF77-4831485E1B9D.ipa]
[2022-03-08 16:50:35,973] [INFO] [upload.py:42 - upload] Uploading file id c93063f0-9f29-11ec-9e88-7d0e21dd721d to url: https://s3.us-west-1.amazonaws.com/xxx
[2022-03-08 16:50:38,970] [INFO] [upload.py:60 - main] Upload success: App id: c93063f0-9f29-11ec-9e88-7d0e21dd721d
Or when working with already uploaded Apps you can find the APP_ID in the URL on our Portal
Scripts
There is a script available for every step on fusion.appdome.com to protect your app.
upload.py | Upload your unprotected App to Appdome |
build.py | Protect your app with your configured protection features |
context.py | Add additional context to your secured app |
sign.py | Signing your app on appdome |
private_sign.py | Signing your app outside of appdome |
auto_dev_sign.py | Signing your app outside of appdome |
download.py | Download your protected App |
certified_secure.py | Downloads the Certified Secured PDF document. |
certified_secure_json.py | Downloads the Certified Secure doc in JSON format. |
status.py | Checks on the status of your build |
validate.py | Validates your app |
appdome_api.py | A sample application that does all steps integrated into one script. (see examples below) |
Example
Android Example (assuming the above-listed environment variables are set):
python3 appdome_api.py --app<apk/aab file>
--sign_on_appdome --keystore<keystore file>
--keystore_pass<keystore password>
--keystore_alias<key alias>
--key_pass<key password>
--output<output apk/aab>
--certificate_output<output certificate pdf>
iOS Example (assuming the above-listed environment variables are set):
python3 appdome_api.py --app<ipa file>
--sign_on_appdome --keystore<p12 file>
--keystore_pass<p12 password>
--provisioning_profiles<provisioning profile file>
<another provisioning profile file if needed>
--output<output ipa>
--certificate_output<output certificate pdf>
The examples above assume that the environment variables listed at the beginning of the article are all set.
If that is not the case, please review the below example.
python3 appdome_api.py --api_key<Appdome API Key>
--team_id<Appdome Team id>
--fusion_set_id<Appdome Fusion Set ID>
--app<ipa file>
--sign_on_appdome --keystore<p12 file>
--keystore_pass<p12 password>
--provisioning_profiles<provisioning profile file>
<another provisioning profile file if needed>
--output<output ipa>
--certificate_output<output certificate pdf>
Integration Example With GitHub Actions:
An integration example for GitHub Actions is available in the same repository and can be found here:
GitHub Actions Workflow Example
API-Reference
To see our complete reference guide please visit https://apis.appdome.com
Comments
0 comments
Article is closed for comments.