Enhance Process API


The Enhance API allows programmatic access to the Enhance process. Responses are in JSON format.

Authentication

An API key and secret is required for authentication to the API. We use Basic authentication over HTTPS to secure the requests. After generating an API key and secret, you can send it base64 encoded in the Authorization header to authenticate.

Authentication is required for all API calls.

Example Header:

Authorization: Basic ODQ2YmE2MzAzY2Y3MTFkOWEzZTk3NGM5YzM0Nzc4OTk6U1IxSTFVd0tCa2dnVn...

Generate a Session ID

The API can be used to create and interact with Enhance Sessions using their Session ID. As sessions are fairly complex, it can be useful to use our online interface to generate the session ID to use with the API.

We’ve built a tool to help with creation of session IDs that you can find in the main menu (My Apps -> Create API Session).

Example Usage

This short guide will show you how to perform a complete Enhancement with the API. In the following examples, we will use the curl command line tool to communicate with the API. Obviously, that’s just one of the ways to do this and there are many more possibilities.

To find out more details about the actions we use here, please see the Methods section.

Step 1: Generate a new API Key

Firstly, we need an active API Key that is required for authentication. Simply go to this page and press the Create API Key button. For this tutorial, we will need a key with all of the permissions: Read access, Write access, Enhance access and Signing access. Don’t forget to save the secret phrase of your key, otherwise you won’t be able to use it!

Step 2: Create a session

Now, we have to create a fresh session, which will be a base for all of our further actions. Here’s the command you should execute (remember to provide valid API key details):

curl --user "[key]:[secret]" https://enhance.co/api/v2/create-session -X POST


This call should return a newly created session’s ID. We will need it, so keep it somewhere safe and sound. If you lose it though, use the /sessions method to view all of your sessions and restore the ID.

Step 3: Upload your app

In this step, you will upload your app to the Enhance. Find your .apk (Android) or .ipa (iOS) file and use the following command:

curl --user "[key]:[secret]" https://enhance.co/api/v2/upload-app -F 'app=@path/to/your/app'


In a response, you will receive the app’s ID together with a few details. Save the ID, we will need it in the next step.

Right now, the session you created and the app you uploaded are not connected in any way. Perform this line to link your app to the session:

curl --user "[key]:[secret]" https://enhance.co/api/v2/set-session-app --data 'session_id=[session_id]&app_id=[app_id]'


If everything goes well, the response will contain both of the provided IDs.

Step 5: Choose SDKs

It’s time to pick SDKs you want to inject into your app. Let’s say we want to include AdMob interstitials and Unity rewarded videos:

AdMob:

curl --user "[key]:[secret]" https://enhance.co/api/v2/add-sdk-to-session --data 'session_id=[session_id]&sdk_id=admob&sdk_type_id=interstitial_ads'


Unity:

curl --user "[key]:[secret]" https://enhance.co/api/v2/add-sdk-to-session --data 'session_id=[session_id]&sdk_id=unity&sdk_type_id=rewarded_video'


The responses of these actions should contain the sdk_selections part. Verify if the SDKs you wanted to include are in there.

For a full list of available SDKs, please use the /sdks method.

Step 6: Update properties of the SDKs

After you selected SDKs, you should fill the properties (like ad codes, etc.) that are required for them to work properly. The properties are visible in the sdk_selections portion of your session’s information. If you want to know more about a specific property, please check out the /sdks method.

curl --user "[key]:[secret]" https://enhance.co/api/v2/update-session-sdks --data 'session_id=[session_id]&data={"admob":{"fgl::enhance::admob::interstitial::ad_unit":"321abe5d"}, "unity":{"fgl::enhance::unityads::appid":"321abe5d"}}'


When a response is received, verify if the sdk_selections section was updated correctly.

(Optional) Step 7: Upload your certificate

Due to how Enhance works, it will have to resign your app. To do this properly, we will need your certificate and details like password for example. This step is optional as you can also use the debug signing for testing (only on Android), so feel free to skip it if applicable. If you’re working on an iOS app though, there is currently no way to Enhance without a valid certificate.

curl --user "[key]:[secret]" https://enhance.co/api/v2/upload-certificate -F 'keyfile=@path/to/your/certificate/file' -F 'storepass=[password]'


Again, save the certificate ID from the response as we will need it soon. If you want to list all of your uploaded certificates, use the /certificates call.

If you’re uploading a keystore, additional parameters like alias name or alias password may be required. For details on this, please see the /upload-certificate method overview.

Step 8: Enhance your app!

Your session should be ready to start an actual Enhancement now. If you uploaded a certificate in the previous step, use the following command:

curl --user "[key]:[secret]" https://enhance.co/api/v2/invoke-build --data 'session_id=[session_id]&signing=[certificate_id]'


If not, execute this line to use the debug signing (Android only):

curl --user "[key]:[secret]" https://enhance.co/api/v2/invoke-build --data 'session_id=[session_id]&signing=debug'


The response should show your session’s new status: enhancing. Give it two or three minutes to do the hard work before you proceed to the next step.

Step 9: Download the Enhanced app

When the session status becomes complete, your Enhanced app is ready to be downloaded and tested:

curl --user "[key]:[secret]" https://enhance.co/api/v2/download-enhanced-app/[session_id] -o path/to/new/file


The output will be saved to a file, which is your app with the AdMob and Unity services injected.

(Optional) Step 10: Re-Enhance

If you want to Enhance your app again, you can simply copy the session we just created and adjust it with new settings. To clone the session, use this command:

curl --user "[key]:[secret]" https://enhance.co/api/v2/create-re-enhance-session --data 'session_id=[session_id]'


You will receive an ID of a new session, which is ready for further configuration or building.

Issues? Contact us!

If you run into any issues with the service, please consult this documentation or contact us directly: info@enhance.co

Methods
Session

A session contains the data required for one Enhancement of an app, such as the SDKs selected, ad codes, etc. It also specifies which app and certificate to use.

Retrieve a Session

Gets the session for the given ID.

REQUEST

Parameters
id string

The Session ID of the desired session.

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "id": "325e15f7591b30fdf4400089",
  "status": "complete",
  "type": "android",
  "label": "2018-01-01 12:00:00",
  "session_creation_date": "2018-01-20T15:05:01+00:00",
  "hidden": false,
  "enhanced_size": 19320361,
  "enhanced_version_name": "v1.6.2b",
  "enhanced_version_code": 106020,
  "queued_duration_seconds": 5,
  "enhance_duration_seconds": 127,
  "sdk_selections": {},
  "app": {
    "id": "12f57d165c78088f35f89645",
    "filename": "solitaire-release-1-63-2.apk",
    "size": 12545901,
    "type": "android",
    "upload_date": "2018-01-20T15:05:01+00:00",
    "metadata_extracted": true,
    "metadata": {
      "package_name": "co.enhance.packagename.example",
      "title": "Example Enhance Application",
      "version_name": "v1.2.3",
      "version_code": 5123
    }
  },
  "certificate": {
    "id": "8d194097d1b2aa6231090d2e",
    "upload_date": "2018-01-20T15:05:01+00:00",
    "platform": "android",
    "original_filename": "android-ident.p12"
  }
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Session ID"
    },
    "status": {
      "type": "string",
      "description": "Current status"
    },
    "type": {
      "type": "string",
      "description": "Session type (`ios` or `android`)"
    },
    "label": {
      "type": "string",
      "description": "A label for this session, can be set by the user"
    },
    "session_creation_date": {
      "type": "string",
      "description": "The ISO 8601 formatted date/time that this session was created"
    },
    "hidden": {
      "type": "boolean",
      "description": "Set to true if the session is hidden from the user interface"
    },
    "enhanced_size": {
      "type": "number",
      "description": "The size of the app after the Enhance session is complete in bytes"
    },
    "enhanced_version_name": {
      "type": "string",
      "description": "The version name of the app after being Enhanced"
    },
    "enhanced_version_code": {
      "type": "number",
      "description": "The version code of the app after being Enhanced"
    },
    "queued_duration_seconds": {
      "type": "number",
      "description": "Number of seconds that this session was queued for due to busy Enhance servers"
    },
    "enhance_duration_seconds": {
      "type": "number",
      "description": "Number of seconds that the app took to be Enhanced"
    },
    "sdk_selections": {
      "type": "object",
      "properties": {},
      "description": "All SDKs which are selected to be included in this Enhancement"
    },
    "app": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Application ID"
        },
        "filename": {
          "type": "string",
          "description": "Original filename of this application"
        },
        "size": {
          "type": "number",
          "description": "The filesize of the app binary in bytes"
        },
        "type": {
          "type": "string",
          "description": "The type/platform of the application (`ios` or `android`)"
        },
        "upload_date": {
          "type": "string",
          "description": "The ISO 8601 formatted date/time that this app was uploaded"
        },
        "metadata_extracted": {
          "type": "boolean",
          "description": "Whether additional metadata has been extracted for this app"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "package_name": {
              "type": "string",
              "description": "The packagename identifier"
            },
            "title": {
              "type": "string",
              "description": "The title of the app"
            },
            "version_name": {
              "type": "string",
              "description": "The version name of the app when it was uploaded to Enhance"
            },
            "version_code": {
              "type": "number",
              "description": "The version code of the app when it was uploaded to Enhance"
            }
          },
          "description": "Additional metadata"
        }
      },
      "required": [
        "id",
        "filename",
        "size",
        "type",
        "upload_date",
        "metadata_extracted"
      ],
      "description": "The app attached to this session"
    },
    "certificate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Certificate ID"
        },
        "upload_date": {
          "type": "string",
          "description": "ISO 8601 formatted date/time that this certificate was uploaded"
        },
        "platform": {
          "type": "string",
          "description": "The platform that this certificate supports"
        },
        "original_filename": {
          "type": "string",
          "description": "The original filename for this certificate"
        }
      },
      "required": [
        "id",
        "upload_date",
        "platform"
      ],
      "description": "The certificate attached to this session"
    }
  },
  "required": [
    "id",
    "status",
    "type",
    "label",
    "session_creation_date",
    "hidden"
  ]
}
                      
Status

A session status determines a current state of an Enhancement. The possible values are: new, app, sdks, signing, ready, enhancing, complete, failed.

Retrieve a Status

Returns a status of the session for the given ID.

REQUEST

Parameters
id string

The Session ID of the desired session.

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "status": "complete"
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Current status"
    }
  },
  "required": [
    "status"
  ]
}
                      
Sessions

A session contains the data required for one Enhancement of an app, such as the SDKs selected, ad codes, etc. It also specifies which app and certificate to use.

List all Sessions

Returns a list of your sessions.

REQUEST

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "id": "325e15f7591b30fdf4400089",
    "status": "complete",
    "type": "android",
    "label": "2018-01-01 12:00:00",
    "session_creation_date": "2018-01-20T15:05:01+00:00",
    "hidden": false,
    "enhanced_size": 19320361,
    "enhanced_version_name": "v1.6.2b",
    "enhanced_version_code": 106020,
    "queued_duration_seconds": 5,
    "enhance_duration_seconds": 127,
    "sdk_selections": {},
    "app": {
      "id": "12f57d165c78088f35f89645",
      "filename": "solitaire-release-1-63-2.apk",
      "size": 12545901,
      "type": "android",
      "upload_date": "2018-01-20T15:05:01+00:00",
      "metadata_extracted": true,
      "metadata": {
        "package_name": "co.enhance.packagename.example",
        "title": "Example Enhance Application",
        "version_name": "v1.2.3",
        "version_code": 5123
      }
    },
    "certificate": {
      "id": "8d194097d1b2aa6231090d2e",
      "upload_date": "2018-01-20T15:05:01+00:00",
      "platform": "android",
      "original_filename": "android-ident.p12"
    }
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
SDKs

SDK is a service which will be injected into your app during an Enhancement. Every single entry contains information about one SDK, including ID and Type ID which you can use with /add-sdk-to-session and /remove-sdk-from-session methods to add or remove services from your Enhancement.

List all SDKs

Returns a complete list of SDKs supported by Enhance.

REQUEST

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "id": "admob",
    "type_id": "rewarded_video",
    "name": "AdMob",
    "vendor": "Google",
    "status": "live",
    "description": "AdMob by Google is a mobile advertising platform that you can use to generate revenue from your app.",
    "category": "Ads",
    "type": "Rewarded Video",
    "icon_url": "https://google.com",
    "site_url": "https://google.com",
    "android_supported": true,
    "android_version": "1.0.0",
    "ios_supported": true,
    "ios_version": "1.0.0",
    "parameters": {
      "android": [
        {
          "id": "sdk.example.property",
          "display_name": "Example Property",
          "help_text": "This is an example property",
          "default": "property_default_value",
          "input_type": "text"
        }
      ],
      "ios": [
        {
          "id": "sdk.example.property",
          "display_name": "Example Property",
          "help_text": "This is an example property",
          "default": "property_default_value",
          "input_type": "text"
        }
      ]
    }
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Certificates

A certificate is a file that contains information about the creator of the app, including the developers name, company name, etc.

List all Certificates

Returns a list of your certificates.

REQUEST

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "id": "8d194097d1b2aa6231090d2e",
    "upload_date": "2018-01-20T15:05:01+00:00",
    "platform": "android",
    "original_filename": "android-ident.p12"
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Apps

An app is an executable file for Android(.apk) or iOS (.ipa), which you want to inject services into.

List all Apps

Returns a list of your apps.

REQUEST

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "id": "12f57d165c78088f35f89645",
    "filename": "solitaire-release-1-63-2.apk",
    "size": 12545901,
    "type": "android",
    "upload_date": "2018-01-20T15:05:01+00:00",
    "metadata_extracted": true,
    "metadata": {
      "package_name": "co.enhance.packagename.example",
      "title": "Example Enhance Application",
      "version_name": "v1.2.3",
      "version_code": 5123
    }
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Upload-App

An app is an executable file for Android(.apk) or iOS (.ipa), which you want to inject services into.

Upload a new App

Uploads a new App, which can be later linked to a Session.

REQUEST

Parameters
app object

App file content.

Headers
Content-Type multipart/form-data
multipart/form-data
                          app=@/Users/Me/application.apk

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "id": "12f57d165c78088f35f89645",
  "filename": "solitaire-release-1-63-2.apk",
  "size": 12545901,
  "type": "android",
  "upload_date": "2018-01-20T15:05:01+00:00",
  "metadata_extracted": true,
  "metadata": {
    "package_name": "co.enhance.packagename.example",
    "title": "Example Enhance Application",
    "version_name": "v1.2.3",
    "version_code": 5123
  }
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Application ID"
    },
    "filename": {
      "type": "string",
      "description": "Original filename of this application"
    },
    "size": {
      "type": "number",
      "description": "The filesize of the app binary in bytes"
    },
    "type": {
      "type": "string",
      "description": "The type/platform of the application (`ios` or `android`)"
    },
    "upload_date": {
      "type": "string",
      "description": "The ISO 8601 formatted date/time that this app was uploaded"
    },
    "metadata_extracted": {
      "type": "boolean",
      "description": "Whether additional metadata has been extracted for this app"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "package_name": {
          "type": "string",
          "description": "The packagename identifier"
        },
        "title": {
          "type": "string",
          "description": "The title of the app"
        },
        "version_name": {
          "type": "string",
          "description": "The version name of the app when it was uploaded to Enhance"
        },
        "version_code": {
          "type": "number",
          "description": "The version code of the app when it was uploaded to Enhance"
        }
      },
      "description": "Additional metadata"
    }
  },
  "required": [
    "id",
    "filename",
    "size",
    "type",
    "upload_date",
    "metadata_extracted"
  ]
}
                      
Upload-Certificate

A certificate is a file that contains information about the creator of the app, including the developers name, company name, etc.

Upload a new Certificate

Uploads a new Certificate, which can be later used to sign an App.

REQUEST

Parameters
keyfile object

Certificate/Keystore file content.

storepass string

Certificate/Keystore password.

alias string

Alias name.

keypass string

Alias password.

type string

Supported platform, use ‘android’ or ‘ios’.

Headers
Content-Type multipart/form-data
multipart/form-data
                          keyfile=@/Users/Me/certificate.p12
storepass=Secret

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "id": "8d194097d1b2aa6231090d2e",
  "upload_date": "2018-01-20T15:05:01+00:00",
  "platform": "android",
  "original_filename": "android-ident.p12"
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Certificate ID"
    },
    "upload_date": {
      "type": "string",
      "description": "ISO 8601 formatted date/time that this certificate was uploaded"
    },
    "platform": {
      "type": "string",
      "description": "The platform that this certificate supports"
    },
    "original_filename": {
      "type": "string",
      "description": "The original filename for this certificate"
    }
  },
  "required": [
    "id",
    "upload_date",
    "platform"
  ]
}
                      
Create-Session

A session contains the data required for one Enhancement of an app, such as the SDKs selected, ad codes, etc. It also specifies which app and certificate to use.

Create a new Session

Creates a new Session.

REQUEST

Parameters
data object

A JSON object containing optional initial session data.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          data={"label": "my-session-label"}

                        
                          
                        

RESPONSE

Headers
Content-Type aplication/json
200 aplication/json
                        {
    "session_id": "325e15f7591b30fdf4400089"
}

                      
                        
                      
Create-Re-Enhance-Session

A session contains the data required for one Enhancement of an app, such as the SDKs selected, ad codes, etc. It also specifies which app and certificate to use.

Clone a Session to Re-Enhance

Clones a Session for the given ID and makes it ready for Re-Enhance, if applicable.

REQUEST

Parameters
session_id string

Session ID.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "425e14f7391c30fdf4400090"
}

                      
                        
                      
Add-SDK-To-Session

Add SDK to a Session

Adds a specific SDK to a Session for the given ID. Use the /sdks method to find out the IDs and Type IDs of SDKs you want to use.

REQUEST

Parameters
session_id string

Session ID.

sdk_id string

SDK ID.

sdk_type_id string

SDK type ID.

data object

An optional JSON object containing property names and values.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&sdk_id=admob&sdk_type_id=interstitial_ads&data={"fgl.enhance.admob.interstitial.ad_unit":"Test"}

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "325e15f7591b30fdf4400089",
    "sdk_selections": {
        "admob": {
            "display": "AdMob",
            "types": [
                "Interstitial Ads"
            ],
            "properties": {
                "fgl::enhance::admob::interstitial::ad_unit": "test"
            },
            "version": "9.452.0",
            "interstitial_ads::enabled": 1
        }
    }
}

                      
                        
                      
Add-SDKs-To-Session

Add multiple SDKs to a Session

Adds a list of SDKs to a Session for the given ID. Use the /sdks method to find out the IDs and Type IDs of SDKs you want to use.

REQUEST

Parameters
session_id string

Session ID.

data object

An array of JSON objects containing information about SDKs you want to include in the session.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&data=[{"sdk_id":"admob","sdk_type_id":"interstitial_ads"},{"sdk_id":"admob", "sdk_type_id": "rewarded_video","data": {"fgl::enhance::admob::rewarded::ad_unit": "test"}}]

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                         {
    "session_id": "5ad4e1a5ca8edc4eb2360d23",
    "sdk_selections": {
        "admob": {
            "display": "AdMob",
            "types": [
                "Interstitial Ads",
                "Rewarded Video"
            ],
            "properties": {
                "fgl::enhance::admob::interstitial::ad_unit": "",
                "fgl::enhance::admob::rewarded::ad_unit": "test"
            },
            "version": "1.0",
            "interstitial_ads::enabled": 1,
            "rewarded_video::enabled": 1
        }
    }
}

                      
                        
                      
Remove-SDK-From-Session

Remove SDK from a Session

Removes a specific SDK from a Session for the given ID. If needed, use the /sdks method to find out the IDs and Type IDs of SDKs you want to remove.

REQUEST

Parameters
session_id string

Session ID.

sdk_id string

SDK ID.

sdk_type_id string

SDK type ID.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&sdk_id=admob&sdk_type_id=interstitial_ads

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "325e15f7591b30fdf4400089",
    "sdk_selections": []
}

                      
                        
                      
Remove-SDKs-From-Session

Remove multiple SDKs from a Session

Removes a list of SDKs from a Session for the given ID. If needed, use the /sdks method to find out the IDs and Type IDs of SDKs you want to exclude.

REQUEST

Parameters
session_id string

Session ID.

data object

An array of JSON objects containing information about SDKs you want to remove from the session.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&data=[{"sdk_id":"admob","sdk_type_id":"interstitial_ads"},{"sdk_id":"admob", "sdk_type_id": "rewarded_video"}]

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "325e15f7591b30fdf4400089",
    "sdk_selections": []
}

                      
                        
                      
Update-Session

Update a Session

Updates information about the given session. You can change the following properties:

  • label  (string)  - display name on the website, e.g. “my_session”

  • hidden  (boolean)  - whether the session should be hidden on the website

  • enhanced_version_name  (string)  - custom version name for the Enhanced app, e.g. “1.2.0”

  • enhanced_version_code  (number)  - custom version code for the Enhanced app, e.g. 1601

  • certificate_id  (string)  - certificate ID to be used for signing

REQUEST

Parameters
session_id string

Session ID.

data object

A JSON object containing session data to update.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&data={"label": "my-session-label"}

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "325e15f7591b30fdf4400089",
    "app_id": null,
    "enhanced_version_name": "v.1.6.2b",
    "enhanced_version_code": "106020",
    "sdk_selections": null
}

                      
                        
                      
Update-Session-SDKs

Update Session SDKs

Updates properties of the selected SDKs for the given session. To find out which properties need filling, simply check the sdk_selections portion of the /session method’s response.

REQUEST

Parameters
session_id string

Session ID.

data object

A JSON object containing SDK IDs and properties to update.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&data={"admob":{"fgl::enhance::admob::interstitial::ad_unit":"Test"}}

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "status": "ready",
    "app_id": "5aca5056ca8edc23ef7d3b02",
    "enhanced_version_name": "v1.6.2b",
    "enhanced_version_code": "106020",
    "sdk_selections": {
        "admob": {
            "display": "AdMob",
            "types": [
                "Interstitial Ads",
                "Native Ads",
                "Banner Ads",
                "Rewarded Video"
            ],
            "properties": {
                "fgl::enhance::admob::interstitial::ad_unit": "Test"
            },
            "version": "1.0",
            "interstitial_ads::enabled": "1"
        }
    }
}

                      
                        
                      
Set-Session-App

Links an App ID to a session for the given ID. If other App was assigned previously, the new one’s platform (Android/iOS) should match.

REQUEST

Parameters
session_id string

Session ID.

app_id string

App ID.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&app_id=5aca5056ca8edc23ef7d3b02

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "session_id": "325e15f7591b30fdf4400089",
    "app_id": "5aca5056ca8edc23ef7d3b02"
}

                      
                        
                      
Invoke-Build

Invoke a build

Invokes a build on a session for the given ID. The session should have an app linked and SDKs selected already.

REQUEST

Parameters
session_id string

Session ID.

signing string

‘unsigned’, ‘debug’ or certificate ID. If you Enhance an iOS App, certificate ID is the only option.

Headers
Content-Type application/x-www-form-urlencoded
application/x-www-form-urlencoded
                          session_id=325e15f7591b30fdf4400089&signing=445d15f7591b30fdf4400027

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
    "status": "enhancing"
}

                      
                        
                      
Download-Enhanced-App

Download an Enhanced App

Returns an enhanced version of your app, only if a session is complete. If successful, response is the app’s content and should be saved to a file.

REQUEST

Parameters
id string

The Session ID of the desired session.

RESPONSE

Headers
Content-Type application/octet-stream