NAV Navbar
  • Introduction
  • Authentication
  • Generic
  • Resigning APIs
  • APK Instrumentation APIs
  • Appium Automation
  • XCTest Automation
  • Network Simulation
  • App Center API
  • Introduction

    The pCloudy API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients.

    Note: All pCloudy API methods default to a POST request except Authentication. Requests must have the content-type header set to application/json.

    Authentication

    URL format:

    curl -u "email:apiKey" <Cloud URL>/api/access
    
    Note: 
        <Cloud URL>: Use https://device.pcloudy.com or https://us.pcloudy.com or https://ph.pcloudy.com or https://aus.pcloudy.com in case of public cloud otherwise use your custom cloud URL in case of private or on premise cloud
    
    Ex: curl -u "test.user@pcloudy.com:3m4t8y47mmrz8zycmqbr3f" https://device.pcloudy.com/api/access
    
    Make sure to replace `test.user@pcloudy.com:3m4t8y47mmrz8zycmqbr3f` with your Email and API key.
    
    
    Download the pCloudy java connector jar from the following link- http://pcloudy-content-distribution.s3.amazonaws.com/index.html
    
    Connector con = new Connector("https://device.pcloudy.com");
    String authToken = con.authenticateUser(emailid, apiKey);
    
    Note: 
        Replace the 'https://device.pcloudy.com' with https://us.pcloudy.com or https://ph.pcloudy.com or https://aus.pcloudy.com in case of public sub clouds or your custom cloud URL in case of private or on premise cloud.
    
    

    pCloudy REST API uses HTTP Basic Authentication. Follow the steps mentioned below: •Authenticate your account while using the API by including your email-Id and secret API key(access Key) in the request.

    •You can manage your API keys in the Account settings.

    •Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.

    •Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

    •All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

    Note: If you are using the Java,Dowload the pCloudy java connector jar from the link- pCloudy java Connector

    Parameter Description
    email your email id
    accessKey your access key(you will get it from Account Settings->API)

    Generic

    Get User Details

    URL format:
    
    curl -H "Content-Type: application/json" -d '{"token": "authToken"}' <Cloud URL>/api/get_user_details
    
    Note: Please change the curl like below if above one not works for all the apis
     curl -H "Content-Type: application/json" -d "{\"token\":\"authToken\"}" <Cloud URL>/api/get_user_details
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs"}' https://device.pcloudy.com/api/get_user_details
    
    UserDetailResult userDetail = con.getUserDetails(authToken);
    

    Using this API,user will get all the account details like userId, email_id, username, account balance, etc.

    Note:you have to pass the authtoken as parameter(It is the response received using Authentication API)

    URL Parameters

    Parameter Description
    authToken Authtoken(this will get from authenticate response)

    Upload App

    URL format:
        curl -X POST -F "file=@/File_Path" -F "source_type=raw" -F "token=authToken" -F "filter=filter" <Cloud URL>/api/upload_file
    Ex:
        curl -X POST -F "file=@/home/user/Downloads/pCloudy_Appium_Demo.apk" -F "source_type=raw" -F "token=swqkm7f55v39g9kkdggkzs" -F "filter=all" https://device.pcloudy.com/api/upload_file
    
    PDriveFileDTO uploadedApp = con.uploadApp(authToken, fileToUpload);
    
    

    Using Upload API You can upload the apps to pcloudy cloud drive .

    Note:You can upload any file to cloud drive. Uploaded files/apps are available in MY App/Data section in pcloudy platform.

    URL Parameters

    Parameter Description
    file Path of uploaded apk or ipa file
    source_type Mention raw type(raw)
    token Authtoken(this will get from authenticate response)
    filter You can filter the file like apk or ipa when uploading(all/apk/ipa)

    Get Available Apps

    URL Format:
        curl -H "Content-Type:application/json" -d '{"token":"authToken","limit": limit, "filter": "all"}' <Cloud URL>/api/drive
    Ex:
        curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","limit": 5, "filter": "all"}' https://device.pcloudy.com/api/drive
    
    
    PDriveFileDTO[] apps = con.getAvailableApps(String authToken);
    

    Get Available app API shows total files and apps that is uploaded in cloud drive.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    limit How many files you want to display.
    filter It will filter the files and display based on filter option(all/apk/ipa).

    Download File From Cloud

    URL Format:
    
    curl -O -H "Content-Type:application/json" -d '{"token":"TOKEN","filename":"FileName","dir":"data"}' <Cloud URL>/api/download_file
    
    
    Ex:
         curl -O -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","filename":"pCloudy_Appium_Demo.apk","dir":"data"}' https://device.pcloudy.com/api/download_file
    
    File file= con.downloadFileFromCloud(authToken, "pCloudy_Appium_Demo.apk", "data");
    

    Using this REST API,You can download any file from the cloud drive to your local system.

    Note:The file you wish to download needs to be pass as one of parameter.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename File name which you want to download
    dir Directory name(data).

    Delete File From Cloud

    URL Format:
    
    curl -H "Content-Type:application/json" -d '{"token":"TOKEN","filename":"FileName","dir":"data","filter":"ALL"}' <Cloud URL>/api/delete_file
    
    
    Ex:
         curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","filename":"pCloudy_Appium_Demo.apk","dir":"data","filter":"ALL"}' https://device.pcloudy.com/api/delete_file
    
    con.deleteFileFromCloud(authToken, "pCloudy_Appium_Demo.apk", "data");
    

    Using this REST API,You can delete file from cloud drive.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename File name which you want to delete
    dir Directory name(data).
    filter File filter type(ALL).

    Get Device List

    URL Format:
    
    curl -H "Content-Type: application/json" -d '{ "token":"authToken","duration":10, "platform":"platform", "available_now":"true"}' <Cloud URL>/api/devices
    
    Ex:
    curl -H "Content-Type: application/json" -d '{ "token":"swqkm7f55v39g9kkdggkzs","duration":10, "platform":"android", "available_now":"true"}' https://device.pcloudy.com/api/devices
    
    For single device selection:
    MobileDevice selectedDevice = con.chooseSingleDevice(authToken, "Android");
    
    For Multiple device selection:
    
      List<MobileDevice>   selectedDevices = con.chooseMultipleDevices(authToken, "android");
    

    This api helps to get the list of all available devices in pCloudy with all the relevant details(full_name,id, model, version, mobile number, dpi, etc.) about each device.

    Note:In the response each device is having unique id which is used for booking the device.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    duration Duration in minutes(How many minutes you want to the device).
    platform Which platform devices(android or ios) you want to display.
    available_now true or false. True means display the available devices and false means display all devices(including busy and available).

    Get Single Device Details

    URL Format:
    
    curl -H "Content-Type: application/json" -d '{ "token":"authToken","id":"deviceId", "full_name": "deviceFullName" "platform":"platform", "manufacturer":"ManufactureName", "version": "version", "model": "deviceModel", "number":"mobilenumber", "duration":duration, "available_now":"true"}' <Cloud URL>/api/get_devices_details
    
    Ex:
    curl -H "Content-Type: application/json" -d '{ "token":"swqkm7f55v39g9kkdggkzs","id":"525", "full_name": "Apple_iPhone6S_Ios_11.4.1", platform": "ios", "manufacturer":"Apple", "version": "11.4.1", "model": "iPhone6S", "number":"any", "duration":15, "available_now":"true"}' https://device.pcloudy.com/api/get_devices_details
    
    
    

    This api helps to get the single device details(full_name,id, model, version, mobile number, dpi, etc.).

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    id DeviceId(This will get from Get Device list api response)
    full_name Device Full Name (This will get from Get Device list api response)
    version Device version
    model Device Model(This will get from Get Device list api response)
    duration Duration in minutes(How many minutes you want to the device).
    platform Which platform devices(android or ios) you want to display.
    available_now true or false. True means display the available devices and false means display all devices(including busy and available).

    Book Device

    URL Format:
        curl -H 'ContentType:application/json' -d '{"token":"authToken","duration":minutes, "id":device_id}' <Cloud URL>/api/book_device
    
    EX: curl -H 'ContentType:application/json' -d '{"token":"swqkm7f55v39g9kkdggkzs","duration":5, "id":120}' https://device.pcloudy.com/api/book_device
    
    BookingDtoResult bookedDevice = con.bookDevice(authToken, 10, selectedDevice);
    

    Book Device api book the device for your testing. For device booking you had to pass the authToken, how many minutes you want book and device id. Every device having the different id.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    duration Duration in minutes(How many minutes you want to book the device).
    id Device id(will get from get devices api response).

    Get Device Page URL

    URL Format:
    curl -H "Content-Type: application/json" -d '{"token": "authToken","rid":"rid"}' <Cloud URL>/api/get_device_url
    
    Ex: 
    
    curl -H "Content-Type: application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs","rid":"482013"}' https://device.pcloudy.com/api/get_device_url
    
    URL devicePageURL = con.getDevicePageUrl(authToken, bookedDevice);
    

    This will give you the url using which, you can open the booked device screen directly in the browser. This helps you to connect to the device directly by passing the authToken and rid.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response).

    Install and Launch app

    URL format:
    curl -H "Content-Type: application/json" -d '{"token": "authToken", "rid": "rid", "filename": "filename", "grant_all_permissions":"true/false"}' <Cloud URL>/api/install_app
    
    Ex:
    
    curl -H "Content-Type: application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs", "rid": "482013", "filename": "pCloudy_Appium_Demo.apk", "grant_all_permissions":"true"}' https://device.pcloudy.com/api/install_app
    
    InstallAndLaunchResultDto result = con.installAndLaunchApp(authToken, bookedDevice, uploadedApp);
    

    Install and launch api will install the app(apk/ipa) in the device and launch it on the device. App launch will work on Android devices, but in iOS device app will install but not launch(we are working on this).

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    filename app name(Need to mention apk/ipa file name which is available in cloud drive)
    grant_all_permissions true/false(This is provide permissions for app). This is optional.

    Execute ADB

    URL format:
    curl -H "Content-Type: application/json" -d '{"token": "authToken", "rid": "rid", "adbCommand": "adb Command"}' <Cloud URL>/api/execute_adb 
    
    Ex:
        curl -H "Content-Type: application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs", "rid": "482013", "adbCommand": "adb shell getprop | grep model"}' https://device.pcloudy.com/api/execute_adb
    
    String adbdevices =con.executeAdbCommand(authToken, bookedDevice, "adb shell getprop | grep model");
    

    This api help to execute the commands on the booked device.

    Note:This api works only for Android devices.

    Popular adb commands adb shell - launches a shell on the device. adb logcat - allows you to view the device log in real-time.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    adbCommand adb command which you want to execute on device.

    Toggle wifi

    URL format:
    curl -H "Content-Type: application/json" -d '{"token": "authToken", "rid": "rid","wifistate":"true/false"}' <Cloud URL>/api/wifi_statehandler
    
    Ex:
        curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":482013,"wifistate":false}' https://device.pcloudy.com/api/wifi_statehandler
    
    
    

    This API help to ON/OFF the wifi of booked device.

    Note:This api works only for Android devices.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    wifistate true/false

    Set Location

    URL format:
    curl -H "Content-Type: application/json" -d '{"token": "authToken", "rid": "rid","latitude":"latitudeValue","longitude":"longitudeValue"}' <Cloud URL>/api/set_deviceLocation
    
    Ex:
        curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":482013,"latitude":48.8566,"longitude":2.3522}' https://device.pcloudy.com/api/set_deviceLocation
    
    
    

    This API helps users to set phone location (using "latitude" and "longitude") for any location aware app. For your location aware application you can change the geo-location of the device using this feature.

    Note:This api works only for Android devices.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    latitude location latitude
    longitude location longitude

    Device Tunnel

    We are not support Rest api for device tunnel. But we have java method for device tunnel.
    
    String adbConnect = con.startAdbBridge(userName, authToken, bookedDevice);
    

    Users can connect any Device using DeviceTunnel as if the device is connected physically with their local machine with usb. This can be used by Developers to controll a device using ADB commands and debug their apps in real time.

    URL Parameters

    Parameter Description
    userName Registered Email Id.
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Push File

    URL format:
    curl -H "Content-Type:applicatio/json" -d '{"token":"authToken","rid":"rid","pDriveFile":"filename"}' <Cloud URL>/api/pushFileToSwapBox 
    
    Ex:
        curl -H "Content-Type: application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs", "rid": "482013", "pDriveFile":"pCloudy_Appium_Demo.apk"}' https://device.pcloudy.com/api/pushFileToSwapBox
    
    con.SwapboxAPIs().pushFile(authToken, bookedDevice, uploadedApp);
    

    This api push the file or apk from Cloud Drive to the device swapBox. In Android device you can find swapBox in Internal storage.

    Note:This works only on Android device.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    pDriveFile File name which you want to push.

    Capture Device Screenshot

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid", "skin":"true"}' <Cloud URL>/api/capture_device_screenshot
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013", "skin":"true"}' https://device.pcloudy.com/api/capture_device_screenshot
    
    CaptureDeviceScreenshotResultDto dto = con.takeDeviceScreenshot(authToken, Integer.valueOf(bookedDevice.rid), true);
    
    

    This api takes the screen shot of the device. This screenshot helps you to figure out the steps done by automation process.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Get Device Session Details

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid"}' <Cloud URL>/api/get_device_sessionDetails
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013"}' https://device.pcloudy.com/api/get_device_sessionDetails
    
    
    

    This api get the total session details like session start time, session end time and remaining session time.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Start Performance Data

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid", "pkg":"app package name"}' <Cloud URL>/api/start_performance_data
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013", "pkg":"com.pcloudy.appiumdemo "}' https://device.pcloudy.com/api/start_performance_data
    
    con.startPerformanceData(authToken, bookedDevice.rid, install.packageName);
    

    This api help to start the performance data of the app under testing. In this you will get battery, CPU, memory, internet and framerendering data on android device and for iOS will get the CPU, memory and network pockets under testing on that device. This data is stored in cloud drive.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    pkg App package name (will get from install and launch api response)

    Performance Data File List

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid"}' <Cloud URL>/api/manual_access_files_list
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013"}' https://device.pcloudy.com/api/manual_access_files_list
    
    PDriveFileDTO[] files = con.cloudDriveFileList(authToken, bookedDevice.rid);
    

    This api help to get the performance data file names which are stored in cloud drive of a perticular device. In this you will get battery, CPU, memory, internet and framerendering data files.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Download Performance Data

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid", "filename":"fileName"}' <Cloud URL>/api/download_manual_access_data
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013", "filename":"filename"}' https://device.pcloudy.com/api/download_manual_access_data
    
    PDriveFileDTO[] files = con.cloudDriveFileList(authToken, bookedDevice.rid);
        for (PDriveFileDTO file : files) {
        File downloadedFile = con.downloadManualPerformanceData(authToken, bookedDevice.rid, file);
    }
    

    This helps you to download the performance data which was stored in cloud drive.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    filename performance file name.

    Wildnet

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken", "rid":"rid"}' <Cloud URL>/api/startwildnet
    Ex:
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013"}' https://device.pcloudy.com/api/startwildnet
    
     con.startWildnetService(authToken, bookedDevice.rid);
    
    

    Using this feature you can test your local site on any android and iOS devices on pCloudy platform. You can use this feature either Manual or Appium Automation. For more information gothrough the documentation.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Start Device Services

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "rid","startDeviceLogs": "true","startPerformanceData": "true","startSessionRecording": "true"}' <Cloud URL>/api/startdeviceservices
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "164","startDeviceLogs": "true","startPerformanceData": "true","startSessionRecording": "true"}' https://device.pcloudy.com/api/startdeviceservices
    
    
    

    This API helps to initialize device services on the device like device log, performance log, and session video recording.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    rid rid(this will get from book device api response).
    startDeviceLogs Start device logs(true/false).
    startPerformanceData true/false.
    startSessionRecording true/false.

    QR Image Inject

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "rid","startDeviceLogs": "true","fileName": "fileName"}' <Cloud URL>/api/imageInject
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "164","fileName": "pcloudy.png"}' https://device.pcloudy.com/api/imageInject
    
    
    

    This API helps to inject QR images into apps to scan the QR code. You need to install the app(by using Install and Launch app api) which is having the QR scanner functionality then use this api to inject the QR image into app.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    rid rid(this will get from book device api response).
    fileName QR image file(png file)

    Biometric Authentication

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "rid","auth_state":false}' <Cloud URL>/api/fingerprint_auth
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid": "164","auth_state":false}' https://device.pcloudy.com/api/fingerprint_auth
    
    
    

    This API is used for Biometric authentication i.e finger print authentication ( the act of verifying an individual's identity based on their fingerprints).

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    rid rid(this will get from book device api response).
    auth_state false/true

    Release Device

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","rid":"rid"}' <Cloud URL>/api/release_device   
    
    Ex:
        curl -H "Content-Type: application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs", "rid": "482013"}' https://device.pcloudy.com/api/release_device
    
    con.releaseInstantAccessBooking(authToken, bookedDevice);
    

    This api help you to release the device.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    Resigning APIs

    Initiate the Resigning

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","filename": "zipFile"}' <Cloud URL>/api/resign/initiate
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","filename": "minixcuitest.zip"}' https://device.pcloudy.com/api/resign/initiate
    
    
    

    This api initiate the zip file for resigning.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename Zipfile which you want to resing.

    Resigning progress

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","resign_token":"resignToken","filename":"zipfile"}' <Cloud URL>/api/resign/progress
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"s5mtx8f8nc9z4ffdfprynzkh","resign_token": "5f83c58c-4a80-4c13-bf5-738f282c80d2","filename": "minixcuitest.zip"}' https://device.pcloudy.com/api/resign/progress
    
    
    

    This api used for get the resinging status.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename Zipfile.
    resign_token resignToken(which will get from resign initiate api)

    Download Resigned file

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","resign_token":"resignToken","filename":"zipfile"}' <Cloud URL>/api/resign/download
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"s5mtx8f8nc9z4ffdfprynzkh","resign_token": "5f83c58c-4a80-4c13-bf5-738f282c80d2","filename": "minixcuitest.zip"}' https://device.pcloudy.com/api/resign/download
    
    
    

    This api helps to download the resinged file into MYAPP/DATA section.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename Zipfile.
    resign_token resignToken(which will get from resign initiate api)

    APK Instrumentation APIs

    Instrument Initiate

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","fileName": "apkFileName","isImageInjection":"boolean", "isBiometricAuth":"boolean"}' <Cloud URL>/api/app_instrumentation/initiate
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","fileName": "pCloudy_Appium_Demo.apk","isImageInjection":"true", "isBiometricAuth":"false"}' https://device.pcloudy.com/api/app_instrumentation/initiate
    
    
    

    This API initiate the instrumentation process.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename APK file which want to resign.
    isImageInjection Enable or Disable imagae injection instrumentation(true/false)
    isBiometricAuth Enable or Disable Biometric Authentication instrumentation(true/false)

    Instrumentation Progress

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","instrumentation-token":"instrumentationToken"}' <Cloud URL>/api/app_instrumentation/progress
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"s5mtx8f8nc9z4ffdfprynzkh","instrumentation-token": "5f83c5-4a80-4c13-bf5-738f282c80d2"}' https://device.pcloudy.com/api/app_instrumentation/progress
    
    
    

    This API is used to get the instrumentation status of the application .

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    instrumentation-token instrumentation Token(which will get from instrument initiate api)

    Download Instrumented file

    URL format:
    curl -H "Content-Type:application/json" -d '{"token":"authToken","instrumentation-token":"instrumentationToken"}' <Cloud URL>/api/app_instrumentation/download-to-cloud-drive
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token":"s5mtx8f8nc9z4ffdfprynzkh","instrumentation-token": "5f83c5-4a80-4c13-bf5-738f282c80d2"}' https://device.pcloudy.com/api/app_instrumentation/download-to-cloud-drive
    
    
    

    This api download the instrumented application in myapp/data

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    instrumentation-token instrumentation token(which will get from instrument initiate api)

    Appium Automation

    Book Devices For Appium

    URL format: 
    curl -H "Content-Type: application/json" -d '{"token":"authToken","duration":"duration","platform":"platform","devices":[deviceId1,deviceId2,---],"session":"sessionname","overwrite_location":"true"}' <Cloud URL>/api/appium/init
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","duration":"10","platform":"android","devices":[120,256],"session":"Sample session","overwrite_location":"true"}' https://device.pcloudy.com/api/appium/init
    
    BookingDtoDevice[] bookedDevices = con.AppiumApi().bookDevicesForAppium(authToken, selectedDevices, BOOKINGDURATION, sessionName);
    

    This api book the devices for appium execution.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    duration duration in minutes you want to book the each device.
    platform on which flatform devices you want to book (android/ios).
    devices provide array of devices id's for multiple device booking.
    session Enter session name
    overWrite_location true

    Init AppiumHub for App

    URL format: 
    curl -H "Content-Type: application/json" -d '{"token":"authToken","app":"filename"}' <Cloud URL>/api/appium/execute
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","app":"pCloudy_Appium_Demo.apk"}' https://device.pcloudy.com/api/appium/execute
    
    con.AppiumApi().initAppiumHubForApp(authToken, alreadyUploadedApp);
    

    This initiates the appium on devices for that app. The app you had to upload by using upload api which is available in Generic api.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    app provide app name on which app you want to test.

    Get Appium EndPoint

    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken"}' <Cloud URL>/api/appium/endpoint
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs"}' https://device.pcloudy.com/api/appium/endpoint
    
    URL endpoint = con.AppiumApi().getAppiumEndpoint(authToken);
    

    This get the appium Endpoint url.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)

    Get Appium Report Folder

    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken"}' <Cloud URL>/api/appium/folder
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs"}' https://device.pcloudy.com/api/appium/folder
    
    URL reportFolderOnPCloudy = con.AppiumApi().getAppiumReportFolder(authToken);
    

    This gives you the report folder path. In the report you will get the total tests pass, failed and more information about test cases.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)

    Get Appium file list

    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken","rid":"rid}' <Cloud URL>/api/appium/get_appium_file_list
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":"1234"}' https://device.pcloudy.com/api/appium/get_appium_file_list
    
    
    

    This gives you the all the performance files list, to generate the performance data you need to call the Start device services api in generic apis.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from appium/init api response for each device)

    Download Appium Performance Data

    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken","rid":"rid","filename":"fileName"}' <Cloud URL>/api/appium/download_appium_access_data
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":"1234","filename":"cpu.txt"}' https://device.pcloudy.com/api/appium/download_appium_access_data
    
     con.AppiumApi().downloadPerformanceDataByName(authToken,rid,fileName);
    

    This will download the performance data like cpu, memory,battery and video.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from appium/init api response for each device)
    filename Performance list file name(cpu.txt, bat.txt, mem.txt, video.flv)
    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken","rid":"rid"}' <Cloud URL>/api/appium/getShareableReportLink
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":"1234"}' https://device.pcloudy.com/api/appium/getShareableReportLink
    
    
    

    This API provide sharable report link of the executed appium session

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from appium/init api response for each device)

    Update appium session

    URL format: 
    curl -H "Content-Type:application/json" -d '{"token":"authToken","rid":"rid","release_after":"deviceReleaseTime"}' <Cloud URL>/api/appium/update_session
    
    Ex: 
    curl -H "Content-Type:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","rid":"1234", "release_after":"0"}' https://device.pcloudy.com/api/appium/update_session
    
    
    

    This API update is used to update the Appium session. Whatever value user passes in release after parameter, device gets release after that mentioned value(i.e. mentioned time in minutes) E.g: if 0 is passed in the "release_after" parameter, the device will get release immediately. i.e in 0 mins

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from appium/init api response for each device)
    release_after Device get release after that mentioned value(i.e. mentioned time in minutes).

    XCTest Automation

    Book Devices

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken","devices":[deviceId1,deviceId2,---],"booking_duration":"duration","automation_type": "XCUITest"}' <Cloud URL>/api/automationbooking
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","devices":[107],"booking_duration": "30","automation_type": "XCUITest"}' https://device.pcloudy.com/api/automationbooking
    
    
    

    This api book the devices for XCTest automation execution.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    devices Provide array of devices id's for multiple device booking(devices ids will get from Get devices list api response)
    booking_duration Duration in minutes you want to book the each device.
    automation_type Provide automation type(XCUITest).

    Initialize Automation

    URL format: 
    curl -H "Content-Type: application/json" -d '{"token":"authToken","automationId": "automationId","test_suite": "testSuite.zip"}' <Cloud URL>/api/initautomation
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","automationId": "176","test_suite": "Archive_2.zip"}' https://device.pcloudy.com/api/initautomation
    
    
    

    This API initiates the XCTest on devices for that test suite. The test suite you had to upload by using upload API which is available in Generic API.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    automationId automationId(this will get from XCTest book devices api response).
    test_suite Test suite zip file name which is there in cloud drive(My App Data).

    Start Device Services

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","automationId": "automationId","startDeviceLogs": "true","startPerformanceData": "true","startSessionRecording": "true"}' <Cloud URL>/api/startdeviceservices
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","automationId": "164","startDeviceLogs": "true","startPerformanceData": "true","startSessionRecording": "true"}' https://device.pcloudy.com/api/startdeviceservices
    
    
    

    This API helps to initialize device services on the device like device log, performance log, and session video recording.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    automationId automationId(this will get from XCTest book devices api response).
    startDeviceLogs true/false.
    startPerformanceData true/false.
    startSessionRecording true/false.
    URL format: 
    curl -H "Content-Type: application/json" -d '{"token":"authToken","automationId": "automationId"}' <Cloud URL>/api/getAutomationShareableReportLink
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","automationId": "164"}' https://device.pcloudy.com/api/getAutomationShareableReportLink
    
    
    

    This API helps to share the automation reports to team.

    Note: Change the format of shreable link to JSON format.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    automationId automationId(this will get from XCTest book devices api response).

    Release Devices

    URL format: 
    curl -H "Content-Type: application/json" -d '{"token":"authToken","automationId": "automationId"}' <Cloud URL>/api/initautomation
    
    Ex: 
    curl -H "Content-Type: application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs","automationId": "155"}' https://device.pcloudy.com/api/automationrelease
    
    
    

    This API helps you to release the XCTest automation devices.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate api response)
    automationId automationId(this will get from XCTest book devices api response).

    Network Simulation

    Get Network Profiles

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken"}' <Cloud URL>/api/get_atcd_profiles
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs"}' https://device.pcloudy.com/api/get_atcd_profiles
    
    Profile[] profiles = con.NetworkSimulationApi().getNetworkProfiles(authToken);
    

    This gives you the total network profile list with upload and download speed that are present in device under Network feture in pCloudy. e.g 3G,2G,4G,Broadband Low Speed.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)

    Set Network Profile(Atcd Shape)

    URL format:
    
    curl -H "Content-Tyep:application/json" -d '{"token":"authToken", "rid":"rid", "name":"profileName"}' <Cloud URL>/api/atcd_shape
    
    Ex: curl -H "Content-Tyep:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013", "name":"Cable"}' https://device.pcloudy.com/api/atcd_shape
    
      con.NetworkSimulationApi().setAtcdShape(authToken, bookedDevice, profile);
    

    This api set the network profile on booked device.

    Note:Network profile name should be pass as one of the parameter.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)
    name Network profile name (will get from Get network profile api)

    Unshape Network Profile

    URL format:
    
    curl -H "Content-Tyep:application/json" -d '{"token":"authToken", "rid":"rid"}' <Cloud URL>/api/atcd_unshape
    
    Ex: curl -H "Content-Tyep:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs", "rid":"482013"}' https://device.pcloudy.com/api/atcd_unshape
    
      con.NetworkSimulationApi().unShapeAtcd(authToken, bookedDevice);
    

    This api unshape the network profile that was already set in the device..

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    rid Reservation id(will get from book device api response)

    App Center API

    Get App Center Apps

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken"}' <Cloud URL>/api/get_appcenter_apps
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token":"swqkm7f55v39g9kkdggkzs"}' https://device.pcloudy.com/api/get_appcenter_apps
    
    
    

    These APIs allow users to directly use the app that is present in the “Microsoft App Center” account and install it on the connected device on the pCloudy platform. This will save users the time that is required for uploading various apps.This used to fetch the app that is already there in the user account app center account.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)

    Get App Center App releases

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken", "appcenter_token":"AppcenterToken", "app_username":"ApplicationUser","app_name":"ApplicationName"}' <Cloud URL>/api/get_appcenter_app_release_details
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs","appcenter_token": "e336492b34065896c7ddbfca53852","app_username": "testapplication131-gmail.com","app_name": "Espresso"}' https://device.pcloudy.com/api/get_appcenter_app_release_details
    
    
    

    This API is used to fetch all the builds of an application

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    appcenter_token App Center Token(will get from Get App Center App API response)
    app_username App User Name (will get from Get App Center App API response)
    app_name Application Name (will get from Get App Center App API response)

    Get App Center App release details

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken", "appcenter_token":"AppcenterToken", "app_username":"ApplicationUser","app_name":"ApplicationName","app_releaseid":"AppReleasedId"}' <Cloud URL>/api/get_appcenter_app_releases
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs","appcenter_token": "e336492b34065896c7ddbfca53852","app_username": "testapplication131-gmail.com","app_name": "Espresso","app_releaseid":3}' https://device.pcloudy.com/api/get_appcenter_app_releases
    
    
    

    This API is used to retrieve release information of a specific app.

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    appcenter_token App Center Token(will get from Get App Center App API response)
    app_username App User Name (will get from Get App Center App API response)
    app_name Application Name (will get from Get App Center App API response)
    app_releaseid Release Id ( will get from Get App Center App releases response(ie id))

    Download or Upload the App Center Apps to pCloudy Portal

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken", "download_url":"download url"}' <Cloud URL>/api/upload_external_build
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs","download_url": "https://appcenter-filemanagement-distrib2ede6f06e.azureedge.net/19414483"}' https://device.pcloudy.com/api/upload_external_build
    
    
    

    This is used to download or upload the app to the pCloudy platform from the App center

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    download_url APP Download url of app center(will get from Get App Center App release details response)

    Delete uploaded App Center App from pCloudy Portal

    URL format:
    curl -H "Content-Tyepe:application/json" -d '{"token":"authToken", "file_name":"filename"}' <Cloud URL>/api/delete_external_file
    
    Ex: 
    curl -H "Content-Tyepe:application/json" -d '{"token": "swqkm7f55v39g9kkdggkzs","file_name": "expresso"}' https://device.pcloudy.com/api/delete_external_file
    
    
    

    This API is used to delete the app center app from pcloudy platform

    URL Parameters

    Parameter Description
    token Authtoken(this will get from authenticate response)
    filename App name to delete