Run scriptless with the Kobiton API Learn how to run scriptless automation using the Kobiton API. For more information, see Kobiton API v1. Before you start You’ll need to complete the following: Create one or more baseline sessions. Get the session ID for your baseline session(s) using the Kobiton portal or Kobiton API. Get your API credentials. Configure your authorization header To ensure your credentials are kept secure, all requests sent to https://api.kobiton.com/ must contain an Authentication header. Credentials assigned to your authorization header need to be in base64 format. In your terminal, convert your Kobiton API credentials to base64 format using the following command: echo -n "${yourUserNameOrEmail}:${yourApiKey}" | base64 Copy the generated string and save it in a secure location for later. Get your parameter values Determine which scriptless automation parameters you want to use during your session, then get the necessary values. The /revisitPlans/start endpoint supports up to 11 parameters, but only the following are required: Parameter Type Required? Description exploringSessionIds [integer] Always A list of one or more baseline session IDs, where each baseline session is run as its own scriptless automation session. Up to 10 baseline session IDs can be assigned; however, the same device platform must be used for each session (such as iOS or Android). deviceSelections [object] Yes, if deviceBundleId is unassigned An array of one or more devices, where each device is assigned a deviceCapabilities object (required) and dataSetId (optional). For more information, see scriptless automation parameters. deviceBundleId [integer] Yes, if deviceSelections is unassigned A list of one or more device bundle IDs where each device will run a scriptless session for each session in exploringSessionIds. Up to six device bundle IDs can be assigned. Make a POST request In the terminal, make a POST request using your authorization header and parameter values. curl -X POST https://api.kobiton.com/v1/revisitPlans/start \ -H 'Authorization: Basic ${yourBase64String}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "exploringSessionIds": [${sessionId}], "deviceSelections": [ { "dataSetId": ${dataSetId}, "deviceCapabilities": [ { "deviceName": "${deviceName}", "platformVersion": "${platformVersion}", "deviceSource": "${deviceSource}" } ], } ], "appPath": "${appPath}", "deviceBundleId": [${deviceBundleId}], "runAllDevicesInBundle": ${runAllDevicesInBundleBoolean}, "testCaseIds": [${testCaseId}] }' A successful POST response will return a 200 status, along with the following information: [ { "exploringSessionId": ${exploringSessionId}, "deviceCapabilities": [ { "dataSetId": ${dataSetId}, "deviceName": "${deviceName}", "platformVersion": "${platformVersion}", "deviceSource": "${deviceSource}" } ], "executionLink": "https://portal.kobiton.com/${pathToYourSession}" } ] When you’re finished, use the URL assigned to testRunDetailLink to review your session in Session Explorer. Example POST request Here’s an example POST request where multiple devices will each download an app and test the app three different times using three different baseline sessions. Example curl -X POST https://api.kobiton.com/v1/revisitPlans/start \ -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "exploringSessionIds": [1, 2, 3], "deviceSelections": [ { "dataSetId": 99, "deviceCapabilities": [ { "deviceName": "Galaxy S8", "platformVersion": "*", "deviceSource": "KOBITON" }, { "deviceName": "*S9*", "platformVersion": "10.0.0", "deviceSource": "KOBITON" } ] }, { "dataSetId": 100, "deviceCapabilities": { "deviceName": "Nokia*", "platformVersion": "11.0.0", "deviceSource": "KOBITON" } } ], "appPath": "kobiton-store:v100", "deviceBundleId": [1, 2, 3 ], "runAllDevicesInBundle": true, "testCaseIds": [1, 2, 3] }' If the POST request is successful, the following will be returned: Example [ { "exploringSessionId": 0, "deviceCapabilities": [ { "dataSetId": 99, "deviceName": "Galaxy S9", "platformVersion": "10.0.0", "deviceSource": "KOBITON" }, { "dataSetId": 100, "deviceName": "Nokia 5.3", "platformVersion": "11.0.0", "deviceSource": "KOBITON" } ], "executionLink": "https://portal.kobiton.com/sessions/100/plan/executions" } ]