Using Appdome-DEV Build-to-Publish REST API

Mobile integration life-cycle for SDKs and API integration accelerates release cycles and improves mobile app delivery.
You can automate your mobile integration life-cycle for iOS and Android apps over API through curl commands on Appdome-DEV™.

This Knowledge Base article explains how to use the Appdome-DEV™ API lifecycle workflow to build mobile apps with great mobile integration over curl commands.

We hope you find this knowledge base useful and enjoy using Appdome!

About Appdome-DEV™ Build-to-Publish API

Appdome-DEV™ helps you integrate your iOS and Android apps with SDKs and APIs from different vendors all in a few minutes.  You can setup Build-to-Publish API with Appdome DEV to automate the end-to-end mobile integration lifecycle.

The Build to Publish REST API uses a single request to upload a new build, Build the desired Fusion Set with customizable overrides, Add Context, Sign and Download the Build app.

Prerequisites for Using Appdome-DEV™ Build-to-Publish API

Note: this article will demonstrate using the API with cURL commands.

How to Use Appdome DEV™ Build-to-Publish REST API

First, Get your API Token, Team’s API Key (if needed) and Fusion Set API key.

The cURL command

The technical composition of the cURL command:

URL https://fusion.appdome.com/api/v1/lifecycle
Method POST
Content-Type multipart/form-data
Headers Authorization: <API Token>
Payload Format (in form format):

-F app=@<path/to/app/binary>
-F fusion_set_id=<Your_Fusion_set_API_Key>
-F 'provisioning_profile=@<path/to/provisioning_profile>' //(iOS Only)
-F 'overrides={<overrides, or empty JSON>}' //(see details below)
-F 'icon_overlay_content=@<path/to/icon/file>' (optional)
-F 'app_customization_application_icon=@<path/to/icon/file>' //(optional)
-F 'app_customization_application_files=@<path/to/single/file>' //(optional)
-F 'plugin_good_private_certs_content'=@<path/to/single/file>' //(optional)
CURL Example
curl -X POST -H "Authorization:lDNltvFWz6jPXh0OX_VHkQ" -H "content-type: multipart/form-data" https://fusion.appdome.com/api/v1/lifecycle -F app=@/tmp/app.apk -F fusion_set_id=BBJP99BxL3-GLetpypd7Zg -F 'overrides={}' --output /tmp/built_app.apk 
Response
App Binary

API Tokens on Appdome

The API token doesn’t have an expiration date.  Whenever it’s viewed the timestamp is changed and it is 64-bit encoded.  They are base64 values that are a value of value with a timestamp that appears different on each login.

They use JSON Web Tokens (JWT) that are stateless and comprised of three sections:

  1. Header – states the type of token and the algorithm used to sign it.
  2. Payload – the data saved in the token, base64-encoded, including an “issued at” timestamp.
  3. Signature – A signature using the specified algorithm, the token’s data, and a secret.

The payload section of the JSON web token has three parts:

    • User_id: used for identifying users.
    • Salt: a user-specific field that is generated each time an API token is revoked.
    • Iat: a standard JWT field which stands for “issued at” a Timestamp.

While the user ID is the same in the payload section the payload field changes. When a user makes an API request, the salt field in the token is compared to the same field saved on the user. If they don’t match, the request is denied for security in the API token.

How to Build in a Team

You can run the command for any app and Fusion Set in any of your Teams. Just add a URL encoded parameter with you Team API Key (make sure to use a Fusion Set API Key from your Team and not personal account):

https://fusion.appdome.com/api/v1/lifecycle?team_id=<TEAM_API_KEY>

How to use Overrides

The Override JSON can include any of the following customizations (note that some are co-dependant):

Key Name in Appdome Value Supported Request Notes
user_agent User Agent Customization Boolean LifeCycle, Build Must use with user_agent_value
user_agent_value User-Agent Header String LifeCycle, Build
signing_keystore_use_google_signing Use Google Play App Signing Boolean LifeCycle, Sign Must use with signing_keystore_google_signing_sha1_key
signing_keystore_google_signing_sha1_key App Signing Certificate String LifeCycle, Sign The value for this parameter can be both SHA-1 or SHA-256
plugin_good_probe_url Pre-Authentication URL String of up to 1024 characters LifeCycle, Build Only if BlackBerry PreAuth is turned on in Fusion Set
plugin_good_app_version GD Entitlement Version String of up to 250 characters LifeCycle, Build
plugin_good_app_id GD Entitlement ID String of up to 128 characters LifeCycle, Build
icon_overlay Add Favicon Boolean LifeCycle, Context Must use with icon_overlay_scale, icon_overlay_position, icon_overlay_filename

Must also add Form data icon_overlay_content with an icon file (see above)

icon_overlay_scale Scale Number between 20 and 50 LifeCycle, Context
icon_overlay_position Favicon Position ‘Top Right’, ‘Top Left’, ‘Bottom Right’, ‘Bottom Left’ LifeCycle, Context
extended_logs Extended Logs Boolean LifeCycle, Build Only if enabled for the user.
extended_logs_gesture_via_http Tap to upload logs(iOS)/ Shake to upload logs(Android) Boolean LifeCycle, Build Must use with extended_logs.
extended_logs_gesture_via_external_app Tap to email logs(iOS)/ Shake to email logs(Android) Boolean LifeCycle, Build Must use with extended_logs.
customize_url_enable Private URL Boolean LifeCycle, Context Must use with customize_url_value, customize_url_key.
customize_url_value Private URL Value String LifeCycle, Context
should_copy_url_to_clipboard Copy URL to Clipboard Boolean LifeCycle, Context Must use with  customize_url_enable.
customize_url_key Private URL Identifier String LifeCycle, Context
app_customization_pack_bundle_version App Version String LifeCycle
app_customization_pack_bundle_identifier App Bundle ID String LifeCycle
app_customization_pack_bundle_display_name App Display Name String LifeCycle, Context
app_customization_pack_bundle_build_number App Version Code Number LifeCycle
app_customization_key_value_list Custom Values JSON LifeCycle, Context
anti_pharming_url_list URL List Array of Strings LifeCycle, Build Only if URL Whitelisting is turned on in Fusion Set

How Do I Learn More

Check out Appdome Platform, Appdome-DEV, or request a demo at any time.

If you have any questions, please send them our way at support@appdome.com or via the chat window on the Appdome platform.

Thank you!

Thanks for visiting Appdome! Our mission is to make mobile integration easy. We hope we’re living up to the mission with your project. If you don’t already have an account, you can sign up for free.

Thomas Libby

Have a question?

Ask an expert