Navbar 2
Logo
Shell HTTP JavaScript Node.JS Ruby Python Java
Back to documentation

Kobiton API v1.0

Base URL: https://api.kobiton.com/v1

Authentication

Users can authenticate with their username/email and API Key.

With username testuser and api key 123ed­123fac­9137dca the sample authorization header will be: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

With email address testuser@gmail.com and api key 123ed­123fac­9137dca the sample authorization header will be: Basic dGVzdHVzZXJAZ21haWwuY29tOjEyM2VkrTEyM2ZhY605MTM3ZGNh

The secure method is Basic Auth with structure: usernameOrEmail:apikey.

Basic Auth is a simple technique for access control. Authorization header will have a simple structure as Basic base64(usernameOrEmail:apikey) to secure each API request.

// Create a base64 string.
var base64EncodedBasicAuth = window.btoa('testuser:123ed­123fac­9137dca');

// To authenticate with email, use
// var base64EncodedBasicAuth = window.btoa('testuser@gmail.com:123ed­123fac­9137dca');

// Defines Authorization header for a request.
var headers = {
  'Authorization': 'Basic ' + base64EncodedBasicAuth
};

// Sends a request with Authorization header.
$.ajax({
  url: 'https://api.kobiton.com/v1/apps',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

All requests sending to https://api.kobiton.com/v1 must contain the API key which can be found at API Keys Settings.

Apps Repository

The App Repository is intended to help users manage new and existing versions of their applications within the Kobiton cloud. Users can add any number of apps to the App Repository and also create restricted access if necessary.If you need more details you can Visit Managing Apps for more details

Sample code to upload your apps to Kobiton via API

Get An Application Version


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/app/versions/{versionId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/app/versions/{versionId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/app/versions/{versionId}', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/app/versions/{versionId}',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/app/versions/{versionId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/app/versions/{versionId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/app/versions/{versionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /app/versions/{versionId}

Get information about an application version.

Parameters

Parameter In Type Required Description
versionId path integer true Application Version ID.

Sample response

{
  "id": 2,
  "appId": 1,
  "name": "Test App",
  "state": "OK",
  "version": "1.3.0"
}

Responses

Status Meaning Description
200 OK Get the application version info successfully.

Response Schema

Status Code 200

Name Type Required Description
id integer false No description
appId integer false No description
name string false No description
state string false No description
version string false No description

Delete Application Version


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/app/versions/{versionId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

DELETE https://api.kobiton.com/v1/app/versions/{versionId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/app/versions/{versionId}', {
    method: 'DELETE'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/app/versions/{versionId}',
  json: true,
  method: 'DELETE'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.delete 'https://api.kobiton.com/v1/app/versions/{versionId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.delete('https://api.kobiton.com/v1/app/versions/{versionId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/app/versions/{versionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /app/versions/{versionId}

Delete an application version.

Parameters

Parameter In Type Required Description
versionId path integer true The application version ID.

Responses

Status Meaning Description
200 OK Delete an application version successfully.

Get Applications


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/apps \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/apps HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/apps', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/apps', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /apps

Get list of applications which were added to the Apps Repo.

Sample response

[
  {
    "id": 17,
    "createdAt": "2017‐04‐18T04:36:05.537Z",
    "name": "Test App",
    "privateAccess": true,
    "os": "ANDROID",
    "createdBy": "testuser",
    "state": "OK",
    "versions": [
      {
        "id": 20,
        "createdAt": "2017‐04‐18T04:36:05.556Z",
        "name": "Test App",
        "version": "1.3.0",
        "createdBy": "testuser",
        "state": "OK",
        "nativeProperties": {
          "package": null,
          "application": {
            "icon": "res/mipmap‐mdpi‐v4/app‐prod‐debug.png",
            "label": "Test App",
            "versionName": "1.3.0",
            "iconLocalPath": "/tmp/kobiton‐api‐13956/u‐1‐1492490165564/app‐prod‐debug‐8165dff0‐23f0‐11e7‐81ff‐7f02fd6dff65/res/mipmap‐mdpi‐v",
            "iconUrl": "https://kobiton.s3.amazonaws.com/users/1/apps/app‐prod‐debug‐8c96dd70‐23f0‐11e7‐81ff‐7f02fd6dff65.png?AWSAccessKeyId=AKIAJDVH"
          }
        }
      }
    ],
    "iconUrl": "https://kobiton.s3.amazonaws.com/users/1/apps/app‐prod‐debug‐8c96dd70‐23f0‐11e7‐81ff‐7f02fd6dff65.png?AWSAccessKeyId=AKIAJDVH"
  }
]

Responses

Status Meaning Description
200 OK Get the applications successfully.

Response Schema

Status Code 200

Name Type Required Description
anonymous [App] false No description

Create Application Or Version


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/apps \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/apps HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "filename": "app‐prod‐debug.apk",
  "appPath": "users/1/apps/app‐prod‐debug‐237824a0‐302c‐11e7‐9bfd‐ff417c89610a.apk"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "filename": "app‐prod‐debug.apk",
  "appPath": "users/1/apps/app‐prod‐debug‐237824a0‐302c‐11e7‐9bfd‐ff417c89610a.apk"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/apps', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/apps', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /apps

Create a new application or a new application version.

This endpoints is a part of uploading apps to Apps Repository, see the detail document
NOTE:
This endpoint will return 2 value appId and versionId, but appId is only available once endpoint Generate Upload URL (POST apps/uploadUrl) is provided appId.

Body data

{
  "filename": "app‐prod‐debug.apk",
  "appPath": "users/1/apps/app‐prod‐debug‐237824a0‐302c‐11e7‐9bfd‐ff417c89610a.apk"
}

Parameters

Parameter In Type Required Description
body body object true No description
» filename body string false Set custom app filename. By default it’s the filename from the parameter “appPath”
» appPath body string true No description

Sample response

{
  "appId": 10,
  "versionId": 12321
}

Responses

Status Meaning Description
200 OK Received the S3 file and parsing the application.

Response Schema

Status Code 200

Name Type Required Description
appId integer false appId is only available once we execute endpoint Generate Upload URL (POST apps/uploadUrl) and this endpoint is provided appId. If POST apps/uploadUrl execute with no appId, the appId value is null
versionId integer false This is the version id of the application.

Delete Multiple Applications


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/apps \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

DELETE https://api.kobiton.com/v1/apps HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "appIds": [
    1,
    2,
    3,
    4,
    5
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps', {
    method: 'DELETE',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "appIds": [
    1,
    2,
    3,
    4,
    5
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps',
  json: true,
  method: 'DELETE',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://api.kobiton.com/v1/apps', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.delete('https://api.kobiton.com/v1/apps', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /apps

Delete Multiple Applications

Body data

{
  "appIds": [
    1,
    2,
    3,
    4,
    5
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» appIds body [integer] false The Applications IDs

Sample response

{
  "deleted": 3,
  "failed": 2,
  "result": [
    {
      "message": "App has been deleted successfully",
      "appIds": [
        1,
        2,
        3
      ]
    },
    {
      "message": "App id not found!",
      "appIds": [
        4,
        5
      ]
    }
  ]
}

Responses

Status Meaning Description
200 OK Result

Response Schema

Status Code 200

Name Type Required Description
deleted integer false No description
failed integer false No description
result [object] false No description
» message string false No description
» appIds [integer] false No description

Generate Upload URL


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/apps/uploadUrl \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/apps/uploadUrl HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "filename": "app-debug.apk",
  "appId": 1
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/uploadUrl', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "filename": "app-debug.apk",
  "appId": 1
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps/uploadUrl',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/apps/uploadUrl', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/apps/uploadUrl', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/uploadUrl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /apps/uploadUrl

Generate a pre-signed S3 upload URL.

This endpoints is a part of uploading apps to Apps Repository, see the detail document

Body data

{
  "filename": "app-debug.apk",
  "appId": 1
}

Parameters

Parameter In Type Required Description
body body object true No description
» filename body string true No description
» appId body integer false If you’re going to create a new version, specify an app id of existing application here. Otherwise, skip this field

Sample response

{
  "appPath": "users/1/apps/app‐prod‐debug‐237824a0‐302c‐9bfd‐ff417c89610a.apk",
  "url": "https://kobiton-us.s3.amazonaws.com/users/1/apps/app‐f417c89610a.apk?AWSAccessKeyId=AKINQ57IQCo\n"
}

Responses

Status Meaning Description
200 OK Successfully return pre-signed upload URL.

Response Schema

Status Code 200

Name Type Required Description
appPath string false The S3 object key for uploaded file. The client will use this value for step Create Application Or Version
url string false The pre-signed URL for uploading. The client will use this url to upload their app to AWS under Kobiton S3 bucket

Delete Application


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/apps/{appId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

DELETE https://api.kobiton.com/v1/apps/{appId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/{appId}', {
    method: 'DELETE'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/apps/{appId}',
  json: true,
  method: 'DELETE'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.delete 'https://api.kobiton.com/v1/apps/{appId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.delete('https://api.kobiton.com/v1/apps/{appId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/{appId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /apps/{appId}

Delete an application.

Parameters

Parameter In Type Required Description
appId path integer true The application ID.

Responses

Status Meaning Description
200 OK Delete an application successfully.

Get An Application


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/apps/{appId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/apps/{appId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/{appId}', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps/{appId}',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/apps/{appId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/apps/{appId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/{appId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /apps/{appId}

Get information about an application.

Parameters

Parameter In Type Required Description
appId path integer true Application ID.

Sample response

{
  "id": 1,
  "name": "Test App",
  "state": "OK",
  "versions": [
    {
      "id": 2,
      "state": "OK",
      "version": 1.2
    }
  ]
}

Responses

Status Meaning Description
200 OK Get the application info successfully.

Response Schema

Status Code 200

Name Type Required Description
id integer false No description
name string false No description
state string false No description
versions [Unknown] false No description
» id integer false No description
» state string false No description
» version string false No description

Make An Application Private


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/apps/{appId}/private \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

PUT https://api.kobiton.com/v1/apps/{appId}/private HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/{appId}/private', {
    method: 'PUT'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/apps/{appId}/private',
  json: true,
  method: 'PUT'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.put 'https://api.kobiton.com/v1/apps/{appId}/private', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.put('https://api.kobiton.com/v1/apps/{appId}/private', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/{appId}/private");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /apps/{appId}/private

Make an application private so it’s only accessible by creator.

Parameters

Parameter In Type Required Description
appId path integer true Application ID.

Responses

Status Meaning Description
200 OK Successfully make the application private.

Make An Application Public


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/apps/{appId}/public \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

PUT https://api.kobiton.com/v1/apps/{appId}/public HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/{appId}/public', {
    method: 'PUT'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/apps/{appId}/public',
  json: true,
  method: 'PUT'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.put 'https://api.kobiton.com/v1/apps/{appId}/public', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.put('https://api.kobiton.com/v1/apps/{appId}/public', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/{appId}/public");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /apps/{appId}/public

Make an application public to everyone in the organization.

Parameters

Parameter In Type Required Description
appId path integer true Application ID.

Responses

Status Meaning Description
200 OK Successfully make the application private.

Upload File To S3


Sample request

curl
  -T ${filePath} \
  -H "Content-Type: application/octet-stream" \
  -H "x-amz-tagging: unsaved=true" \
  -X PUT presignedUrl

PUT presignedUrl HTTP/1.1
content-type: application/octet-stream
x-amz-tagging: unsaved=true
CONTENT OF YOUR APPLICATION FILE

// HTML5 code: <input id="inputFileId" type="file">
$.ajax({
  type: 'PUT',
  url: presignedUrl,
  contentType: 'application/octet-stream',
  processData: false,
  headers: {
    'x-amz-tagging': 'unsaved=true'
  },
  // content of your application file
  data: $('#inputFileId').get()[0].files[0]  
})
.success(function() {
  alert('File uploaded');
})
 .error(function() {
  alert('File NOT uploaded');
})

const fs = require('fs');
const request = require('request');
const stats = fs.statSync(filePath);

fs.createReadStream(filePath).pipe(
  request(
    {
      method: 'PUT',
      url: presignedUrl,
      headers: {
        'Content-Length': stats.size,
        'Content-Type': 'application/octet-stream',
        "x-amz-tagging": "unsaved=true"
      }
    },  
    function (err, res, body) {
      console.log(body);
    }
  )
);

# if needed, run `pip install requests`

url = "presignedUrl"
filepath = "filepath"
headers = {
  'Content-Type': 'application/octet-stream',
  'x-amz-tagging': 'unsaved=true'
}
with open(filepath) as file:
  fileContent = file.read()
  response = requests.put(url,data=fileContent, headers=headers)
print(response)

# if needed, run `gem install rest-client` and `gem install json` in your terminal

headers = {
  'Content-Type' => 'application/octet-stream',
  'x-amz-tagging' => 'unsaved=true'
}
result = RestClient.put presignedUrl, File.read(filePath), headers: headers, :content_type => 'application/octet-stream'
p result

import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.net.*;

URLConnection urlconnection = null;
File appFile = new File("file path");
URL presignedUrl = new URL("presignedUrl");

urlconnection = presignedUrl.openConnection();
urlconnection.setDoOutput(true);
urlconnection.setDoInput(true);

if (urlconnection instanceof HttpURLConnection) {
  ((HttpURLConnection) urlconnection).setRequestMethod("PUT");
  ((HttpURLConnection) urlconnection).setRequestProperty("Content-type", "application/octet-stream");
  ((HttpURLConnection) urlconnection).connect();
}

BufferedOutputStream bos = new BufferedOutputStream(urlconnection.getOutputStream());
FileInputStream bis = new FileInputStream(appFile);
int i;
while ((i = bis.read()) != -1) {
  bos.write(i);                          
}
bis.close();

System.out.println(((HttpURLConnection) urlconnection).getResponseMessage());

InputStream inputStream;
int responseCode = ((HttpURLConnection) urlconnection).getResponseCode();
if ((responseCode >= 200) && (responseCode <= 202)) {
  inputStream = ((HttpURLConnection) urlconnection).getInputStream();
  int j;
  while ((j = inputStream.read()) > 0) {
    System.out.println(j);
  }

} else {
  inputStream = ((HttpURLConnection) urlconnection).getErrorStream();
}
((HttpURLConnection) urlconnection).disconnect();

PUT /{pre-signed-url}

Pre-signed S3 URL helps us upload an application in secure.

This endpoints is a part of uploading apps to Apps Repository, see the detail document

Read more about pre-signed S3 URL

Responses

Status Meaning Description
200 OK The file has been uploaded successfully.

Data-Driven Testing

Get all data sets


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/data-sets?exploringSessionId=0 \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/data-sets?exploringSessionId=0 HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/data-sets', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/data-sets?exploringSessionId=0',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/data-sets', params: {
  'exploringSessionId' => 'integer'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/data-sets', params={
  'exploringSessionId': 0
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/data-sets?exploringSessionId=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /data-sets

Get all data sets in the specified session.

Parameters

Parameter In Type Required Description
exploringSessionId query integer true The identifier of a session.

Sample response

[
  {
    "id": 770,
    "name": "Set 1",
    "exploringSessionId": 205160,
    "isAssignedDevice": true,
    "assignedDevice": {
      "deviceName": "Galaxy 8+",
      "platformName": "ANDROID",
      "platformVersion": "9.7"
    },
    "createdAt": "2020-10-26 13:30:35.835+07",
    "totalActionCount": 6,
    "editedActionCount": 1
  }
]

Responses

Status Meaning Description
200 OK Get data sets list in the specified session successfully

Response Schema

Status Code 200

Name Type Required Description
anonymous [object] false The data set object schema
» id integer false The dataset ID.
» name string false The dataset name.
» exploringSessionId integer false The session ID.
» isAssignedDevice boolean false Return with a specified flag. The flag indicates whether the data set is assigned to any devices or not.
» assignedDevice object false The assigned device’s information
»» deviceName string false The assigned device’s name.
»» platformName string false The assigned device’s platform name.
»» platformVersion string false The assigned device’s platform version.
» createdAt string false The first time of the creating data set.
» totalActionCount integer false The quantity of the action.
» editedActionCount integer false The quantity of the edited action.

Create a new data set by commnand ID


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/data-sets/by-command \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/data-sets/by-command HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/data-sets/by-command', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/data-sets/by-command',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/data-sets/by-command', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/data-sets/by-command', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/data-sets/by-command");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /data-sets/by-command

Create a new data set by commnand ID

Body data

{
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» exploringSessionId body integer true The manual session ID used to trigger your Scriptless Automation
» dataSetActions body [object] false A list of data set actions to assign values based on command ID or element properties
»» commandId body integer false ID of the data-driven supported command.
»» value body string false The desired text value to overwritten to the data-driven action.

Sample response

{
  "message": "Data set is successfully created.",
  "data": {
    "id": 224,
    "name": "Set 1",
    "exploringSessionId": 1233,
    "createdAt": "2020-12-10T20:17:22.212Z",
    "updatedAt": "2020-12-10T20:17:22.212Z",
    "createdBy": {
      "id": 2,
      "username": "admin"
    },
    "actions": [
      {
        "commandId": 2313,
        "actionProperties": {
          "text": "foo"
        }
      },
      {
        "commandId": 2315,
        "actionProperties": {
          "text": "bar"
        }
      }
    ]
  }
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
undefined object false The values of the newly created data set

Create a new data set by element property


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/data-sets/by-element \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/data-sets/by-element HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    },
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/data-sets/by-element', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    },
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/data-sets/by-element',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/data-sets/by-element', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/data-sets/by-element', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/data-sets/by-element");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /data-sets/by-element

Create a new data set by element property

Body data

{
  "exploringSessionId": 100,
  "dataSetActions": [
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    },
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "bar"
    }
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» exploringSessionId body integer true The manual session ID used to trigger your Scriptless Automation.
» dataSetActions body [object] false A list of data set actions to assign values based on command ID or element properties.
»» elementProperty body object false The element attribute of one or multiple elements to assign data-driven value to.
»» value body string false The desired text value to overwrite the data-driven action text.

Sample response

{
  "message": "Data set is successfully created.",
  "data": {
    "id": 224,
    "name": "Set 1",
    "exploringSessionId": 1233,
    "createdAt": "2020-12-10T20:17:22.212Z",
    "updatedAt": "2020-12-10T20:17:22.212Z",
    "createdBy": {
      "id": 2,
      "username": "admin"
    },
    "actions": [
      {
        "commandId": 2313,
        "actionProperties": {
          "text": "foo"
        }
      },
      {
        "commandId": 2315,
        "actionProperties": {
          "text": "bar"
        }
      }
    ]
  }
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
undefined object false The values of the newly created data set

Update data set actions by command ID.


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PUT https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command', {
    method: 'PUT',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command',
  json: true,
  method: 'PUT',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-command");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /data-sets/{dataSetId}/actions/by-command

Update data set actions by command ID.

Body data

{
  "dataSetActions": [
    {
      "commandId": 2313,
      "value": "foo"
    },
    {
      "commandId": 2315,
      "value": "bar"
    }
  ]
}

Parameters

Parameter In Type Required Description
dataSetId path integer true The ID of the data set to be updated.
body body object true No description
» dataSetActions body [object] false A list of data set actions to assign values based on command ID or element properties.
»» commandId body integer false ID of the data-driven supported command.
»» value body string false The desired text value to overwrite the data-driven action text.

Sample response

{
  "message": "Data set actions are updated.",
  "data": {
    "successfulActions": [
      {
        "id": 345,
        "dataSetId": 224,
        "commandId": 2313,
        "actionType": "TYPE_KEYBOARD",
        "actionProperties": {
          "text": "foo"
        },
        "createdAt": "2020-12-10T20:17:22.236Z",
        "updatedAt": "2020-12-10T20:19:17.078Z"
      }
    ],
    "failedActions": [
      {
        "id": 346,
        "dataSetId": 224,
        "commandId": 2315,
        "actionType": "TYPE_KEYBOARD",
        "actionProperties": {
          "text": "old_text"
        },
        "createdAt": "2020-12-10T20:17:22.236Z",
        "updatedAt": "2020-12-10T20:19:17.077Z"
      }
    ]
  }
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
undefined object false The values of the newly created data set.

Update data set actions by element property


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PUT https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "dataSetActions": [
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "foo"
    },
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element', {
    method: 'PUT',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "dataSetActions": [
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "foo"
    },
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element',
  json: true,
  method: 'PUT',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/data-sets/{dataSetId}/actions/by-element");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /data-sets/{dataSetId}/actions/by-element

Update data set actions by element property

Body data

{
  "dataSetActions": [
    {
      "elementProperty": {
        "resource-id": "com.example.app:id/textview_first"
      },
      "value": "foo"
    },
    {
      "elementProperty": {
        "class": "android.widget.EditText"
      },
      "value": "bar"
    }
  ]
}

Parameters

Parameter In Type Required Description
dataSetId path integer true The ID of the data set to be updated.
body body object true No description
» dataSetActions body [object] false A list of data set actions to assign values based on command ID or element properties
»» elementProperty body object false The element attribute of one or multiple element to assign data-driven value to.
»» value body string false The desired text value to overwritten to the data-driven action.

Sample response

{
  "message": "Data set actions are updated.",
  "data": {
    "successfulActions": [
      {
        "id": 345,
        "dataSetId": 224,
        "commandId": 2313,
        "actionType": "TYPE_KEYBOARD",
        "actionProperties": {
          "text": "foo"
        },
        "createdAt": "2020-12-10T20:17:22.236Z",
        "updatedAt": "2020-12-10T20:19:17.078Z"
      }
    ],
    "failedActions": [
      {
        "id": 346,
        "dataSetId": 224,
        "commandId": 2315,
        "actionType": "TYPE_KEYBOARD",
        "actionProperties": {
          "text": "old_text"
        },
        "createdAt": "2020-12-10T20:17:22.236Z",
        "updatedAt": "2020-12-10T20:19:17.077Z"
      }
    ]
  }
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
undefined object false The values of the newly created data set.

Devices

You can use cloud devices, your own devices or your organization’s devices with Kobiton manual and automation testing.

Visit Getting Started for more details

Get All Devices


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/devices \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/devices HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/devices', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/devices',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/devices', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/devices', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /devices

Retrieve devices in 3 groups: private/org, favorite and cloud devices.

Parameters

Parameter In Type Required Description
groupId query integer false The current group id.
udid query string false The udid of Cloud device.
isBooked query boolean false Check if the device is booked.
isOnline query boolean false Check if the device is online.
modelName query string false The device model.
deviceName query string false The device name, can use exact name or name, name, name.
platformName query string false The device platform.
platformVersion query integer false The platform device version, can use exact version or version, version, version.
browserName query string false The browser is used in the device.
appiumDisabled query boolean false Check if Appium is disabled.
isPlugged query boolean false There are 2 cases for ‘isPlugged’ parameter. If ‘isPlugged=true’, the plugged devices were displayed. If ‘isPlugged=false’, the unplugged devices were displayed.

Sample response

{
  "privateDevices": [
    {
      "id": 17469,
      "isBooked": false,
      "isOnline": false,
      "modelName": "LG-K350",
      "deviceName": "LG K8",
      "resolution": {
        "width": 720,
        "height": 1280
      },
      "platformName": "ANDROID",
      "platformVersion": "6.0",
      "installedBrowsers": [
        {
          "name": "chrome",
          "version": "55.0.2883.91"
        }
      ],
      "deviceImageUrl": "",
      "isFavorite": true,
      "isCloud": true,
      "isMyOrg": false,
      "isMyOwn": false,
      "udid": "LGK350YPR4H"
    }
  ],
  "favoriteDevices": [
    {
      "id": 17469,
      "isBooked": false,
      "isOnline": false,
      "modelName": "LG-K350",
      "deviceName": "LG K8",
      "resolution": {
        "width": 720,
        "height": 1280
      },
      "platformName": "ANDROID",
      "platformVersion": "6.0",
      "installedBrowsers": [
        {
          "name": "chrome",
          "version": "55.0.2883.91"
        }
      ],
      "deviceImageUrl": "",
      "isFavorite": true,
      "isCloud": true,
      "isMyOrg": false,
      "isMyOwn": false
    }
  ],
  "cloudDevices": [
    {
      "id": 17469,
      "isBooked": false,
      "isOnline": false,
      "modelName": "LG-K350",
      "deviceName": "LG K8",
      "resolution": {
        "width": 720,
        "height": 1280
      },
      "platformName": "ANDROID",
      "platformVersion": "6.0",
      "installedBrowsers": [
        {
          "name": "chrome",
          "version": "55.0.2883.91"
        }
      ],
      "deviceImageUrl": "",
      "isFavorite": true,
      "isCloud": true,
      "isMyOrg": false,
      "isMyOwn": false
    }
  ]
}

Responses

Status Meaning Description
200 OK Get the devices successfully.

Response Schema

Status Code 200

Name Type Required Description
privateDevices [PrivateDevice] false No description
favoriteDevices [CloudDevice] false No description
cloudDevices [CloudDevice] false No description

Mark Device Favorite


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/devices/{deviceId}/favorite \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

POST https://api.kobiton.com/v1/devices/{deviceId}/favorite HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/devices/{deviceId}/favorite', {
    method: 'POST'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/devices/{deviceId}/favorite',
  json: true,
  method: 'POST'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.post 'https://api.kobiton.com/v1/devices/{deviceId}/favorite', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.post('https://api.kobiton.com/v1/devices/{deviceId}/favorite', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices/{deviceId}/favorite");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /devices/{deviceId}/favorite

Mark a device favorite

Parameters

Parameter In Type Required Description
deviceId path string true Device ID

Responses

Status Meaning Description
200 OK Successfully marked device favorite.

Unmark Favorite Device


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/devices/{deviceId}/favorite \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

DELETE https://api.kobiton.com/v1/devices/{deviceId}/favorite HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/devices/{deviceId}/favorite', {
    method: 'DELETE'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/devices/{deviceId}/favorite',
  json: true,
  method: 'DELETE'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.delete 'https://api.kobiton.com/v1/devices/{deviceId}/favorite', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.delete('https://api.kobiton.com/v1/devices/{deviceId}/favorite', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices/{deviceId}/favorite");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /devices/{deviceId}/favorite

Unmark a favorite device

Parameters

Parameter In Type Required Description
deviceId path string true Device ID

Responses

Status Meaning Description
200 OK Successfully unmarked favorite device.

Get Device Status


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/devices/{deviceId}/status \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/devices/{deviceId}/status HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/devices/{deviceId}/status', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/devices/{deviceId}/status',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/devices/{deviceId}/status', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/devices/{deviceId}/status', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices/{deviceId}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /devices/{deviceId}/status

Get status of a specific device

Sample response

{
  "isBooked": true,
  "isOnline": true
}

Responses

Status Meaning Description
200 OK Get device status sucessfully.

Response Schema

Status Code 200

Name Type Required Description
isBooked boolean false No description
isOnline boolean false No description

Get Device Information


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/devices/{deviceUDID} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/devices/{deviceUDID} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/devices/{deviceUDID}', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/devices/{deviceUDID}',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/devices/{deviceUDID}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/devices/{deviceUDID}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices/{deviceUDID}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /devices/{deviceUDID}

Get information of a specific device

Sample response

{
  "id": 17469,
  "isBooked": false,
  "isOnline": false,
  "modelName": "LG-K350",
  "deviceName": "LG K8",
  "resolution": {
    "width": 720,
    "height": 1280
  },
  "platformName": "ANDROID",
  "platformVersion": "6.0",
  "installedBrowsers": [
    {
      "name": "chrome",
      "version": "55.0.2883.91"
    }
  ],
  "deviceImageUrl": "",
  "isFavorite": true,
  "isCloud": true,
  "isMyOrg": false,
  "isMyOwn": false,
  "udid": "LGK350YPR4H"
}

Responses

Status Meaning Description
200 OK OK

Group

Get user’s groups


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/organizations/{organizationId}/groups/own \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/organizations/{organizationId}/groups/own HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/organizations/{organizationId}/groups/own', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/organizations/{organizationId}/groups/own',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/organizations/{organizationId}/groups/own', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/organizations/{organizationId}/groups/own', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/organizations/{organizationId}/groups/own");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /organizations/{organizationId}/groups/own

Get all groups that a user belongs to.

Parameters

Parameter In Type Required Description
organizationId path integer true The identifier of user’s organization.

Sample response

[
  {
    "id": 1,
    "organizationId": 2,
    "name": "Alpha Group",
    "description": "Used for manual"
  }
]

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
anonymous [Group] false The list of groups that a user belongs to.

Unassign members


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/organizations/groups/members/unassign \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

POST https://api.kobiton.com/v1/organizations/groups/members/unassign HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "emails": [
    "test-user@kobiton.com",
    "test-user1@kobiton.com"
  ],
  "groupName": "TestGroup"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/organizations/groups/members/unassign', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "emails": [
    "test-user@kobiton.com",
    "test-user1@kobiton.com"
  ],
  "groupName": "TestGroup"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/organizations/groups/members/unassign',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/organizations/groups/members/unassign', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/organizations/groups/members/unassign', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/organizations/groups/members/unassign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /organizations/groups/members/unassign

Unassign members from the group in your organization.

Restriction: Only accounts with organization admin role can call this endpoint.

Prerequisites: Basic Authentication using username and API Key for the account with organization admin role.

What is Basic Authentication?

Body data

{
  "emails": [
    "test-user@kobiton.com",
    "test-user1@kobiton.com"
  ],
  "groupName": "TestGroup"
}

Parameters

Parameter In Type Required Description
body body object true No description
» emails body string true The email address of the user.
» groupName body string true The name of the group.

Responses

Status Meaning Description
200 OK User has been removed members from the group successfully.

Assign members


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/organizations/groups/members/assign \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

POST https://api.kobiton.com/v1/organizations/groups/members/assign HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "emails": [
    "test-user@kobiton.com",
    "test-user2@kobiton.com"
  ],
  "groupName": "Test Group"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/organizations/groups/members/assign', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "emails": [
    "test-user@kobiton.com",
    "test-user2@kobiton.com"
  ],
  "groupName": "Test Group"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/organizations/groups/members/assign',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/organizations/groups/members/assign', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/organizations/groups/members/assign', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/organizations/groups/members/assign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /organizations/groups/members/assign

Assign members from the group in your organization.

Restriction: Only accounts with organization admin role can call this endpoint.

Prerequisites: Basic Authentication using username and API Key for the account with organization admin role.

What is Basic Authentication?

Body data

{
  "emails": [
    "test-user@kobiton.com",
    "test-user2@kobiton.com"
  ],
  "groupName": "Test Group"
}

Parameters

Parameter In Type Required Description
body body object true No description
» emails body string true The email address of the user.
» groupName body string true The name of the group.

Responses

Status Meaning Description
200 OK User has been assign members from the group successfully.

Native Framework

For XCUITest and Espresso

Initiate A Session


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/hub/session \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/hub/session HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "configuration": {
    "sessionName": "Automation test session",
    "sessionDescription": "*",
    "deviceName": "*",
    "platformVersion": "*",
    "deviceGroup": "KOBITON",
    "app": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSample.ipa",
    "testRunner": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSampleUITestRunner.ipa",
    "testFramework": "XCUITEST",
    "sessionTimeout": 30,
    "tests": "",
    "testPlan": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/sample.xctestplan"
  }
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/hub/session', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "configuration": {
    "sessionName": "Automation test session",
    "sessionDescription": "*",
    "deviceName": "*",
    "platformVersion": "*",
    "deviceGroup": "KOBITON",
    "app": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSample.ipa",
    "testRunner": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSampleUITestRunner.ipa",
    "testFramework": "XCUITEST",
    "sessionTimeout": 30,
    "tests": "",
    "testPlan": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/sample.xctestplan"
  }
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/hub/session',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/hub/session', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/hub/session', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/hub/session");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /hub/session

Note: this base URL is https://api.kobiton.com, NOT https://api.kobiton.com/v1.

Initiate a native test framework session (in XCUITest or UIAutomator)

Body data

{
  "configuration": {
    "sessionName": "Automation test session",
    "sessionDescription": "*",
    "deviceName": "*",
    "platformVersion": "*",
    "deviceGroup": "KOBITON",
    "app": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSample.ipa",
    "testRunner": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/XCUITestSampleUITestRunner.ipa",
    "testFramework": "XCUITEST",
    "sessionTimeout": 30,
    "tests": "",
    "testPlan": "https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/apps-test/sample.xctestplan"
  }
}

Parameters

Parameter In Type Required Description
body body object true No description
» configuration body object true No description
»» sessionName body string false No description
»» sessionDescription body string false No description
»» deviceName body string true No description
»» platformVersion body string false Device platform
»» deviceGroup body string false No description
»» app body string false Application downloadable URL
»» testRunner body string false Test runner downloadable URL
»» testFramework body string true Either in “UIAUTOMATOR”or “XCUITEST”
»» sessionTimeout body number false Session timeout
»» tests body string false Test array, to specify the tests running
»» testPlan body string false Test plan downloadable URL

Sample response

{
  "kobitonSessionId": 2814221,
  "message": "Session is started."
}

Responses

Status Meaning Description
200 OK Successfully create a session.
400 Bad Request Unsuccessfully create a session.

Response Schema

Status Code 200

Name Type Required Description
kobitonSessionId integer false Session ID
message string false The session has started

Test Plan - Upload URL


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/testPlan/uploadUrl \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/testPlan/uploadUrl HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "testPlanName": "TestPlan.xctestplan"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/testPlan/uploadUrl', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "testPlanName": "TestPlan.xctestplan"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/testPlan/uploadUrl',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/testPlan/uploadUrl', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/testPlan/uploadUrl', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/testPlan/uploadUrl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /testPlan/uploadUrl

Generate a pre-signed S3 upload URL for test plan.

Body data

{
  "testPlanName": "TestPlan.xctestplan"
}

Parameters

Parameter In Type Required Description
body body object true No description
» testPlanName body string true To indicate the name of test plan in .xctestplan.

Sample response

{
  "uploadUrl": "https://kobiton-us-east.s3.amazonaws.com/test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Content-Type=application%2Foctet-stream&Expires=1624937067&Signature=S3iKT3Wg3XRNVib0TsWklZciSxI%3D&x-amz-acl=private&x-amz-tagging=unsaved%3Dtrue",
  "testPlanPath": "test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan"
}

Responses

Status Meaning Description
200 OK Successfully return pre-signed upload URL.

Response Schema

Status Code 200

Name Type Required Description
uploadUrl string false The pre-signed URL to upload your test plan to AWS under Kobiton S3 bucket. This is a parameter in Upload File To S3.
testPlanPath string false The S3 object key (as a path in S3 storage) for uploaded test plan.

Test Plan - Download URL


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/testPlan/downloadUrl \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/testPlan/downloadUrl HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "testPlanPath": "test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/testPlan/downloadUrl', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "testPlanPath": "test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/testPlan/downloadUrl',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/testPlan/downloadUrl', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/testPlan/downloadUrl', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/testPlan/downloadUrl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /testPlan/downloadUrl

Generate a pre-signed S3 download URL for test plan.

Body data

{
  "testPlanPath": "test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan"
}

Parameters

Parameter In Type Required Description
body body object true No description
» testPlanPath body string true To indicate the path to test plan uploaded. This value is collected from Test Runner - Upload URL responses.

Sample response

{
  "downloadUrl": "https://kobiton-us-east.s3.amazonaws.com/test-plan/users/5174/TestPlan-ed0b5fe0-d824-11eb-81c2-47caaa9bb1dd.xctestplan?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624937069&Signature=vsja9xa02BLx8TosV5ifBZRs7XI%3D\n"
}

Responses

Status Meaning Description
200 OK Successfully return pre-signed download URL.

Response Schema

Status Code 200

Name Type Required Description
downloadUrl string false The pre-signed URL to download your test plan from Kobiton S3 bucket.

Test Runner - Upload URL


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/testRunner/uploadUrl \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/testRunner/uploadUrl HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "runnerName": "UI+Tests-Runner.ipa"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/testRunner/uploadUrl', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "runnerName": "UI+Tests-Runner.ipa"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/testRunner/uploadUrl',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/testRunner/uploadUrl', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/testRunner/uploadUrl', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/testRunner/uploadUrl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /testRunner/uploadUrl

Generate a pre-signed S3 upload URL for test runner.

Body data

{
  "runnerName": "UI+Tests-Runner.ipa"
}

Parameters

Parameter In Type Required Description
body body object true No description
» runnerName body string true To indicate the name of test runner in .apk or .ipa or .zip

Sample response

{
  "uploadUrl": "https://kobiton-us-east.s3.amazonaws.com/test-runner/users/5174/UI%2BTests-Runner-57c93a30-d854-11eb-9602-4712d694b172.ipa?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Content-Type=application%2Foctet-stream&Expires=1624957432&Signature=m8Xpmw4GekyQLQjJ0jS935JPMVc%3D&x-amz-acl=private&x-amz-tagging=unsaved%3Dtrue",
  "runnerPath": "test-runner/users/5174/UI+Tests-Runner-57c93a30-d854-11eb-9602-4712d694b172.ipa"
}

Responses

Status Meaning Description
200 OK Successfully return pre-signed upload URL.

Response Schema

Status Code 200

Name Type Required Description
uploadUrl string false The pre-signed URL to upload your test runner to AWS under Kobiton S3 bucket. This is a parameter in Upload File To S3.
runnerPath string false The S3 object key (as a path in S3 storage) for uploaded runner. This is a parameter in Test Runner - Download URL.

Test Runner - Download URL


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/testRunner/downloadUrl \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/testRunner/downloadUrl HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "runnerPath": "test-runner/users/5174/UI+Tests-Runner-aea4a9d0-d5a1-11eb-a72b-aff27e048bdf.ipa"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/testRunner/downloadUrl', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "runnerPath": "test-runner/users/5174/UI+Tests-Runner-aea4a9d0-d5a1-11eb-a72b-aff27e048bdf.ipa"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/testRunner/downloadUrl',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/testRunner/downloadUrl', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/testRunner/downloadUrl', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/testRunner/downloadUrl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /testRunner/downloadUrl

Generate a pre-signed S3 download URL for test runner.

Body data

{
  "runnerPath": "test-runner/users/5174/UI+Tests-Runner-aea4a9d0-d5a1-11eb-a72b-aff27e048bdf.ipa"
}

Parameters

Parameter In Type Required Description
body body object true No description
» runnerPath body string true To indicate the path to test runner uploaded. This value is collected from Test Runner - Upload URL responses.

Sample response

{
  "downloadUrl": "https://kobiton-us-east.s3.amazonaws.com/test-runner/users/5174/UI%2BTests-Runner-aea4a9d0-d5a1-11eb-a72b-aff27e048bdf.ipa?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624957550&Signature=pin%2BvgQcsds1JqpUip445BQQjB4%3D\n"
}

Responses

Status Meaning Description
200 OK Successfully return pre-signed download URL.

Response Schema

Status Code 200

Name Type Required Description
downloadUrl string false The pre-signed URL to download your test runner from Kobiton S3 bucket.

Organization

Assign Role For Member


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/organizations/members/role \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

PUT https://api.kobiton.com/v1/organizations/members/role HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "email": "test-user@kobiton.com",
  "role": "ADMIN"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/organizations/members/role', {
    method: 'PUT',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "email": "test-user@kobiton.com",
  "role": "ADMIN"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/organizations/members/role',
  json: true,
  method: 'PUT',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/organizations/members/role', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/organizations/members/role', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/organizations/members/role");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /organizations/members/role

Assign role for a member in organization.

Restriction: Only accounts with organization admin role can call this endpoint.

Prerequisites: Basic Authentication using username and API Key for the account with organization admin role.

What is Basic Authentication?

Body data

{
  "email": "test-user@kobiton.com",
  "role": "ADMIN"
}

Parameters

Parameter In Type Required Description
body body object true No description
» email body string true The email address of the user.
» role body string true The role of the member.

Responses

Status Meaning Description
200 OK User has been assigned a role in organization successfully.

Activate Member


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/organizations/activate/member \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

PUT https://api.kobiton.com/v1/organizations/activate/member HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "email": "test-user@kobiton.com"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/organizations/activate/member', {
    method: 'PUT',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "email": "test-user@kobiton.com"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/organizations/activate/member',
  json: true,
  method: 'PUT',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/organizations/activate/member', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/organizations/activate/member', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/organizations/activate/member");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /organizations/activate/member

Activate a member in your organization by email address.

Restrictions:

Prerequisites: Basic Authentication using username and API Key for the account with organization admin role.

What is Basic Authentication?

Body data

{
  "email": "test-user@kobiton.com"
}

Parameters

Parameter In Type Required Description
body body object true No description
» email body string false Email for the targeted user.

Responses

Status Meaning Description
200 OK User has been activated in organization successfully.

Create Member


Sample request

# This sample is used to create multiple users.
# In this sample, we will use username testuser and
# api key 123ed­123fac­9137dca to add a list of users with
# email addresses test-user@kobiton.com and test-user+2@kobiton.com
username="testuser"
api_key="123ed­123fac­9137dca"

# This is a list of user email and password to create
users=(
  'test-user@kobiton.com P4ssword!'
  'test-user2@kobiton.com P4ssword!'
)

for item in "${users[@]}"
do
  params=($item)
  curl -u $username:$api_key -i \
  -H "Accept: application/json" \
  -H "Content-Type:application/json" \
  # This sample request body only include email and password,
  # please refer to the body data sample below for full data
  -d "{\"email\": \"${params[0]}\", \"password\": \"${params[1]}\"}" \
  -X POST https://api.kobiton.com/v1/organizations/member
done

POST /organizations/member

This API allow admin create a member in your organization.

Restrictions: Admin role can call this endpoint.

Prerequisites: Basic Authentication using username and API Key of the account with admin role role.

What is Basic Authentication?

Body data

{
  "email": "test-user@kobiton.com",
  "enableSso": true,
  "password": "P4ssword!",
  "username": "user1",
  "firstName": "test",
  "lastName": "user"
}

Parameters

Parameter In Type Required Description
body body object true No description
» email body string true Email for the new user.
» enableSso body boolean false enableSso allow to enable Single Sign-On88 method. Please **read the description of this API to know how to works. (default = false)
» password body string true Password for the new user.
» username body string false Username for the new user. If left empty, username will be the same with email.
» firstName body string false The first name of the new user. If left empty, the user will have email as their first name.
» lastName body string false The last name of the new user.

Responses

Status Meaning Description
200 OK User has been created in organization successfully.

Deactivate Member


Sample request

# This sample is used to deactivate multiple users.
# In this sample, we will use username testuser and
# api key 123ed­123fac­9137dca to deactivate a list of users with
# email addresses test-user@kobiton.com and test-user+2@kobiton.com
username="testuser"
api_key="123ed­123fac­9137dca"

# This is a list of user email to deactivate
emails=(
  test-user@kobiton.com
  test-user+2@kobiton.com
)

for email in "${emails[@]}"
do
  curl -u $username:$api_key -i \
  -H "Accept: application/json" \
  -H "Content-Type:application/json" \
  -d "{\"email\": \"${email}\"}" \
  -X PUT https://api.kobiton.com/v1/organizations/deactivate/member
done

PUT /organizations/deactivate/member

Deactivate a member in your organization by email address.

Restrictions:

Prerequisites: Basic Authentication using username and API Key for the account with organization admin role.

What is Basic Authentication?

Body data

{
  "email": "test-user@kobiton.com"
}

Parameters

Parameter In Type Required Description
body body object true No description
» email body string true Email for the targeted user.

Responses

Status Meaning Description
200 OK User has been deactivated in organization successfully.

Remediation Request

Get All Remediation Requests


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}?sessionId=0 \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}?sessionId=0 HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}?sessionId=0',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}', params: {
  'sessionId' => 'integer'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}', params={
  'sessionId': 0
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}?sessionId=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}

Get all remediation requests from a specific manual session.

Note: The manual session ID requested must be owned/authorized by user.

Parameters

Parameter In Type Required Description
sessionId query integer true Manual Session ID.
type query string false The remediation request type. Must be one of BLOCKER, CRASH_DETECTION, TEXT_ASSERTION, TEXT_COLOR_ASSERTION, VISUAL_ASSERTION, FONT_SIZE_VISUAL_ASSERTION, NETWORK_PAYLOAD_RESPONSE_TIME
isResolved query boolean false Filtering only resolved/unresolved remediation requests. Will get all if it isn’t provided.

Sample response

[
  {
    "remediationRequestId": 1,
    "remediationRequestType": "BLOCKER",
    "submitUrl": "https://portal.kobiton.com/remediation-requests/1/submit",
    "deviceCapabilities": {
      "modelName": "Nexus 6",
      "deviceName": "Nexus 6",
      "resolution": {
        "scale": 0,
        "width": 1440,
        "height": 2560,
        "logical": {
          "width": 1440,
          "height": 2560
        }
      },
      "platformName": "ANDROID",
      "screenDensity": 612,
      "platformVersion": "7.1.1"
    },
    "automatedExecutionSessionId": 1,
    "isResolved": true,
    "resolvedBy": {
      "id": 1,
      "username": "kobiton",
      "email": "example@kobiton.com"
    },
    "resolvedAt": "2020-11-19T04:39:14.156Z"
  }
]

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
anonymous [object] false The remediation request object schema
» remediationRequestId integer false The remediation request id.
» remediationRequestType string false The type of remediation request.
» submitUrl string false Link to submit the remediation request on portal.
» deviceCapabilities object false Device configuration within remediation request.
» automatedExecutionSessionId string false The automation execution session id.
» isResolved boolean false Check if remediation request is resolved.
» resolvedBy object false The user who resolved that remediation request.
» resolvedAt string false The timestamp remediation request resolved at.

Reservations

Create A Reservation


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/reservations \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/reservations HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "udids": [
    "8efd22fa",
    "e3b18a17",
    "e3b18a17",
    "601e61ce"
  ],
  "duration": 600
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "udids": [
    "8efd22fa",
    "e3b18a17",
    "e3b18a17",
    "601e61ce"
  ],
  "duration": 600
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/reservations', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/reservations', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /reservations

Create a reservation in your organization.

Body data

{
  "udids": [
    "8efd22fa",
    "e3b18a17",
    "e3b18a17",
    "601e61ce"
  ],
  "duration": 600
}

Parameters

Parameter In Type Required Description
body body object true No description
» duration body integer true The length of time that system reserves the device for the user. It is displayed as seconds.
» udids body [string] false The identifier of the device is specified as UDID and a comma-separated list of the udid.

Sample response

{
  "reservationId": 1,
  "duration": 600,
  "fail": [
    "8efd22fa",
    "e3b18a17"
  ],
  "success": [
    "e3b18a17",
    "601e61ce"
  ]
}

Responses

Status Meaning Description
200 OK Create a reservation successfully.

Response Schema

Status Code 200

Name Type Required Description
reservationId integer false The identifier of the reservation.
duration integer false The length of time that the user needs to reserve devices.
fail [string] false The list of udids is not reserved in this request.
success [string] false The list of udids is reserved in this request.

Get The List Of Reservations


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/reservations \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/reservations HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "startTime": "2020-10-13 11:32:39.825+07",
  "endTime": "2020-10-26 13:30:35.835+07"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations', {
    method: 'GET',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "startTime": "2020-10-13 11:32:39.825+07",
  "endTime": "2020-10-26 13:30:35.835+07"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations',
  json: true,
  method: 'GET',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/reservations', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/reservations', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /reservations

Get the list of reservations.

Body data

{
  "startTime": "2020-10-13 11:32:39.825+07",
  "endTime": "2020-10-26 13:30:35.835+07"
}

Parameters

Parameter In Type Required Description
body body object true No description
» startTime body datetime true The start time of the reservation.
» endTime body datetime true The end time of the reservation.

Sample response

{
  "id": 1,
  "status": "CANCELLED",
  "creator": "kobiton@gmail.com",
  "udids": [
    "8efd22fa",
    "e3b18a17"
  ]
}

Responses

Status Meaning Description
200 OK Get the list of reservations successfully.

Response Schema

Status Code 200

Name Type Required Description
id integer false The list of reservation IDs is created by the user.
status string false Return with a specified status. Can be one of reserved, expired, or cancelled.
creator string false The user has created this reservation.
udids [string] false The identifier of the device is specified as UDID and a comma-separated list of the udid.

Terminate Multiple Reservations


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/reservations/terminate \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

POST https://api.kobiton.com/v1/reservations/terminate HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "reservationIds": [
    1,
    3,
    7
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations/terminate', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "reservationIds": [
    1,
    3,
    7
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations/terminate',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/reservations/terminate', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/reservations/terminate', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations/terminate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /reservations/terminate

Terminate multiple reservations in your organization.

Body data

{
  "reservationIds": [
    1,
    3,
    7
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» reservationIds body [string] false The identifier of the reservation. Each reservation is separated by commas.

Responses

Status Meaning Description
200 OK Terminate multiple reservations successfully.

Get Status For A Reservation


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/reservations/:reservationId/status?reservationId=0 \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/reservations/:reservationId/status?reservationId=0 HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations/:reservationId/status', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations/:reservationId/status?reservationId=0',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/reservations/:reservationId/status', params: {
  'reservationId' => 'integer'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/reservations/:reservationId/status', params={
  'reservationId': 0
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations/:reservationId/status?reservationId=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /reservations/:reservationId/status

Get status for a reservation in your organization. The reservation status comprises: Reserved, Cancelled, and Expired.

Parameters

Parameter In Type Required Description
reservationId query integer true The identifier of the reservation.

Sample response

{
  "status": "CANCELLED"
}

Responses

Status Meaning Description
200 OK Get status for a reservation successfully.

Response Schema

Status Code 200

Name Type Required Description
status string false Return with a specified status. Can be one of reserved, expired, or cancelled.

Terminate All Activate Reservations


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/reservations/terminate/all \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

GET https://api.kobiton.com/v1/reservations/terminate/all HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations/terminate/all', {
    method: 'GET'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/reservations/terminate/all',
  json: true,
  method: 'GET'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.get 'https://api.kobiton.com/v1/reservations/terminate/all', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.get('https://api.kobiton.com/v1/reservations/terminate/all', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations/terminate/all");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /reservations/terminate/all

Terminate all ACTIVATE reservations in your organization.

Responses

Status Meaning Description
200 OK Terminate all activate reservations successfully.

Get Available Devices


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/reservations/available-devices \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/reservations/available-devices HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations/available-devices', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations/available-devices',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/reservations/available-devices', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/reservations/available-devices', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations/available-devices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /reservations/available-devices

Get the list of available private devices depending on the user’s roles

Parameters

Parameter In Type Required Description
deviceName query string false The name of the devices.
manufacture query string false The manufacture of the devices.
platformVersion query string false TThe platform version of the devices.
platformName query string false The platform name of the devices.

Sample response

{
  "deviceName": [
    "string"
  ]
}

Responses

Status Meaning Description
200 OK Get the list of available devices successfully.

Response Schema

Status Code 200

Name Type Required Description
deviceName [string] false No description
» udid string false The identifier of the device is specified as UDID.

Get device’s booking history


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/reservations/history?teamId=0&startTime=null&endTime=null \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/reservations/history?teamId=0&startTime=null&endTime=null HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/reservations/history', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/reservations/history?teamId=0&startTime=null&endTime=null',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/reservations/history', params: {
  'teamId' => 'integer',
'startTime' => 'datetime',
'endTime' => 'datetime'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/reservations/history', params={
  'teamId': 0,  'startTime': null,  'endTime': null
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/reservations/history?teamId=0&startTime=null&endTime=null");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /reservations/history

Retrieves all the soft bookings for a device or team, along with details about the soft booking

Parameters

Parameter In Type Required Description
deviceUdid query string false The identifier of the device is specified as UDID(looking up based on UDID, the UDID for the device)
teamId query integer true The identifier of the team
startTime query datetime true The start date to filter result (‘YYYY-MM-DD’ format)
endTime query datetime true The end date to filter result (‘YYYY-MM-DD’ format)

Sample response

[
  {
    "id": 1,
    "userId": 2,
    "manufacturer": "Apple",
    "releaseDate": "2021-05-24T16:10:49.113Z",
    "bookedDateTime": "2021-05-24T11:10:49.113Z",
    "bookingDuration": 300,
    "lastSessionEndDateTime": "2021-05-24T11:25:49.812Z",
    "deviceUdid": "5333f963"
  }
]

Responses

Status Meaning Description
200 OK Get the list of device’s booking history successfully

Response Schema

Status Code 200

Name Type Required Description
anonymous [Reservation] false The list of device’s booking history

Test Run

Create a new test run


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/revisitPlans/create \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/revisitPlans/create HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "referenceTestRunId": 22,
  "name": "Test run for testing feature A",
  "description": "This test run was created by X for testing new feature"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/revisitPlans/create', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "referenceTestRunId": 22,
  "name": "Test run for testing feature A",
  "description": "This test run was created by X for testing new feature"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/revisitPlans/create',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/revisitPlans/create', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/revisitPlans/create', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/revisitPlans/create");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /revisitPlans/create

Create a new test run. If a reference test run is defined, we will take that test run as the baseline to compare visual assertions

Body data

{
  "referenceTestRunId": 22,
  "name": "Test run for testing feature A",
  "description": "This test run was created by X for testing new feature"
}

Parameters

Parameter In Type Required Description
body body object true No description
» referenceTestRunId body integer false The reference test run id that will be uses as the baseline for the visual assertion scanning
» name body string false The name of your test run that will be show on Test Execution Plan Page
» description body string false The description of your test run

Sample response

{
  "testRunId": 23,
  "testRunDetailLink": "https://portal.kobiton.com/plans/23/executions"
}

Responses

Status Meaning Description
200 OK Create a new test run successfully

Response Schema

Status Code 200

Name Type Required Description
testRunId integer false The test run id
testRunDetailLink string false The link to view all automation sessions in the test run.

Stop a test run


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

PUT https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete', {
    method: 'PUT',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete',
  json: true,
  method: 'PUT',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/revisitPlans/{testRunId}/complete");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /revisitPlans/{testRunId}/complete

Stop the test run

Note: We will not allow users to start any scripts within this test run after it is stopped

Parameters

Parameter In Type Required Description
testRunId path integer true The test run id

Sample response

{
  "testRunDetailLink": "https://portal.kobiton.com/plans/23/executions"
}

Responses

Status Meaning Description
200 OK Stop a test run successfully

Response Schema

Status Code 200

Name Type Required Description
testRunDetailLink string false The link to view all automation sessions in the test run.

Kobiton Scriptless Automation

(Deprecated) Run Scriptless Automation


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/revisitPlans/run \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/revisitPlans/run HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "exploringSessionId": 100,
  "deviceSelections": [
    {
      "dataSetId": 99,
      "deviceCapabilities": [
        {
          "deviceName": "Galaxy S8",
          "platformVersion": "*"
        },
        {
          "deviceName": "*S9*",
          "platformVersion": "10.0.0"
        }
      ]
    },
    {
      "dataSetId": 100,
      "deviceCapabilities": {
        "deviceName": "Nokia*",
        "platformVersion": "11.0.0"
      }
    }
  ],
  "appPath": "kobiton-store:v100",
  "deviceBundleId": 0,
  "runAllDevicesInBundle": true
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/revisitPlans/run', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "exploringSessionId": 100,
  "deviceSelections": [
    {
      "dataSetId": 99,
      "deviceCapabilities": [
        {
          "deviceName": "Galaxy S8",
          "platformVersion": "*"
        },
        {
          "deviceName": "*S9*",
          "platformVersion": "10.0.0"
        }
      ]
    },
    {
      "dataSetId": 100,
      "deviceCapabilities": {
        "deviceName": "Nokia*",
        "platformVersion": "11.0.0"
      }
    }
  ],
  "appPath": "kobiton-store:v100",
  "deviceBundleId": 0,
  "runAllDevicesInBundle": true
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/revisitPlans/run',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/revisitPlans/run', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/revisitPlans/run', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/revisitPlans/run");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /revisitPlans/run

(Deprecated, please use the Start Scriptless Automation API instead.)

Run Scriptless Automation on multiple devices and data-sets.

Note: Either deviceCapabilities or deviceBundleId are required!

Body data

{
  "exploringSessionId": 100,
  "deviceSelections": [
    {
      "dataSetId": 99,
      "deviceCapabilities": [
        {
          "deviceName": "Galaxy S8",
          "platformVersion": "*"
        },
        {
          "deviceName": "*S9*",
          "platformVersion": "10.0.0"
        }
      ]
    },
    {
      "dataSetId": 100,
      "deviceCapabilities": {
        "deviceName": "Nokia*",
        "platformVersion": "11.0.0"
      }
    }
  ],
  "appPath": "kobiton-store:v100",
  "deviceBundleId": 0,
  "runAllDevicesInBundle": true
}

Parameters

Parameter In Type Required Description
body body object true No description
» exploringSessionId body integer true The manual session ID used to trigger your Scriptless Automation.
» deviceSelections body object true An array of device conditions. For each device selection, specifying device capabilities (required) and a data set assigned to the device (optional). The device searching process will be executed in the array order. Specifically, if a device A is found from the first device selection query, the second query must select another one although the device A is also found in this query.
»» deviceCapabilities body object false An array of device capabilities for seaching the exact device configuration. Accept object type if only one device capability is specified.
»»» deviceName body string false The query device’s name. Accept * (any), prefix (*Galaxy), infix (*Galaxy*), suffix (Galaxy*) and exact device names.
»»» platformVersion body string false The query device’s platform version. Accept * (any) and exact platform versions.
»» dataSetId body integer false The ID of the desired data-set to be assigned to the relative device.
» appPath body string false Specify kobiton app path/app version path. If not specified, Scriptless Automation will run on same app version of manual session app’s.
» deviceBundleId body integer false Specify the bundle from which devices are searched. If not specified, devices will be searched in whole Kobiton device store.
» runAllDevicesInBundle body boolean false When it equals true, we will make sure that all devices in the device bundle are selected. deviceBundleId is required when it’s true.

Sample response

{
  "deviceCapabilities": [
    {
      "dataSetId": 99,
      "deviceName": "Galaxy S9",
      "platformVersion": "10.0.0"
    },
    {
      "dataSetId": 100,
      "deviceName": "Nokia 5.3",
      "platformVersion": "11.0.0"
    }
  ],
  "executionLink": "https://portal.kobiton.com/sessions/100/plan/executions"
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
executionLink string false The revisit execution link for following the trigger Scriptless Automation
deviceCapabilities [object] false List of searched devices used for running Scriptless Automation

(Deprecated) Re-run Scriptless Sessions


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/revisitPlans/rerun \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/revisitPlans/rerun HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "exploringSessionId": 100,
  "appPath": "kobiton-store:1",
  "dataSets": [
    {
      "id": 12,
      "deviceName": "Pixel 5",
      "platformName": "ANDROID",
      "platformVersion": "11.0.0"
    },
    {
      "id": 13,
      "deviceName": "Galaxy S10",
      "platformName": "ANDROID",
      "platformVersion": "10.0.0"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/revisitPlans/rerun', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "exploringSessionId": 100,
  "appPath": "kobiton-store:1",
  "dataSets": [
    {
      "id": 12,
      "deviceName": "Pixel 5",
      "platformName": "ANDROID",
      "platformVersion": "11.0.0"
    },
    {
      "id": 13,
      "deviceName": "Galaxy S10",
      "platformName": "ANDROID",
      "platformVersion": "10.0.0"
    }
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/revisitPlans/rerun',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/revisitPlans/rerun', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/revisitPlans/rerun', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/revisitPlans/rerun");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /revisitPlans/rerun

(Deprecated, please use the Start Scriptless Automation API instead.)

Re-run Scriptless Automation Sessions.

Body data

{
  "exploringSessionId": 100,
  "appPath": "kobiton-store:1",
  "dataSets": [
    {
      "id": 12,
      "deviceName": "Pixel 5",
      "platformName": "ANDROID",
      "platformVersion": "11.0.0"
    },
    {
      "id": 13,
      "deviceName": "Galaxy S10",
      "platformName": "ANDROID",
      "platformVersion": "10.0.0"
    }
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» exploringSessionId body integer true The manual session ID used to trigger your Scriptless Automation
» appPath body srting false The Kobiton app path of the target app to rerun sessions.
» dataSets body object false No description
»» id body integer false The data set ID to run Scriptless Automation with.
»» deviceName body string false The device name that will be assigned to data set.
»» platformName body string false The OS of the assigned device.
»» platformVersion body string false The platform version of the assigned device.

Sample response

{
  "executionLink": "https://portal.kobiton.com/sessions/100/plan/executions",
  "assignedDataSets": [
    {
      "id": 12,
      "deviceName": "Pixel 5",
      "platformVersion": "11.0.0",
      "platformName": "ANDROID"
    }
  ],
  "ignoredDataSets": [
    {
      "id": 13,
      "deviceName": "Galaxy S10",
      "platformVersion": "10.0.0",
      "platformName": "ANDROID"
    }
  ]
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
executionLink string false The revisit execution link for following the trigger Scriptless Automation
assignedDataSets [object] false List of data sets that are assigned in the rerun.
ignoredDataSets [object] false List of data sets that are excluded in the rerun.

Start Scriptless Automation


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/revisitPlans/start \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/revisitPlans/start HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "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
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/revisitPlans/start', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "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
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/revisitPlans/start',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/revisitPlans/start', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/revisitPlans/start', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/revisitPlans/start");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /revisitPlans/start

Start Scriptless Automation on multiple devices and data-sets.

Note 1: Required exploringSessionIds. Either deviceSelections or deviceBundleId are required, too!

Note 2: You can specify deviceBundleId = null when trigger starting scriptless automation with Sauce Labs devices

Body data

{
  "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
}

Parameters

Parameter In Type Required Description
body body object true No description
» appPath body string false Specify kobiton app path/app version path. If not specified, Scriptless Automation will run on same app version of manual session app’s.
» runAllDevicesInBundle body boolean false When it equals true, we will make sure that all devices in the device bundle are selected. deviceBundleId is required when it’s true.
» exploringSessionIds body [integer] false Specify the list of session IDs used to trigger your Scriptless Automation. You can provide maximum 10 session IDs at once. If two or more sessionIds provided, they must be the same session platform (Android/iOS) with each others.
» deviceSelections body [object] false An array of device conditions. For each device selection, specifying device capabilities (required) and a data set assigned to the device (optional). The device searching process will be executed in the array order. Specifically, if a device A is found from the first device selection query, the second query must select another one although the device A is also found in this query.
»» dataSetId body integer false The ID of the desired data-set to be assigned to the relative device.
»» deviceCapabilities body [object] false An array of device capabilities for searching the exact device configuration. Accept object type if only one device capability is specified.
»»» deviceName body string false The query device’s name. Accept * (any), prefix (*Galaxy), infix (*Galaxy*), suffix (Galaxy*) and exact device names.
»»» platformVersion body string false The query device’s platform version. Accept * (any) and exact platform versions.
»»» deviceSource body string true The Source that providing the picked device. Either KOBITON or SAUCE_LABS
» deviceBundleId body [integer] false Specify the list of device bundle IDs used to run your Scriptless Automation. You can provide maximum 6 device bundle IDs at once. If not be specified, deviceCapabilities is required to define the preferable devices.

Sample response

[
  {
    "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"
  }
]

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
anonymous [object] false The start Scriptless Automation response schema
» exploringSessionId number false Manual Session ID used for running Scriptless Automation
» executionLink string false The revisit execution link for following the trigger Scriptless Automation
» deviceCapabilities [object] false List of searched devices used for running Scriptless Automation

Sessions

Kobiton supports 2 testing types: Manual and Automation. Testers can access the sessions to see the test steps, device logs, device metadata and session video.

Get Sessions


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions

Retrieve all sessions belong to the current organization or user.

Parameters

Parameter In Type Required Description
groupId query integer false The group where user belongs to.
state query string false The session status.
type query string false The session testing type.
platform query string false The platform of device used in session.
userId query integer false The user whom sessions belong to.
keyword query string false The keyword to search in session, version and device name.
page query integer false The page number, start from 1.
startDate query integer false The timestamp of start date.
endDate query integer false The timestamp of end date.

Sample response

{
  "members": [
    {
      "id": 114,
      "username": "Test User",
      "avatarUrl": "https://kobiton-us.s3.amazonaws.com/users/114/avatars/1492438501898.jpg"
    }
  ],
  "currentPage": 1,
  "totalPages": 1767,
  "data": [
    {
      "id": 3894,
      "userId": 114,
      "endedAt": "2017-04-17T16:02:59.952Z",
      "state": "COMPLETE",
      "type": "AUTO",
      "name": "Automation test session",
      "description": "Test user case #101",
      "createdAt": "2017-04-17T16:02:55.182Z",
      "updatedAt": "2017-04-17T16:03:51.132Z",
      "username": "Test User",
      "avatarUrl": "https://kobiton-staging.s3.amazonaws.com/users/114/avatars/1492438501898.jpg",
      "deviceBooked": false,
      "deviceOnline": false,
      "deviceImageUrl": "https://s3.amazonaws.com/kobiton/devices/256/samsung-galaxy-s6.png",
      "executionData": {
        "log": {
          "previewPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
          "downloadPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
          "appiumPreviewPath": "sessions/71610/logs/appium-7435e650-6a8a-11e7-aef2-2f8386028e6a.log",
          "uiAutomatorPreviewPath": "sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log",
          "xcuiTestPreviewPath": "sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log"
        },
        "video": {
          "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
          "size": 534524,
          "error": null,
          "sessionVideoCapturingDisabled": false
        },
        "actual": {
          "sdk": 23,
          "udid": "818972fe78cd87198",
          "isIos": false,
          "state": "device",
          "codeName": "zeroflteskt",
          "brandName": "samsung",
          "modelName": "SM-G920S",
          "deviceName": "Galaxy S6",
          "isEmulator": false,
          "orientation": 0,
          "platformName": "Android",
          "serialNumber": "06157df64310c502",
          "cpuArchitecture": "arm64-v8a",
          "platformVersion": "6.0.1",
          "resolution": {
            "width": 1440,
            "height": 2560
          },
          "installedBrowsers": [
            {
              "name": "chrome",
              "enabled": true,
              "version": "57.0.2987.132"
            }
          ]
        },
        "desired": {
          "modelName": "SM-G920S",
          "deviceName": "Galaxy S6",
          "platformName": "Android",
          "sessionName": "Test login page"
        },
        "versions": {
          "nodeVersion": "v7.4.0",
          "appiumVersion": "1.7.1"
        },
        "networkLogs": [
          {
            "endTime": "2017-12-09T16:47:45.943Z",
            "startTime": "2017-12-09T16:53:45.943Z",
            "fileName": "Har_202307_0",
            "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
            "size": 25432
          }
        ],
        "wdSessionId": "99f6ad1b-3f64-4544-b113-a6db9771a2f6",
        "allCommandIds": [
          56985,
          56986,
          56988,
          56989,
          56992,
          56993,
          56994,
          56995
        ],
        "sessionVideoCapturingDisabled": false,
        "commandScreenshotCapturingDisabled": false
      }
    }
  ]
}

Responses

Status Meaning Description
200 OK List of sessions.

Response Schema

Status Code 200

Name Type Required Description
currentPage integer false No description
totalPages integer false No description
members [Unknown] false No description
» id integer false No description
» username string false No description
» avatarUrl string false No description
data [Session] false No description

Get crash status of multiple sessions


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/crash-status?sessionId=0 \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/crash-status?sessionId=0 HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/crash-status', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/crash-status?sessionId=0',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/crash-status', params: {
  'sessionId' => 'integer'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/crash-status', params={
  'sessionId': 0
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/crash-status?sessionId=0");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/crash-status

Receive the list of session IDs and return the crash status of each session.

Parameters

Parameter In Type Required Description
sessionId query integer true Session ID

Sample response

{
  "data": [
    {
      "id": 345,
      "createdAt": "2021-01-12T06:07:42.139Z",
      "crashOccurred": true,
      "sessionURL": "https://portal.kobiton.com/sessions/345"
    }
  ]
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
undefined object false The crash status of the input sessions

Get a Session


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/{sessionId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/{sessionId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/{sessionId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/{sessionId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/{sessionId}

Retrieve a session info belonging to the current user or organization. It depends on session type (Auto or Manual) that some properties maybe unavailable. Note: Absolute urls in response body like ‘screenshotDownloadUrl’, ‘previewUrl’, etc. expire in 2 hours since the response is made.

Parameters

Parameter In Type Required Description
sessionId path integer true Session Id

Sample response

{
  "id": 3894,
  "userId": 114,
  "deviceId": 153,
  "executionData": {
    "log": {
      "previewPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "downloadPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "appiumPreviewPath": "sessions/71610/logs/appium-7435e650-6a8a-11e7-aef2-2f8386028e6a.log",
      "uiAutomatorPreviewPath": "sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log",
      "xcuiTestPreviewPath": "sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log"
    },
    "video": {
      "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
      "size": 534524,
      "error": null,
      "sessionVideoCapturingDisabled": false
    },
    "actual": {
      "sdk": 23,
      "udid": "818972fe78cd87198",
      "isIos": false,
      "state": "device",
      "codeName": "zeroflteskt",
      "brandName": "samsung",
      "modelName": "SM-G920S",
      "deviceName": "Galaxy S6",
      "isEmulator": false,
      "orientation": 0,
      "platformName": "Android",
      "serialNumber": "06157df64310c502",
      "cpuArchitecture": "arm64-v8a",
      "platformVersion": "6.0.1",
      "resolution": {
        "width": 1440,
        "height": 2560
      },
      "installedBrowsers": [
        {
          "name": "chrome",
          "enabled": true,
          "version": "57.0.2987.132"
        }
      ]
    },
    "desired": {
      "modelName": "SM-G920S",
      "deviceName": "Galaxy S6",
      "platformName": "Android",
      "sessionName": "Test login page"
    },
    "versions": {
      "nodeVersion": "v7.4.0",
      "appiumVersion": "1.7.1"
    },
    "networkLogs": [
      {
        "endTime": "2017-12-09T16:47:45.943Z",
        "startTime": "2017-12-09T16:53:45.943Z",
        "fileName": "Har_202307_0",
        "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
        "size": 25432
      }
    ],
    "wdSessionId": "99f6ad1b-3f64-4544-b113-a6db9771a2f6",
    "allCommandIds": [
      56985,
      56986,
      56988,
      56989,
      56992,
      56993,
      56994,
      56995
    ],
    "sessionVideoCapturingDisabled": false,
    "commandScreenshotCapturingDisabled": false
  },
  "endedAt": "2017-04-17T16:02:59.952Z",
  "state": "COMPLETE",
  "type": "AUTO",
  "name": "Automation test session",
  "description": "Test user case #101",
  "createdAt": "2017-04-17T16:02:55.182Z",
  "updatedAt": "2017-04-17T16:03:51.132Z",
  "deviceBooked": false,
  "deviceOnline": true,
  "isCloud": true,
  "username": "Test User",
  "avatarUrl": "https://kobiton-us.s3.amazonaws.com/users/114/avatars/1492438501898.jpg",
  "deviceImageUrl": "https://s3.amazonaws.com/kobiton/devices/256/samsung-galaxy-s6.png",
  "log": {
    "previewUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/device-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "downloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/device-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "appiumPreviewUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/appium-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "previewSize": 5868641,
    "appiumPreviewSize": 5868641,
    "uiAutomatorPreviewUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624953705&Signature=flOKJ9hDWOessxVt%2BE12oxaLXWM%3D&response-cache-control=max-age%3D86400",
    "uiAutomatorPreviewSize": 22681,
    "xcuiTestPreviewUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624953708&Signature=nEUpuS%2Bo1BAJJFqNbUugYHUy0W4%3D&response-cache-control=max-age%3D86400",
    "xcuiTestPreviewSize": 1799
  },
  "testReportUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2467826/test-report-5ef57f90-97ee-11eb-874e-3952bbc9ba8d.zip?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624892492&Signature=0TMtYKa%2FNb99bXj5rfrBYeQREUk%3D&response-cache-control=max-age%3D86400",
  "video": {
    "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "size": 534524,
    "error": null,
    "sessionVideoCapturingDisabled": false
  },
  "networkLogs": [
    {
      "endTime": "2017-12-09T16:47:45.943Z",
      "startTime": "2017-12-09T16:53:45.943Z",
      "fileName": "Har_202307_0",
      "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
      "size": 25432
    }
  ]
}

Responses

Status Meaning Description
200 OK Session info including video, logs, etc. SessionDetail Schema

Delete Session


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/sessions/{sessionId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

DELETE https://api.kobiton.com/v1/sessions/{sessionId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}', {
    method: 'DELETE'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}',
  json: true,
  method: 'DELETE'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.delete 'https://api.kobiton.com/v1/sessions/{sessionId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.delete('https://api.kobiton.com/v1/sessions/{sessionId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /sessions/{sessionId}

Delete a session.

Parameters

Parameter In Type Required Description
sessionId path integer true Session Id

Responses

Status Meaning Description
200 OK Deleted the session successfully.

Update Session Information


Sample request

# You can also use wget
curl -X PUT https://api.kobiton.com/v1/sessions/{sessionId} \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

PUT https://api.kobiton.com/v1/sessions/{sessionId} HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "name": "Test Case 101",
  "description": "A new test to cover test case",
  "state": "PASSED | FAILED | COMPLETE"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}', {
    method: 'PUT',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "name": "Test Case 101",
  "description": "A new test to cover test case",
  "state": "PASSED | FAILED | COMPLETE"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}',
  json: true,
  method: 'PUT',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.put 'https://api.kobiton.com/v1/sessions/{sessionId}', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.put('https://api.kobiton.com/v1/sessions/{sessionId}', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT /sessions/{sessionId}

Update a session’s information.

Body data

{
  "name": "Test Case 101",
  "description": "A new test to cover test case",
  "state": "PASSED | FAILED | COMPLETE"
}

Parameters

Parameter In Type Required Description
sessionId path integer true Session Id
body body object true
» name body string false No description
» description body string false No description
» state body string false No description

Enumerated Values

Parameter Value
» state PASSED
» state FAILED
» state COMPLETE
body

Supported session states:

Responses

Status Meaning Description
200 OK Updated session information successfully.

Get Metrics Info


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}/getMetricInfo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/{sessionId}/getMetricInfo

To retrieve device metrics during a session.

Parameters

Parameter In Type Required Description
sessionId path integer true Session ID

Sample response

[
  {
    "timestamp": 1617833532493,
    "cpu": 100,
    "memory": 83.79,
    "wifi": {
      "rxBytes": 449039360,
      "txBytes": 31016960
    }
  }
]

Responses

Status Meaning Description
200 OK Device metrics includes CPU, Memory, Wifi

Response Schema

Status Code 200

Name Type Required Description
anonymous [Metric] false No description

Get Session Commands


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/{sessionId}/commands \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/{sessionId}/commands HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}/commands', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}/commands',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/{sessionId}/commands', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/{sessionId}/commands', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}/commands");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/{sessionId}/commands

Retrieves commands of a session belonging to the current user or organization.

Parameters

Parameter In Type Required Description
page query integer false The page number of commands, start from 1. Each page contains 20 commands.
sessionId path integer true Session Id

Sample response

{
  "currentPage": 1,
  "totalPages": 3,
  "data": [
    {
      "id": 12032,
      "sessionId": 12032,
      "data": {
        "url": "/wd/hub/session/99b6ad1c-3664-4544-b113-a6db9771a2f6/url",
        "method": "POST",
        "statusCode": 200,
        "requestBody": {
          "url": "https://kobiton.com/blog/"
        },
        "responseBody": {
          "value": "",
          "status": 0,
          "sessionId": "99b6ad1c-3664-4544-b113-a6db9771a2f6"
        },
        "value": "HOME",
        "action": "PRESS_BUTTON"
      },
      "screenshot": "sessions/160570/screenshots/12034174.jpg",
      "screenshotDownloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/160570/screenshots/12034174.jpg?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
      "viewtreeDownloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/160570/commands/12034174/pre-viewtree.json?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
      "endedAt": "2017-04-17T16:02:59.952Z",
      "createdAt": "2017-04-17T16:02:59.952Z"
    }
  ]
}

Responses

Status Meaning Description
200 OK List of sessions.

Response Schema

Status Code 200

Name Type Required Description
currentPage integer false No description
totalPages integer false No description
data [SessionCommandData] false No description

Terminate a Session


Sample request

# You can also use wget
curl -X DELETE https://api.kobiton.com/v1/sessions/{sessionId}/terminate \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

DELETE https://api.kobiton.com/v1/sessions/{sessionId}/terminate HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}/terminate', {
    method: 'DELETE'

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}/terminate',
  json: true,
  method: 'DELETE'

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}

result = RestClient.delete 'https://api.kobiton.com/v1/sessions/{sessionId}/terminate', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.delete('https://api.kobiton.com/v1/sessions/{sessionId}/terminate', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}/terminate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /sessions/{sessionId}/terminate

Terminate a session.

Parameters

Parameter In Type Required Description
sessionId path integer true Session Id

Responses

Status Meaning Description
200 OK Terminate the session successfully.

Get Data-Driven Supported Commands


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands?commandTypes=string \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands?commandTypes=string HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands?commandTypes=string',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands', params: {
  'commandTypes' => 'string'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands', params={
  'commandTypes': 'string'
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}/data-driven/supported-commands?commandTypes=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/{sessionId}/data-driven/supported-commands

Get Data-Driven supported commands by session ID.

Parameters

Parameter In Type Required Description
sessionId path integer true Session Id
commandTypes query string true Requested command types. Accepted values are TYPE_KEYBOARD and CLIPBOARD

Sample response

{
  "sessionId": "1533",
  "commands": [
    {
      "id": 27235,
      "data": {
        "value": "foo",
        "action": "TYPE_KEYBOARD",
        "isKeyboardShown": true
      },
      "createdAt": "2020-12-10T19:24:19.654Z"
    },
    {
      "id": 27236,
      "data": {
        "value": "bar",
        "action": "CLIPBOARD",
        "isKeyboardShown": true
      },
      "createdAt": "2020-12-10T19:24:23.440Z"
    }
  ]
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
anonymous [Unknown] false Get commands successfully.

Get metric URL stream


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/sessions/{sessionId}/getDeviceMetricsUrlStream");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /sessions/{sessionId}/getDeviceMetricsUrlStream

Get an URL for streaming device metrics on a running session and general session info: startTime, sessionName, deviceName, platformName, platformVersion.

Below are steps that the URL is used afterward:

  1. Client to open a WebSocket connection with the URL.
  2. If the URL is valid, client receives the first message as {code: 200}. Otherwise, an error message will be returned.
  3. Then, at interval time which is given on above request, the message for metric is sent as {cpu: 3.89, memory: 45.19, wifi: {receivedBytes: 46, transmittedBytes: 42}, at: 1532504293288}. The at field is the Epoch time when the metric is captured.
  4. When the session ends, the message {state: 'END'} is sent and then the WebSocket connection will be closed by Kobiton server.

Parameters

Parameter In Type Required Description
sessionId path integer true Session ID
interval query integer false The interval time to receive data which is the multiples of 5 seconds, the minimum is 5 seconds, the maximum is 60 seconds, and the default is 10 seconds.

Sample response

{
  "url": "wss://hub.kobiton.com/ws?type=METRIC&token=eyJhbG",
  "startTime": 1506099600000,
  "sessionName": "Test web on Galaxy S6",
  "deviceName": "Galaxy S6",
  "platformName": "ANDROID",
  "platformVersion": "6.0.0"
}

Responses

Status Meaning Description
200 OK OK

Response Schema

Status Code 200

Name Type Required Description
url string false URL for streaming device metrics on a running session.
startTime integer false The Epoch time when the session begins.
sessionName string false The session name.
deviceName string false The device name.
platformName string false The platform name of the device.
platformVersion string false the platform version of the device.

Tags

Create a tag


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/tags \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json'

POST https://api.kobiton.com/v1/tags HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "tagName": "tagName1"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "tagName": "tagName1"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/tags', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/tags', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /tags

Create a tag in your organization.

Body data

{
  "tagName": "tagName1"
}

Parameters

Parameter In Type Required Description
body body object true No description
» tagName body string true The name of the tag.

Responses

Status Meaning Description
200 OK You have created the tag successfully.

Get a list of the tags


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/tags \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/tags HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/tags', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/tags', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /tags

Get a list of the tag in the organization.

Sample response

{
  "tagList": [
    "tagName1",
    "tagName2",
    "tagName3"
  ]
}

Responses

Status Meaning Description
200 OK You have received a list of the tag successfully.

Response Schema

Status Code 200

Name Type Required Description
tagList [string] false The list of the tag.

Assign tag to devices


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/tags/assign \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/tags/assign HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10",
    "udid11",
    "udid12"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags/assign', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10",
    "udid11",
    "udid12"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags/assign',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/tags/assign', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/tags/assign', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags/assign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /tags/assign

Assign tag to devices in the organization.

Body data

{
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10",
    "udid11",
    "udid12"
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» tagName body string true The name of the tag.
» udids body [string] false The list of the devices.

Sample response

{
  "success": {
    "tagName": "ABC",
    "udids": [
      "udid1",
      "udid2"
    ]
  },
  "failed": [
    {
      "message": "Forbidden.",
      "udids": [
        "udid3",
        "udid4",
        "udid5"
      ]
    },
    {
      "message": "Already assigned devices.",
      "udids": [
        "udid7",
        "udid8",
        "udid9"
      ]
    },
    {
      "message": "The devices are invalid.",
      "udids": [
        "udid10",
        "udid11",
        "udid12"
      ]
    }
  ]
}

Responses

Status Meaning Description
200 OK Assign tag to devices.

Response Schema

Status Code 200

Name Type Required Description
success object false The devices are assigned successfully.
failed [object] false The devices are assigned unsuccessfully.

Remove tag from devices


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/tags/unassign \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/tags/unassign HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags/unassign', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags/unassign',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/tags/unassign', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/tags/unassign', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags/unassign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /tags/unassign

Remove tag from devices in the organization.

Body data

{
  "tagName": "ABC",
  "udids": [
    "udid1",
    "udid2",
    "udid3",
    "udid4",
    "udid5",
    "udid6",
    "udid7",
    "udid8",
    "udid9",
    "udid10"
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» tagName body string true The name of the tag.
» udids body [string] false The list of the devices.

Sample response

{
  "success": {
    "tagName": "ABC",
    "udids": [
      "udid1",
      "udid2"
    ]
  },
  "failed": [
    {
      "message": "Forbidden.",
      "udids": [
        "udid3",
        "udid4",
        "udid5"
      ]
    },
    {
      "message": "Devices are not assigned with ABC.",
      "udids": [
        "udid7",
        "udid8",
        "udid9"
      ]
    },
    {
      "message": "The devices are invalid.",
      "udids": [
        "udid10",
        "udid11",
        "udid12"
      ]
    }
  ]
}

Responses

Status Meaning Description
200 OK Remove tag from devices.

Response Schema

Status Code 200

Name Type Required Description
success object false The devices are removed successfully.
failed [object] false The devices are not removed unsuccessfully.

Get tag information


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/tags/info/:tagName?tagName=string \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/tags/info/:tagName?tagName=string HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags/info/:tagName', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags/info/:tagName?tagName=string',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/tags/info/:tagName', params: {
  'tagName' => 'string'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/tags/info/:tagName', params={
  'tagName': 'string'
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags/info/:tagName?tagName=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /tags/info/:tagName

Get information about a tag.

Parameters

Parameter In Type Required Description
tagName query string true The name of the tag.

Sample response

{
  "tagName": "tagName1",
  "udids": [
    "udid1",
    "udid2",
    "udid3"
  ],
  "quantity": 3
}

Responses

Status Meaning Description
200 OK You have received the tag information successfully.

Response Schema

Status Code 200

Name Type Required Description
tagName string false The name of the tag.
quantity number false The quantity of the number.
udids [string] false The list of the devices.

Delete multiple tags


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/tags/delete \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.kobiton.com/v1/tags/delete HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json
Accept: application/json

const inputBody = {
  "tagList": [
    "tagName1",
    "tagName2",
    "tagName11",
    "tagName22",
    "tagName3"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/tags/delete', {
    method: 'POST',
    body: inputBody,
    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "tagList": [
    "tagName1",
    "tagName2",
    "tagName11",
    "tagName22",
    "tagName3"
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/tags/delete',
  json: true,
  method: 'POST',
  body: inputBody,
  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.kobiton.com/v1/tags/delete', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.post('https://api.kobiton.com/v1/tags/delete', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/tags/delete");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /tags/delete

Delete multiple tags in your organization.

Body data

{
  "tagList": [
    "tagName1",
    "tagName2",
    "tagName11",
    "tagName22",
    "tagName3"
  ]
}

Parameters

Parameter In Type Required Description
body body object true No description
» tagList body [string] false The list of the tags.

Sample response

{
  "success": {
    "tagList": [
      "tagName1",
      "tagName2"
    ]
  },
  "failed": [
    {
      "message": "The tag names are invalid.",
      "tagList": [
        "tagName11",
        "tagName22"
      ]
    },
    {
      "message": "Forbidden.",
      "tagList": [
        "tagName3"
      ]
    }
  ]
}

Responses

Status Meaning Description
200 OK Delete multiple tags.

Response Schema

Status Code 200

Name Type Required Description
success object false The tags are deleted successfully.
failed [object] false The tags are deleted unsuccessfully.

User

Get user information


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/users/me \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/users/me HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/users/me', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/users/me',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/users/me', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/users/me', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/users/me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /users/me

Retrieve user’s information.

Parameters

Parameter In Type Required Description
full query integer false Get full user data with organization, group, default group information if the full parameter is empty or not equal to 0

Sample response

{
  "id": 1,
  "name": "Sample Name",
  "firstName": "Sample",
  "lastName": "Name",
  "role": "MEMBER",
  "email": "sample@gmail.com",
  "username": "sample",
  "avatar": "samples/sample.jpg",
  "settings": {
    "timeZone": "Europe/London",
    "canUploadDeviceNames": false,
    "manualSession": {
      "autoExitOnInHouseDevice": true,
      "idleTimeoutInMinutes": 10
    },
    "networkPayloadCapture": {
      "allowHosts": [
        "www.google.com"
      ],
      "allowMimeTypes": [
        "application/json"
      ]
    }
  },
  "survey": null,
  "surveyCompletedAt": null,
  "disabled": false,
  "authenticationFailureReason": "NONE",
  "isActivated": true,
  "phoneNumber": "0123456778",
  "defaultGroupId": 2,
  "appiumGenerationPopupDisabledAt": "2020-11-30T10:49:01.214Z",
  "trackingData": null,
  "bugTrackingAuthorizedIntegration": {},
  "ssoEnabled": false,
  "createdAt": "2020-11-30T10:49:01.214Z",
  "updatedAt": "2021-03-17T16:07:06.297Z",
  "deletedAt": null,
  "ApiKeys": [
    {
      "userId": 1,
      "alias": "Created on March 17th 2021, 4:24:10 pm",
      "key": "ca48bb67-a187-437c-95b4-6c5b41b8812a",
      "createdAt": "2020-11-30T10:49:01.214Z",
      "updatedAt": "2021-03-17T16:07:06.297Z",
      "deletedAt": null
    }
  ],
  "organization": {
    "id": 2,
    "name": "Sample Org",
    "description": "Sample description",
    "role": "MEMBER",
    "isCreator": false,
    "bypass": null,
    "jointAt": "2020-11-30T10:49:01.214Z",
    "ssoConfigured": false,
    "bugTrackingIntegrationSettings": {
      "jira": {
        "enabled": true
      }
    },
    "ssoRoleBaseConfigured": false
  },
  "avatarUrl": "https://kobiton-devvn/example-link/example.jpg",
  "groups": [
    {
      "id": 1,
      "organizationId": 2,
      "name": "Sample Group"
    }
  ],
  "defaultGroup": {
    "id": 1,
    "organizationId": 2,
    "name": "Sample Group",
    "description": "Sample description",
    "createdBy": 1,
    "updatedBy": 1,
    "createdAt": "2020-11-30T10:49:01.214Z",
    "updatedAt": "2021-03-17T16:07:06.297Z",
    "deletedAt": null
  },
  "isUserAllowToAccessProductBoard": false,
  "isUserAbleToAccessIta": false,
  "canConnectToAdbTunnel": false,
  "integrations": []
}

Responses

Status Meaning Description
200 OK OK

Get Subscription Information


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/users/me/subscription \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/users/me/subscription HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=

Accept: application/json


const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/users/me/subscription', {
    method: 'GET',

    headers: headers
  })

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');

const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/users/me/subscription',
  json: true,
  method: 'GET',

  headers: headers
}, function (err, response, body) {
  if (err) return console.error('Error:', err);

  console.log('Response:', response);
  console.log('Response body:', body);
});
require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.kobiton.com/v1/users/me/subscription', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/users/me/subscription', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/users/me/subscription");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty ("Authorization", "Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /users/me/subscription

Retrieves subscription information of current user.

Sample response

{
  "planName": "Business - Monthly",
  "startedAt": "2017-08-14T10:30:38.000Z",
  "endsAt": "2017-09-14T10:30:38.000Z",
  "totalUsableMinutes": 911,
  "usedMinutes": 706,
  "remainingMinutes": 205,
  "overageMinutes": 0,
  "purchasedDeviceSlots": 100
}

Responses

Status Meaning Description
200 OK Get subscription information successfully.

totalUsableMinutes is a total of usedMinutes and remainingMinutes

Schemas

App

{
  "id": 17,
  "createdAt": "2017‐04‐18T04:36:05.537Z",
  "name": "Test App",
  "privateAccess": true,
  "os": "ANDROID",
  "createdBy": "testuser",
  "state": "OK",
  "versions": [
    {
      "id": 20,
      "createdAt": "2017‐04‐18T04:36:05.556Z",
      "name": "Test App",
      "version": "1.3.0",
      "createdBy": "testuser",
      "state": "OK",
      "nativeProperties": {
        "package": null,
        "application": {
          "icon": "res/mipmap‐mdpi‐v4/app‐prod‐debug.png",
          "label": "Test App",
          "versionName": "1.3.0",
          "iconLocalPath": "/tmp/kobiton‐api‐13956/u‐1‐1492490165564/app‐prod‐debug‐8165dff0‐23f0‐11e7‐81ff‐7f02fd6dff65/res/mipmap‐mdpi‐v",
          "iconUrl": "https://kobiton.s3.amazonaws.com/users/1/apps/app‐prod‐debug‐8c96dd70‐23f0‐11e7‐81ff‐7f02fd6dff65.png?AWSAccessKeyId=AKIAJDVH"
        }
      }
    }
  ],
  "iconUrl": "https://kobiton.s3.amazonaws.com/users/1/apps/app‐prod‐debug‐8c96dd70‐23f0‐11e7‐81ff‐7f02fd6dff65.png?AWSAccessKeyId=AKIAJDVH"
} 

Properties

Name Type Required Description
id string false No description
createdAt date false No description
name string false No description
privateAccess boolean false No description
os string false No description
createdBy string false No description
state string false No description
iconUrl string false No description
versions [object] false No description
» id string false No description
» createdAt date false No description
» name string false No description
» version string false No description
» createdBy string false No description
» state string false No description
» nativeProperties object false No description
»» package Unknown false No description
»» application object false No description
»»» icon string false No description
»»» label string false No description
»»» versionName string false No description
»»» iconLocalPath string false No description
»»» iconUrl string false No description

CloudDevice

{
  "id": 17469,
  "isBooked": false,
  "isOnline": false,
  "modelName": "LG-K350",
  "deviceName": "LG K8",
  "resolution": {
    "width": 720,
    "height": 1280
  },
  "platformName": "ANDROID",
  "platformVersion": "6.0",
  "installedBrowsers": [
    {
      "name": "chrome",
      "version": "55.0.2883.91"
    }
  ],
  "deviceImageUrl": "",
  "isFavorite": true,
  "isCloud": true,
  "isMyOrg": false,
  "isMyOwn": false
} 

Properties

Name Type Required Description
id integer false No description
isBooked boolean false No description
isOnline boolean false No description
modelName string false No description
deviceName string false No description
resolution object false No description
» width integer false No description
» height integer false No description
platformName string false No description
platformVersion string false No description
deviceImageUrl string false No description
isFavorite boolean false No description
isCloud boolean false No description
isMyOrg boolean false No description
isMyOwn boolean false No description
installedBrowsers [object] false No description
» name string false No description
» version string false No description

PrivateDevice

{
  "id": 17469,
  "isBooked": false,
  "isOnline": false,
  "modelName": "LG-K350",
  "deviceName": "LG K8",
  "resolution": {
    "width": 720,
    "height": 1280
  },
  "platformName": "ANDROID",
  "platformVersion": "6.0",
  "installedBrowsers": [
    {
      "name": "chrome",
      "version": "55.0.2883.91"
    }
  ],
  "deviceImageUrl": "",
  "isFavorite": true,
  "isCloud": true,
  "isMyOrg": false,
  "isMyOwn": false,
  "udid": "LGK350YPR4H"
} 

Properties

Name Type Required Description
undefined object false No description
udid string false No description

ExecutionData

{
  "log": {
    "previewPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
    "downloadPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
    "appiumPreviewPath": "sessions/71610/logs/appium-7435e650-6a8a-11e7-aef2-2f8386028e6a.log",
    "uiAutomatorPreviewPath": "sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log",
    "xcuiTestPreviewPath": "sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log"
  },
  "video": {
    "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "size": 534524,
    "error": null,
    "sessionVideoCapturingDisabled": false
  },
  "actual": {
    "sdk": 23,
    "udid": "818972fe78cd87198",
    "isIos": false,
    "state": "device",
    "codeName": "zeroflteskt",
    "brandName": "samsung",
    "modelName": "SM-G920S",
    "deviceName": "Galaxy S6",
    "isEmulator": false,
    "orientation": 0,
    "platformName": "Android",
    "serialNumber": "06157df64310c502",
    "cpuArchitecture": "arm64-v8a",
    "platformVersion": "6.0.1",
    "resolution": {
      "width": 1440,
      "height": 2560
    },
    "installedBrowsers": [
      {
        "name": "chrome",
        "enabled": true,
        "version": "57.0.2987.132"
      }
    ]
  },
  "desired": {
    "modelName": "SM-G920S",
    "deviceName": "Galaxy S6",
    "platformName": "Android",
    "sessionName": "Test login page"
  },
  "versions": {
    "nodeVersion": "v7.4.0",
    "appiumVersion": "1.7.1"
  },
  "networkLogs": [
    {
      "endTime": "2017-12-09T16:47:45.943Z",
      "startTime": "2017-12-09T16:53:45.943Z",
      "fileName": "Har_202307_0",
      "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
      "size": 25432
    }
  ],
  "wdSessionId": "99f6ad1b-3f64-4544-b113-a6db9771a2f6",
  "allCommandIds": [
    56985,
    56986,
    56988,
    56989,
    56992,
    56993,
    56994,
    56995
  ],
  "sessionVideoCapturingDisabled": false,
  "commandScreenshotCapturingDisabled": false
} 

Properties

Name Type Required Description
log object false No description
» previewPath string false No description
» downloadPath string false No description
» appiumPreviewPath string false No description
» uiAutomatorPreviewPath string false No description
» xcuiTestPreviewPath string false No description
video object false No description
» path string false No description
» size integer false No description
» error string false No description
» sessionVideoCapturingDisabled boolean false No description
actual object false No description
» sdk string false No description
» udid string false No description
» isIos boolean false No description
» state string false No description
» codeName string false No description
» brandName string false No description
» modelName string false No description
» deviceName string false No description
» isEmulator boolean false No description
» orientation integer false No description
» platformName string false No description
» serialNumber string false No description
» cpuArchitecture string false No description
» platformVersion string false No description
» resolution object false No description
»» width integer false No description
»» height integer false No description
» installedBrowsers [object] false No description
»» name string false No description
»» enabled boolean false No description
»» version string false No description
desired object false No description
» modelName string false No description
» deviceName string false No description
» platformName string false No description
» sessionName string false No description
versions object false No description
» nodeVersion string false No description
» appiumVersion string false No description
wdSessionId string false No description
sessionVideoCapturingDisabled boolean false No description
commandScreenshotCapturingDisabled boolean false No description
networkLogs [object] false No description
» endTime string false No description
» startTime string false No description
» fileName string false No description
» path string false No description
» size integer false No description
allCommandIds [integer] false No description

Group

{
  "id": 1,
  "organizationId": 2,
  "name": "Alpha Group",
  "description": "Used for manual"
} 

Properties

Name Type Required Description
id integer false The indentifier of user’s group
organizationId integer false The indentifier of user’s organization
name string false The name of the group
description string false The description of the group

Metric

{
  "timestamp": 1617833532493,
  "cpu": 100,
  "memory": 83.79,
  "wifi": {
    "rxBytes": 449039360,
    "txBytes": 31016960
  }
} 

Properties

Name Type Required Description
timestamp integer false No description
cpu integer false No description
memory number false No description
wifi object false No description
» rxBytes integer false No description
» txBytes integer false No description

Reservation

{
  "id": 1,
  "userId": 2,
  "manufacturer": "Apple",
  "releaseDate": "2021-05-24T16:10:49.113Z",
  "bookedDateTime": "2021-05-24T11:10:49.113Z",
  "bookingDuration": 300,
  "lastSessionEndDateTime": "2021-05-24T11:25:49.812Z",
  "deviceUdid": "5333f963"
} 

Properties

Name Type Required Description
id integer false The indentifier of the soft booking.
userId integer false The indentifier of the user who soft booked device.
manufacturer string false The manufacturer of the device.
releaseDate datetime false when the devices are available for use and the reserve period expires.
bookedDateTime datetime false Date and time the device was softbooked.
bookingDuration integer false Number of minutes the device was softbooked for, starting at the bookedDateTime.
lastSessionEndDateTime datetime false Date and time last session ended for this softbooking before the softbooking period ended.
deviceUdid string false UDID of device that was soft booked.

SessionCommandData

{
  "id": 12032,
  "sessionId": 12032,
  "data": {
    "url": "/wd/hub/session/99b6ad1c-3664-4544-b113-a6db9771a2f6/url",
    "method": "POST",
    "statusCode": 200,
    "requestBody": {
      "url": "https://kobiton.com/blog/"
    },
    "responseBody": {
      "value": "",
      "status": 0,
      "sessionId": "99b6ad1c-3664-4544-b113-a6db9771a2f6"
    },
    "value": "HOME",
    "action": "PRESS_BUTTON"
  },
  "screenshot": "sessions/160570/screenshots/12034174.jpg",
  "screenshotDownloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/160570/screenshots/12034174.jpg?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
  "viewtreeDownloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/160570/commands/12034174/pre-viewtree.json?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
  "endedAt": "2017-04-17T16:02:59.952Z",
  "createdAt": "2017-04-17T16:02:59.952Z"
} 

Properties

Name Type Required Description
id integer false No description
sessionId integer false No description
data object false No description
» url string false No description
» method string false No description
» statusCode integer false No description
» requestBody object false No description
»» url string false No description
» responseBody object false No description
»» value string false No description
»» status integer false No description
»» sessionId string false No description
» value string false No description
» action string false No description
screenshot string false No description
screenshotDownloadUrl string false No description
viewtreeDownloadUrl string false No description
endedAt datetime false No description
createdAt datetime false No description

SessionDetail

{
  "id": 3894,
  "userId": 114,
  "deviceId": 153,
  "executionData": {
    "log": {
      "previewPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "downloadPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "appiumPreviewPath": "sessions/71610/logs/appium-7435e650-6a8a-11e7-aef2-2f8386028e6a.log",
      "uiAutomatorPreviewPath": "sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log",
      "xcuiTestPreviewPath": "sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log"
    },
    "video": {
      "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
      "size": 534524,
      "error": null,
      "sessionVideoCapturingDisabled": false
    },
    "actual": {
      "sdk": 23,
      "udid": "818972fe78cd87198",
      "isIos": false,
      "state": "device",
      "codeName": "zeroflteskt",
      "brandName": "samsung",
      "modelName": "SM-G920S",
      "deviceName": "Galaxy S6",
      "isEmulator": false,
      "orientation": 0,
      "platformName": "Android",
      "serialNumber": "06157df64310c502",
      "cpuArchitecture": "arm64-v8a",
      "platformVersion": "6.0.1",
      "resolution": {
        "width": 1440,
        "height": 2560
      },
      "installedBrowsers": [
        {
          "name": "chrome",
          "enabled": true,
          "version": "57.0.2987.132"
        }
      ]
    },
    "desired": {
      "modelName": "SM-G920S",
      "deviceName": "Galaxy S6",
      "platformName": "Android",
      "sessionName": "Test login page"
    },
    "versions": {
      "nodeVersion": "v7.4.0",
      "appiumVersion": "1.7.1"
    },
    "networkLogs": [
      {
        "endTime": "2017-12-09T16:47:45.943Z",
        "startTime": "2017-12-09T16:53:45.943Z",
        "fileName": "Har_202307_0",
        "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
        "size": 25432
      }
    ],
    "wdSessionId": "99f6ad1b-3f64-4544-b113-a6db9771a2f6",
    "allCommandIds": [
      56985,
      56986,
      56988,
      56989,
      56992,
      56993,
      56994,
      56995
    ],
    "sessionVideoCapturingDisabled": false,
    "commandScreenshotCapturingDisabled": false
  },
  "endedAt": "2017-04-17T16:02:59.952Z",
  "state": "COMPLETE",
  "type": "AUTO",
  "name": "Automation test session",
  "description": "Test user case #101",
  "createdAt": "2017-04-17T16:02:55.182Z",
  "updatedAt": "2017-04-17T16:03:51.132Z",
  "deviceBooked": false,
  "deviceOnline": true,
  "isCloud": true,
  "username": "Test User",
  "avatarUrl": "https://kobiton-us.s3.amazonaws.com/users/114/avatars/1492438501898.jpg",
  "deviceImageUrl": "https://s3.amazonaws.com/kobiton/devices/256/samsung-galaxy-s6.png",
  "log": {
    "previewUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/device-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "downloadUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/device-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "appiumPreviewUrl": "https://kobiton-us.s3.amazonaws.com/sessions/3933/logs/appium-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "previewSize": 5868641,
    "appiumPreviewSize": 5868641,
    "uiAutomatorPreviewUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624953705&Signature=flOKJ9hDWOessxVt%2BE12oxaLXWM%3D&response-cache-control=max-age%3D86400",
    "uiAutomatorPreviewSize": 22681,
    "xcuiTestPreviewUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624953708&Signature=nEUpuS%2Bo1BAJJFqNbUugYHUy0W4%3D&response-cache-control=max-age%3D86400",
    "xcuiTestPreviewSize": 1799
  },
  "testReportUrl": "https://kobiton-us-east.s3.amazonaws.com/sessions/2467826/test-report-5ef57f90-97ee-11eb-874e-3952bbc9ba8d.zip?AWSAccessKeyId=AKIAJ7BONOZUJZMWR4WQ&Expires=1624892492&Signature=0TMtYKa%2FNb99bXj5rfrBYeQREUk%3D&response-cache-control=max-age%3D86400",
  "video": {
    "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
    "size": 534524,
    "error": null,
    "sessionVideoCapturingDisabled": false
  },
  "networkLogs": [
    {
      "endTime": "2017-12-09T16:47:45.943Z",
      "startTime": "2017-12-09T16:53:45.943Z",
      "fileName": "Har_202307_0",
      "path": "https://kobiton-us-east.s3.amazonaws.com/sessions/2307/network-logs/Har_202307_0-f80598a0-0db8-11e8-bb19-65c7ba03f67a.zip?AWSAccessKeyId=BKIBJ7BOUOZUJZMWR4WQ&Expires=1518238081&Signature=zGzB5S4xwaOy%2B5rg1kUT2EKVZZs%3D",
      "size": 25432
    }
  ]
} 

Properties

Name Type Required Description
id integer false No description
userId integer false No description
deviceId integer false No description
executionData ExecutionData false No description
endedAt datetime false No description
state string false No description
type string false No description
name string false No description
description string false No description
createdAt datetime false No description
updatedAt datetime false No description
deviceBooked boolean false No description
deviceOnline boolean false No description
isCloud boolean false No description
username string false No description
avatarUrl string false No description
deviceImageUrl string false No description
log object false No description
» previewUrl string false Device log
» downloadUrl string false All session logs in a .zip
» appiumPreviewUrl string false No description
» previewSize integer false No description
» appiumPreviewSize integer false No description
» uiAutomatorPreviewUrl string false UIAutomator/Espresso log
» uiAutomatorPreviewSize integer false No description
» xcuiTestPreviewUrl string false XCUI log
» xcuiTestPreviewSize number false No description
testReportUrl string false XCode XCUI report bundle in .zip
video object false No description
» path string false No description
» size integer false No description
» error string false No description
» sessionVideoCapturingDisabled boolean false No description
networkLogs [object] false No description
» endTime string false No description
» startTime string false No description
» fileName string false No description
» path string false No description
» size integer false No description

Session

{
  "id": 3894,
  "userId": 114,
  "endedAt": "2017-04-17T16:02:59.952Z",
  "state": "COMPLETE",
  "type": "AUTO",
  "name": "Automation test session",
  "description": "Test user case #101",
  "createdAt": "2017-04-17T16:02:55.182Z",
  "updatedAt": "2017-04-17T16:03:51.132Z",
  "username": "Test User",
  "avatarUrl": "https://kobiton-staging.s3.amazonaws.com/users/114/avatars/1492438501898.jpg",
  "deviceBooked": false,
  "deviceOnline": false,
  "deviceImageUrl": "https://s3.amazonaws.com/kobiton/devices/256/samsung-galaxy-s6.png",
  "executionData": {
    "log": {
      "previewPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "downloadPath": "sessions/3894/logs/device-54844080-2387-11e7-b00c-2f9a563e5f09.log",
      "appiumPreviewPath": "sessions/71610/logs/appium-7435e650-6a8a-11e7-aef2-2f8386028e6a.log",
      "uiAutomatorPreviewPath": "sessions/2794774/logs/uiautomator-a3c09a10-d4c0-11eb-9bd6-09fad03ae310.log",
      "xcuiTestPreviewPath": "sessions/2467826/logs/xcuitest-5ef53170-97ee-11eb-9374-f5d9313cc6ab.log"
    },
    "video": {
      "path": "https://kobiton-us.s3.amazonaws.com/sessions/3933/videos/Video_3933-38ffa250-23f0-11e7-be2a-a1d550620ffe.log?AWSAccessKeyId=AKIAINNNJIBOGNOGWBJQ&Expires=1500285830&Signature=4BMnjDB%2BPbw6sypKPl5DBOAeaUU%3D&response-cache-control=max-age%3D86400",
      "size": 534524,
      "error": null,
      "sessionVideoCapturingDisabled": false
    },
    "actual": {
      "sdk": 23,
      "udid": "818972fe78cd87198",
      "isIos": false,
      "state": "device",
      "codeName": "zeroflteskt",
      "brandName": "samsung",
      "modelName": "SM-G920S",
      "deviceName": "Galaxy S6",
      "isEmulator": false,
      "orientation": 0,
      "platformName": "Android",
      "serialNumber": "06157df64310c502",
      "cpuArchitecture": "arm64-v8a",
      "platformVersion": "6.0.1",
      "resolution": {
        "width": 1440,
        "height": 2560
      },
      "installedBrowsers": [
        {
          "name": "chrome",
          "enabled": true,
          "version": "57.0.2987.132"
        }
      ]
    },