Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URLMethodParametersresults
/api/v1/applicationsGET
  • packageName (optional) string - package name for Android
  • mainActivity (optional) string - main activity of android app
  • uniqueName (optional) string
  • osType (optional) - iOS / Android
  • bundleIdentifier (optional) string - application bundle id (only for iOS)
  • version (optional) string - app version
  • releaseVersion (optional) string - app release version
  • cameraSupport (optional) boolean - true / false
  • isForSimulator (optional) boolean - true / false
  • instrumentByProfile (optional) string
  • nonInstrumented (optional) boolean - true / false
  • hasCustomKeystore (optional) boolean - true / false

Without parameters - Gets a collection of all the applications this user has access to

If parameters were added - Gets a filtered collection of application.

  • The filter is defined by specifying the required property-name = property-value concatenated with commas.
  • When adding "fields=id" to the query, only the ids of the applications would be returned.


Examples

/api/v1/applications?osType=android&fields=id - would return only ids of the android applications

/api/v1/applications?osType=ios&version=1050 - would return ios applications which version is 1050

/api/v1/applications/{applicationId}GET{applicationId} - the id of the application

Gets all of the application info.

/api/v1/applications/newPOST
  • file - a multi-part file
  • camera (optional) boolean, true means that application will include camera libraries
  • touchId(optional) boolean, true means that application will include touch id libraries
  • uuid (optional) - (IOS only) profile to use on install
  • uniqueName (optional) - string that the user can use later to identify the app uniquely. (Appium
, SeeTest
  • )
  • project -
mandatory for Cloud Administrator.Users and Project Admins: should not use project parameter (it will not be used even if they provide it) Application
  • Optional for cloud admin (if the project isn't specified, it will be uploaded to
their login
  • Default project).
  • fixKeychainAccess (optional) (IOS only) boolean, true if the application should be signed with keychain access group entitlements.
  • overrideEntitlements (optional) (IOS only) - XML file for replace the app entitlements with a specific file

Additional Information:

  • basic Instrumentation for IOS - in order to use basic instrumentation, need to set the 'Camera' and 'TouchId' parameters to 'false'
  • We do not allow to use 'overrideEntitlements' with the property 'fixKeychainAccess: true'


Custom Keystore (optional) (Android only)

The following 4 parameters are used to upload a customkeystorefor this particular application.  If any of these are supplied, all should be supplied.

keystore- file (multipart) - containing the customkeystore

keystorePassword - string - thekeystorepassword.

keyAlias - string - the key alias to be used.

keyPassword - string - the key password.

Gets the id of the uploaded application.

Uploads the application file to the cloud.

If a uuid is given (iOS), the selected provisioning profile will be used for installation.

Project to which application will be assigned. Project name can be provided or a project id in the following format:

key: project value: id:<id>. For example key: project value: id:123

Custom Keystore

If a customkeystoreis supplied, it will be used for every subsequent (re)instrumenting of this app.

The Cloud UI will show a "Custom Keystore: Yes" indication in the application info panel for such applications.

/api/v1/applications/new-from-urlPOST
  • url - a string specifying the location from which to retrieve the application file
  • camera (optional) boolean, true means that application will include camera libraries
  • touchId(optional) boolean, true means that application will include touch id libraries
  • uuid (optional) - (IOS only) profile to use on install
  • uniqueName (optional) - string that the user can use later to identify the app uniquely. (Appium
, SeeTest
  • )
  • project -
mandatory for Cloud Administrator.Users and Project Admins: should not use project parameter (it will not be used even if they provide it) Application
  • Optional for cloud admin (if the project isn't specified, it will be uploaded to
their login
  • Default project).
  • fixKeychainAccess (optional) (IOS only) boolean, true if the application should be signed with keychain access group entitlements.
  • overrideEntitlements (optional) (IOS only) - XML file for replace the app entitlements with a specific file

Additional Information:

  • basic Instrumentation for IOS - in order to use basic instrumentation, need to set the 'Camera' and 'TouchId' parameters to 'false'
  • We do not allow to use 'overrideEntitlements' with the property 'fixKeychainAccess: true'

Custom Keystore (optional) (Android only)

The following 4 parameters are used to upload a customkeystorefor this particular application.  If any of these are supplied, all should be supplied.

keystore- file (multipart) - containing the customkeystore

keystorePassword - string - thekeystorepassword.

keyAlias - string - the key alias to be used.

keyPassword - string - the key password.

Gets the id of the uploaded application.

Uploads the application file to the cloud.

This call is exactly like /api/v1/applications/new, except that the application file is not provided as part of the call, but instead the url parameter specifies where to get the file.

If a uuid is given (iOS), the selected provisioning profile will be used for installation.

Project to which application will be assigned. Project name can be provided or project id in the following format: id:<id>. For example key: project value: id:<id>. For example key:project value: id:123

Custom Keystore

If a customkeystore is supplied, it will be used for every subsequent (re)instrumenting of this app.

The Cloud UI will show  a "Custom Keystore: Yes" indication in the application info panel for such applications.

/api/v1/applications/{applicationId}/deletePOST{applicationId} - the id of the application

Deletes an application file from the cloud

/api/v1/applications/{applicationId}/installPOST

{applicationId} - the id of the application

deviceId (optional) - id of device to install on

devicesList (optional) - list of id of devices (i.e. 1,2,3)

AllDevices (optional) - true

Exactly one of 3 previous flags must be used: deviceId / devicesList / AllDevices

instrument (optional) - true / false (Default is false)

Installs the application on the device/devices.

  • AllDevices=true is a short way to gives the id of all devices that are of the application's OS and are in an online status

instrument

  • true - the instrumented application will be installed.
  • false - the non-instrumented application will be installed.

Since version 11.0 default is instrument=false

/api/v1/applications/{applicationId}/uninstallPOST

{applicationId} - the id of the application

deviceId (optional) - id of device to install on

devicesList (optional) - list of id of devices (i.e. 1,2,3)

AllDevices (optional) - yes

Uninstalls the application from the device/devices.

  • AllDevices=yes is a short way to give the id of all devices that are of the application's OS and are in an online status

...

Code Block
languagejava
firstline1
titleAddApplicationToCloud
linenumberstrue
collapsetrue
import org.junit.*; 
import com.mashape.unirest.http.HttpResponse; 
import com.mashape.unirest.http.Unirest; 
import com.mashape.unirest.http.exceptions.UnirestException; 


public class FromFile() {

	String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment 
	String user = "admin"; 
	String password = "......."; // modify the admin password as applicable your environment 
	String url = urlBase + "api/v1/applications/new"; 
	StingString uniqueName = "SomeName"; 

	@Test 
	public void newAppFromFile () throws UnirestException { 
		File f = new File(path_to_file); 
		HttpResponse<String> response = Unirest.post(url) 
			.basicAuth (user, password) 
			.queryString("project", "id:"+projectId) // mandatoryoptional field for Cloud Administrator 
			.queryString("uniqueName", uniqueName) // optional field 		
			.queryString("camera", "true") // optional field 
			.queryString("touchId", "true") // optional field 
			.field ("file", f) // mandatory field 
			.asString (); 
		System.out.println(response.getBody());
 	} 
}
Code Block
languagejava
titleAdd application to cloud from URL
collapsetrue
import org.junit.*; 
import com.mashape.unirest.http.HttpResponse; 
import com.mashape.unirest.http.Unirest; 
import com.mashape.unirest.http.exceptions.UnirestException; 

public class FromUrl(){
	String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment 
	String user = "admin"; String password = "......."; // modify the admin password as applicable your environment 
	String applicationUrl = "http://......../"; // modify as needed 
	StingString uniqueName = "SomeName"; 


	@Test 
	public void newAppFromUrl () throws UnirestException { 
		String url = urlBase + "api/v1/applications/new-from-url"; 
		HttpResponse<String> response = Unirest.post(url) 
			.basicAuth (user, password) 
			.queryString ("url", applicationUrl) 
			.queryString("project", "id:"+projectId2) // mandatoryoptional field for cloud administrators 
			.queryString("camera", "true") // optional field 
			.queryString("touchId", "true") // optional field 
			.queryString("uniqueName",uniqueName) // optional field 
			.asString (); 
		System.out.println(response.getBody()); 
	}
}
Code Block
languagejava
firstline1
titleGetApplications
linenumberstrue
collapsetrue
import org.junit.*;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class GetApplications(){
	String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment
	String user = "admin";
	String password = "......."; // modify the admin password as applicable your environment

	@Test
	public void getApplications() throws UnirestException {
		String url = urlBase + "api/v1/applications";
		System.out.println(url);
		HttpResponse<String> response = Unirest.get(url)
			.basicAuth (user, password)
			.asString ();
		System.out.println (response.getBody());     
	}
}
Code Block
languagejava
firstline1
titleDeleteApplicationFromCloud
linenumberstrue
collapsetrue
import org.junit.*;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;


public class DeleteApplications{

  String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment
  String user = "admin";
  String password = "......."; // modify the admin password as applicable your environment
  StingString application_id= ".."; // ID of the application we wish to delete


  @Test
  public void deleteApplication() throws UnirestException {
     String url = urlBase + "api/v1/applications/"+ application_id + "/delete";
     HttpResponse<String> response = Unirest.post(url)
      .basicAuth (user, password)
      .asString ();
    System.out.println (response.getBody());
  }
} 
Code Block
languagejava
firstline1
titleUninstallApplication
linenumberstrue
collapsetrue
import org.junit.*;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public UninstallApplication(){
	
	String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment
	String user = "admin";
	String password = "......."; // modify the admin password as applicable your environment
	String application_id=".." // ID of the application we wish to uninstall
	
	@Test
	public void uninstallAppAPI() throws UnirestException {
		String url = urlBase + FOLDER_URL + APPLICATIONS_URL + "/api/v1/applications/" + application_id + "/uninstall";
		HttpResponse<String> response = Unirest.post(url)
				.basicAuth (user, password)
				.queryString("AllDevices", "yes")
				.asString ();
		System.out.println (response.getBody());  
	}  
}
Code Block
languagejava
firstline1
titleInstallApplication
linenumberstrue
collapsetrue
import org.junit.*;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public InstallApplication(){
	
	String urlBase = "http://localhost:8088/"; // modify hostname and port as applicable your environment
	String user = "admin";
	String password = "......."; // modify the admin password as applicable your environment
	String application_id=".." // ID of the application we wish to install
	String device_id = ".." // ID of the device we want to install on
	
	@Test
	public void installAppAPI() throws UnirestException {
		String url = urlBase + "/api/v1/applications + "/" + application_id +"/install";
		System.out.println(url);
		HttpResponse<String> response = Unirest.post(url)
				.basicAuth (user, password)
				.queryString("deviceId", device_id)
				.queryString("instrument", "true") // or "false" - optional field
				.asString ();
		System.out.println (response.getBody());     
	}
}