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

Kobiton API v2

API v2 is now available with improved performance and new endpoints.
Check out the API v2 documentation site here.
A quick introduction on how to navigate and try real API requests in this site, as well as the current API v2 limitations can be found here.
Kobiton API v1 is still available until further notice. We encourage you to start using API v2 as you add new test scripts and processes.
For endpoints in API v1 not yet offered in v2, continue to use API v1. We’ll continue to enhance API v2 in future releases.


Kobiton API v1

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

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.

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.

Assign Tag To AppVersion


Sample request

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

POST https://api.kobiton.com/v1/app/versions/{versionId}/tag/{name} 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}/tag/{name}', {
    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/app/versions/{versionId}/tag/{name}',
  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/app/versions/{versionId}/tag/{name}', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/app/versions/{versionId}/tag/{name}");
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 /app/versions/{versionId}/tag/{name}

Assign a unique tag name to an application version.

Parameters

Parameter In Type Required Description
versionId path integer true Version ID.
name path string true Tag Name to Assign (can’t have spaces, special chars or be more than 32 chars).

Responses

Status Meaning Description
200 OK Assign Tag to app successfully.
400 Bad Request Tag can’t have spaces, special chars or be more than 32 chars. Tag is unique in the organization.
403 Forbidden User don’t have permission to perform the action.
500 Internal Server Error Unknown server error.

Unassign Tag To AppVersion


Sample request

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

DEL https://api.kobiton.com/v1/app/versions/{versionId}/tag/{name} 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}/tag/{name}', {
    method: 'DEL'

    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}/tag/{name}',
  json: true,
  method: 'DEL'

  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.del 'https://api.kobiton.com/v1/app/versions/{versionId}/tag/{name}', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/app/versions/{versionId}/tag/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DEL");
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());

DEL /app/versions/{versionId}/tag/{name}

Delete tag name from an application version.

Parameters

Parameter In Type Required Description
versionId path integer true Version ID.
name path string true Tag Name to unassign (can’t have spaces, special chars or be more than 32 chars).

Responses

Status Meaning Description
200 OK Assign Tag to app successfully.
400 Bad Request Tag can’t have spaces, special chars or be more than 32 chars. Tag is unique in the organization.
403 Forbidden Do not have permission to unassign tag from app.
500 Internal Server Error Unknown server error.

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=<AWS_ACCESS_KEY_ID>\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
    }
  ],
  "assignedTeams": [
    {
      "id": 2,
      "teamId": 2,
      "appId": 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
assignedTeams [Unknown] false No description
» id integer false No description
» teamId integer false No description
» appId integer 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.

Make An Application dedicated to specific team(s)


Sample request

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

POST https://api.kobiton.com/v1/apps/{appId}/team/assign HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/apps/{appId}/team/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 = {
  "teamIds": [
    1,
    2,
    3,
    4,
    5
  ]
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/apps/{appId}/team/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/apps/{appId}/team/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/apps/{appId}/team/assign', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/apps/{appId}/team/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 /apps/{appId}/team/assign

Make an application assign to specific team(s) only. So this app can’t be accessed by the other members of other teams.

Body data

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

Parameters

Parameter In Type Required Description
appId path integer true Application ID
body body object true No description
» teamIds body [integer] false Team ID(s) to be assigned to the app.

Responses

Status Meaning Description
200 OK Successfully assign app to teams

Organization

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.

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.

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

Update Devices


Sample request

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

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

const inputBody = {
  "nodeId": "BB4A4D35-A5CD-50B1-A5CC-940B9F83B45F",
  "devices": [
    {
      "platformVersion": "11",
      "serialNumber": "8A2X0KA1Q",
      "udid": "8A2X0KA1Q",
      "addedToCloud": false,
      "status": "UNPLUGGED",
      "message": "",
      "state": "device",
      "platformName": "Android",
      "isHidden": false,
      "adbTunnelInfo": {},
      "modelName": "Pixel 3",
      "cpuArchitecture": "arm64-v8a",
      "brandName": "Google",
      "installedBrowsers": [
        {
          "name": "chrome"
        }
      ],
      "isEmulator": false,
      "deviceName": "Pixel 3",
      "isAndroid": true,
      "isIos": false,
      "support": {
        "appiumDisabled": false,
        "networkTrafficCapturingDisabled": false,
        "unlockPasscodeDisabled": true,
        "setTimeZoneDisabled": false,
        "networkPayloadCaptureDisabled": true
      },
      "orientation": 0,
      "resolution": {
        "width": 1080,
        "height": 2160,
        "logical": {
          "width": 1080,
          "height": 2160
        },
        "projection": 1024
      },
      "networkReachability": {
        "code": 200,
        "host": "https://play.google.com",
        "status": "Reachable",
        "ipAddress": "192.168.1.7",
        "proxy": false
      },
      "uptime": 257811096,
      "bootTime": 7258110969,
      "storage": {
        "total": 119359385600,
        "used": 13938974720
      },
      "memory": {
        "total": 7783772160,
        "used": 3744702464
      },
      "battery": {
        "status": "Charging",
        "temperature": 361,
        "voltage": 4387,
        "health": "Good",
        "technology": "Li-ion",
        "percentage": "100%"
      },
      "telephony": {
        "mobileDataState": "Disconnected",
        "carriersInfo": [
          {
            "imei": "352677100462901",
            "meid": "452040004242791",
            "slot": 1,
            "iccid": ""
          }
        ]
      },
      "isRooted": false
    }
  ],
  "machine": {
    "hostname": "FVFY201AHV2H.local",
    "arch": "x64",
    "freemem": 116559872,
    "totalmem": 17179869184,
    "platform": "darwin",
    "type": "Darwin",
    "uptime": 281771,
    "version": "1.0.0",
    "buildNumber": "N/A",
    "network": {
      "address": "192.181.1.2",
      "netmask": "255.255.255.0",
      "family": "IPv4",
      "mac": "88:ff:dd:66:ff:44",
      "internal": false,
      "cidr": "192.181.1.2/23"
    }
  }
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

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

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "nodeId": "BB4A4D35-A5CD-50B1-A5CC-940B9F83B45F",
  "devices": [
    {
      "platformVersion": "11",
      "serialNumber": "8A2X0KA1Q",
      "udid": "8A2X0KA1Q",
      "addedToCloud": false,
      "status": "UNPLUGGED",
      "message": "",
      "state": "device",
      "platformName": "Android",
      "isHidden": false,
      "adbTunnelInfo": {},
      "modelName": "Pixel 3",
      "cpuArchitecture": "arm64-v8a",
      "brandName": "Google",
      "installedBrowsers": [
        {
          "name": "chrome"
        }
      ],
      "isEmulator": false,
      "deviceName": "Pixel 3",
      "isAndroid": true,
      "isIos": false,
      "support": {
        "appiumDisabled": false,
        "networkTrafficCapturingDisabled": false,
        "unlockPasscodeDisabled": true,
        "setTimeZoneDisabled": false,
        "networkPayloadCaptureDisabled": true
      },
      "orientation": 0,
      "resolution": {
        "width": 1080,
        "height": 2160,
        "logical": {
          "width": 1080,
          "height": 2160
        },
        "projection": 1024
      },
      "networkReachability": {
        "code": 200,
        "host": "https://play.google.com",
        "status": "Reachable",
        "ipAddress": "192.168.1.7",
        "proxy": false
      },
      "uptime": 257811096,
      "bootTime": 7258110969,
      "storage": {
        "total": 119359385600,
        "used": 13938974720
      },
      "memory": {
        "total": 7783772160,
        "used": 3744702464
      },
      "battery": {
        "status": "Charging",
        "temperature": 361,
        "voltage": 4387,
        "health": "Good",
        "technology": "Li-ion",
        "percentage": "100%"
      },
      "telephony": {
        "mobileDataState": "Disconnected",
        "carriersInfo": [
          {
            "imei": "352677100462901",
            "meid": "452040004242791",
            "slot": 1,
            "iccid": ""
          }
        ]
      },
      "isRooted": false
    }
  ],
  "machine": {
    "hostname": "FVFY201AHV2H.local",
    "arch": "x64",
    "freemem": 116559872,
    "totalmem": 17179869184,
    "platform": "darwin",
    "type": "Darwin",
    "uptime": 281771,
    "version": "1.0.0",
    "buildNumber": "N/A",
    "network": {
      "address": "192.181.1.2",
      "netmask": "255.255.255.0",
      "family": "IPv4",
      "mac": "88:ff:dd:66:ff:44",
      "internal": false,
      "cidr": "192.181.1.2/23"
    }
  }
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json',
  'Accept':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/devices',
  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/devices', 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/devices', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/devices");
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 /devices

Update a list of devices to database

Body data

{
  "nodeId": "BB4A4D35-A5CD-50B1-A5CC-940B9F83B45F",
  "devices": [
    {
      "platformVersion": "11",
      "serialNumber": "8A2X0KA1Q",
      "udid": "8A2X0KA1Q",
      "addedToCloud": false,
      "status": "UNPLUGGED",
      "message": "",
      "state": "device",
      "platformName": "Android",
      "isHidden": false,
      "adbTunnelInfo": {},
      "modelName": "Pixel 3",
      "cpuArchitecture": "arm64-v8a",
      "brandName": "Google",
      "installedBrowsers": [
        {
          "name": "chrome"
        }
      ],
      "isEmulator": false,
      "deviceName": "Pixel 3",
      "isAndroid": true,
      "isIos": false,
      "support": {
        "appiumDisabled": false,
        "networkTrafficCapturingDisabled": false,
        "unlockPasscodeDisabled": true,
        "setTimeZoneDisabled": false,
        "networkPayloadCaptureDisabled": true
      },
      "orientation": 0,
      "resolution": {
        "width": 1080,
        "height": 2160,
        "logical": {
          "width": 1080,
          "height": 2160
        },
        "projection": 1024
      },
      "networkReachability": {
        "code": 200,
        "host": "https://play.google.com",
        "status": "Reachable",
        "ipAddress": "192.168.1.7",
        "proxy": false
      },
      "uptime": 257811096,
      "bootTime": 7258110969,
      "storage": {
        "total": 119359385600,
        "used": 13938974720
      },
      "memory": {
        "total": 7783772160,
        "used": 3744702464
      },
      "battery": {
        "status": "Charging",
        "temperature": 361,
        "voltage": 4387,
        "health": "Good",
        "technology": "Li-ion",
        "percentage": "100%"
      },
      "telephony": {
        "mobileDataState": "Disconnected",
        "carriersInfo": [
          {
            "imei": "352677100462901",
            "meid": "452040004242791",
            "slot": 1,
            "iccid": ""
          }
        ]
      },
      "isRooted": false
    }
  ],
  "machine": {
    "hostname": "FVFY201AHV2H.local",
    "arch": "x64",
    "freemem": 116559872,
    "totalmem": 17179869184,
    "platform": "darwin",
    "type": "Darwin",
    "uptime": 281771,
    "version": "1.0.0",
    "buildNumber": "N/A",
    "network": {
      "address": "192.181.1.2",
      "netmask": "255.255.255.0",
      "family": "IPv4",
      "mac": "88:ff:dd:66:ff:44",
      "internal": false,
      "cidr": "192.181.1.2/23"
    }
  }
}

Parameters

Parameter In Type Required Description
body body object false No description
» nodeId body string true No description
» machine body Machine true No description
» devices body [DeviceInfo] false No description

Sample response

{
  "failedDevices": [
    {
      "udid": "8A2X0KA1Q",
      "message": "Capabilities are missing required fields"
    }
  ]
}

Responses

Status Meaning Description
200 OK OK.

Response Schema

Status Code 200

Name Type Required Description
failedDevices [object] false No description
» udid string false No description
» message string 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 successfully.

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

Gestures

Get User Gestures


Sample request

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

GET https://api.kobiton.com/v1/gestures 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/gestures', {
    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/gestures',
  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/gestures', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/gestures");
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 /gestures

Retrieve user’s gestures.

Sample response

{
  "id": 1,
  "name": "Sample Name",
  "command": "down(50%, 20%) move(50%, 80%)"
}

Responses

Status Meaning Description
200 OK OK

Save User Gesture


Sample request

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

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

const inputBody = {
  "name": "Sample Name",
  "command": "down(50%, 20%) move(50%, 80%)"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

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

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "name": "Sample Name",
  "command": "down(50%, 20%) move(50%, 80%)"
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/gestures',
  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/gestures', 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/gestures', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/gestures");
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 /gestures

saves gesture by user

Body data

{
  "name": "Sample Name",
  "command": "down(50%, 20%) move(50%, 80%)"
}

Parameters

Parameter In Type Required Description
body body RequestGestureBody true No description
» name body string true No description
» command body string true No description

Responses

Status Meaning Description
200 OK Resource Successfully Created

Delete User Gesture


Sample request

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

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



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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/gestures/{id}', {
    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/gestures/{id}',
  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/gestures/{id}', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/gestures/{id}");
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 /gestures/{id}

Deletes Gesture By Id

Parameters

Parameter In Type Required Description
id path string true Name of gesture being deleted

Responses

Status Meaning Description
200 OK Resource Successfully Deleted

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 = {
  "users": [
    {
      "email": "test-user@kobiton.com"
    },
    {
      "email": "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 = {
  "users": [
    {
      "email": "test-user@kobiton.com"
    },
    {
      "email": "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

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

Parameters

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

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 = {
  "users": [
    {
      "email": "test-user@kobiton.com",
      "role": "MEMBER"
    },
    {
      "email": "test-user2@kobiton.com",
      "role": "ADMIN"
    }
  ],
  "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 = {
  "users": [
    {
      "email": "test-user@kobiton.com",
      "role": "MEMBER"
    },
    {
      "email": "test-user2@kobiton.com",
      "role": "ADMIN"
    }
  ],
  "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

{
  "users": [
    {
      "email": "test-user@kobiton.com",
      "role": "MEMBER"
    },
    {
      "email": "test-user2@kobiton.com",
      "role": "ADMIN"
    }
  ],
  "groupName": "Test Group"
}

Parameters

Parameter In Type Required Description
body body object true No description
» groupName body string true The name of the group.
» users body [object] false The user info includes email and team role (Allow only MEMBER, ADMIN, OWNER).

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, follow Kobiton store or tagging format
»» 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=<AWS_ACCESS_KEY_ID>&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=<AWS_ACCESS_KEY_ID>&&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=<AWS_ACCESS_KEY_ID>&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=<AWS_ACCESS_KEY_ID>&&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.

OTP Service

Book an available phone number


Sample request

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

GET https://api.kobiton.com/v1/otp/phones/book?countryCode=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/otp/phones/book', {
    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/otp/phones/book?countryCode=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/otp/phones/book', params: {
  'countryCode' => 'integer'
}, headers: headers

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

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/phones/book?countryCode=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 /otp/phones/book

Book an available phone number based on specified country code.

Note: Currently, We have only supported the US phone number (countryCode=1) for this service.

Parameters

Parameter In Type Required Description
countryCode query integer true The country code number of phone number to book

Sample response

{
  "phoneNumber": "+14707989671"
}

Responses

Status Meaning Description
200 OK Get phone number by the specified country code successfully

Response Schema

Status Code 200

Name Type Required Description
phoneNumber string false The available phone number. The phoneNumber will be null when no phone available

Get OTP code by phone number


Sample request

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

GET https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-otp-code 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/otp/phones/{phoneNumber}/find-otp-code', {
    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/otp/phones/{phoneNumber}/find-otp-code',
  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/otp/phones/{phoneNumber}/find-otp-code', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-otp-code");
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 /otp/phones/{phoneNumber}/find-otp-code

Get a OTP code and SMS message by phone number

Assume that a SMS message which contains OTP code was sent to the phone

Note: OTP code must be in the format of 4-8 digits, can be separated by spaces or dashes. Eg: 123456, 123-456, 12345678

Parameters

Parameter In Type Required Description
phoneNumber path string true The phone number to get a OTP code

Sample response

{
  "message": "Your OTP code is: 123456",
  "otpCode": "123456"
}

Responses

Status Meaning Description
200 OK Get OTP code and SMS message by the specified phone number successfully

Note: Response will be empty if not found any OTP

Response Schema

Status Code 200

Name Type Required Description
message string false The SMS message sent to specified phone number
otpCode string false The OTP code sent to specified phone number

Get SMS message by phone number


Sample request

# You can also use wget
curl -X GET https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-sms-message \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-sms-message 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/otp/phones/{phoneNumber}/find-sms-message', {
    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/otp/phones/{phoneNumber}/find-sms-message',
  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/otp/phones/{phoneNumber}/find-sms-message', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Accept': 'application/json'
}
response = requests.get('https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-sms-message', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/phones/{phoneNumber}/find-sms-message");
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 /otp/phones/{phoneNumber}/find-sms-message

Get SMS message and its sender by phone number

Assume that a SMS message was sent to the phone

Parameters

Parameter In Type Required Description
phoneNumber path string true The phone number to get a SMS message

Sample response

{
  "from": "+14707989672",
  "message": "Your OTP code is: 123456"
}

Responses

Status Meaning Description
200 OK Get SMS message and its sender by the specified phone number successfully

Note: Response will be empty if not found any message
500 Internal Server Error Server failed to process your request

Response Schema

Status Code 200

Name Type Required Description
from string false Sender’s phone number
message string false The SMS message sent to specified phone number

Send SMS message by phone number


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/otp/phones/{phoneNumber}/send-sms-message?dst=string&text=string \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

POST https://api.kobiton.com/v1/otp/phones/{phoneNumber}/send-sms-message?dst=string&text=string HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/otp/phones/{phoneNumber}/send-sms-message', {
    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/otp/phones/{phoneNumber}/send-sms-message?dst=string&text=string',
  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/otp/phones/{phoneNumber}/send-sms-message', params: {
  'dst' => 'string',
'text' => 'string'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.post('https://api.kobiton.com/v1/otp/phones/{phoneNumber}/send-sms-message', params={
  'dst': 'string',  'text': 'string'
}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/phones/{phoneNumber}/send-sms-message?dst=string&text=string");
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 /otp/phones/{phoneNumber}/send-sms-message

Send SMS message from specified phone number

Parameters

Parameter In Type Required Description
phoneNumber path string true The phone number to send SMS message
dst query string true The phone number that you want to send message to
text query string true Content of SMS message

Responses

Status Meaning Description
200 OK SMS message has been sent successfully
400 Bad Request SMS message has been sent unsuccessfully
429 Too Many Requests Your request has been declined due to sending too many time
500 Internal Server Error Server failed to process your request

Unbook the specified phone number


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/otp/phones/{phoneNumber}/unbook \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

POST https://api.kobiton.com/v1/otp/phones/{phoneNumber}/unbook HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/otp/phones/{phoneNumber}/unbook', {
    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/otp/phones/{phoneNumber}/unbook',
  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/otp/phones/{phoneNumber}/unbook', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/phones/{phoneNumber}/unbook");
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 /otp/phones/{phoneNumber}/unbook

Unbooking the phone number for OTP service

Note: The phone number will be automatically unbooked after 5 minutes since the booking was successful (regardless of receiving OTP or not)

Parameters

Parameter In Type Required Description
phoneNumber path string true The phone number to unbook

Responses

Status Meaning Description
200 OK Unbook the specified phone number successfully

Book an email address


Sample request

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

GET https://api.kobiton.com/v1/otp/emails/book 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/otp/emails/book', {
    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/otp/emails/book',
  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/otp/emails/book', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/emails/book");
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 /otp/emails/book

Book a random email address for OTP service

Sample response

{
  "emailAddress": "abc@yopmail.com"
}

Responses

Status Meaning Description
200 OK Get an email address successfully

Response Schema

Status Code 200

Name Type Required Description
emailAddress string false The email address for OTP service

Get OTP code from email address


Sample request

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

GET https://api.kobiton.com/v1/otp/emails/{emailAddress}/find-otp-code 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/otp/emails/{emailAddress}/find-otp-code', {
    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/otp/emails/{emailAddress}/find-otp-code',
  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/otp/emails/{emailAddress}/find-otp-code', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/emails/{emailAddress}/find-otp-code");
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 /otp/emails/{emailAddress}/find-otp-code

Get a OTP code was sent to the email address

Assume that an email which contains OTP code was sent to the email address

Note: OTP code must be in the format of 4-8 digits, can be separated by spaces or dashes. Eg: 123456, 123-456, 12345678

Parameters

Parameter In Type Required Description
emailAddress path string true The email address to receive a OTP code

Sample response

{
  "otpCode": "123456"
}

Responses

Status Meaning Description
200 OK Get OTP code from the specified email address successfully

Response Schema

Status Code 200

Name Type Required Description
otpCode string false The OTP code sent to specified email address. OTP code will be null if not found any

Unbook the specified email address


Sample request

# You can also use wget
curl -X POST https://api.kobiton.com/v1/otp/emails/{emailAddress}/unbook \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

POST https://api.kobiton.com/v1/otp/emails/{emailAddress}/unbook HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/otp/emails/{emailAddress}/unbook', {
    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/otp/emails/{emailAddress}/unbook',
  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/otp/emails/{emailAddress}/unbook', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/otp/emails/{emailAddress}/unbook");
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 /otp/emails/{emailAddress}/unbook

Unbooking the email address for OTP service

Note: The email address will be automatically unbooked after 15 minutes since the booking was successful (regardless of receiving OTP or not)

Parameters

Parameter In Type Required Description
emailAddress path string true The email address to unbook

Responses

Status Meaning Description
200 OK Unbook the specified email address 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}&testRunId={testRunId}?sessionId=0 \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=' \
  -H 'Accept: application/json'

GET https://api.kobiton.com/v1/remediationRequests/all?sessionId={sessionId}&type={type}&isResolved={isResolved}&testRunId={testRunId}?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}&testRunId={testRunId}', {
    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}&testRunId={testRunId}?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}&testRunId={testRunId}', 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}&testRunId={testRunId}', 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}&testRunId={testRunId}?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}&testRunId={testRunId}

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_ASSERTION, TOUCH_TARGET_SIZE, COLOR_CONTRAST, CONTENT_LABELING (available for native Android/iOS application)
isResolved query boolean false Filtering only resolved/unresolved remediation requests. Will get all if it isn’t provided.
testRunId query integer false The test run ID of your Scriptless Automation.

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. Note: Can only create multiple reservations for legacy desktop device on private/local devices

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 POST https://api.kobiton.com/v1/reservations/terminate/all \
  -H 'Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='

POST 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: '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/reservations/terminate/all',
  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/reservations/terminate/all', params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E='
}
response = requests.post('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("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/all

Terminate all ACTIVATE reservations (public or private/local devices) in your organization.

Parameters

Parameter In Type Required Description
isPublic query boolean false Terminate ACTIVATE reservations on public devices in your organization if the isPublic parameter is true.

Responses

Status Meaning Description
200 OK You have terminated all reservations on public (or private/local) devices in the organization 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,
  "testCaseIds": [
    1,
    2,
    3
  ]
};
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,
  "testCaseIds": [
    1,
    2,
    3
  ]
};
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,
  "testCaseIds": [
    1,
    2,
    3
  ]
}

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.
» testCaseIds body [integer] false Specify the list of test case IDs used for each Manual session. If not specified, Scriptless Automation will run on the origin test case as in Manual session.

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

Security Banner

Get Security Banner


Sample request

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

GET https://api.kobiton.com/v1/security-banners 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/security-banners', {
    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/security-banners',
  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/security-banners', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/security-banners");
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 /security-banners

Get security banner for non trial org

Sample response

{
  "id": 1,
  "content": "Security warning",
  "acceptButtonText": "I accept the terms",
  "enableForAll": false,
  "createdAt": "2021-09-16T10:37:17.056Z",
  "updatedAt": "2021-09-16T10:37:17.056Z",
  "deletedAt": null
}

Responses

Status Meaning Description
200 OK Get security banner of user’s organization successfully
403 Forbidden Trial organization can not get security banner

Response Schema

Status Code 200

Name Type Required Description
id integer false No description
content string false No description
acceptButtonText string false No description
enableForAll boolean false No description
createdAt datetime false No description
updatedAt datetime false No description
deletedAt datetime false No description

Update Security Banner


Sample request

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

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

const inputBody = {
  "content": "Security warning",
  "acceptButtonText": "I accept the terms",
  "enableForAll": false
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

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

  return response.text()
}

sendRequest().then(function(body) {
  console.log('Response body:', body)
  })
const request = require('request');
const inputBody = {
  "content": "Security warning",
  "acceptButtonText": "I accept the terms",
  "enableForAll": false
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

request({
  url: 'https://api.kobiton.com/v1/security-banners',
  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/security-banners', 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/security-banners', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/security-banners");
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 /security-banners

Update security banner of organization, if organization does not have security banner, then create new security banner for that organization

Body data

{
  "content": "Security warning",
  "acceptButtonText": "I accept the terms",
  "enableForAll": false
}

Parameters

Parameter In Type Required Description
body body object true No description
» content body string true Security banner content
» acceptButtonText body string true Text of the accept button
» enableForAll body boolean true Determine security banner show for either newcomer or every user of organization

Responses

Status Meaning Description
200 OK Update security banner successfully
403 Forbidden Trial organization can not update security banner

Delete Security Banner


Sample request

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

DELETE https://api.kobiton.com/v1/security-banners HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=



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

};

async function sendRequest() {
  const response = await fetch('https://api.kobiton.com/v1/security-banners', {
    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/security-banners',
  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/security-banners', params: {
  }, headers: headers

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

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/security-banners");
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 /security-banners

Delete security banner of organization

Responses

Status Meaning Description
200 OK Delete security banner successfully
403 Forbidden User of trial organization can not delete security banner

Update User Accepted Security Banner


Sample request

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

PUT https://api.kobiton.com/v1/security-banners/accepted HTTP/1.1
Authorization: Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=
Content-Type: application/json

const inputBody = {
  "accepted": true
};
const headers = {
  'Authorization': 'Basic dGVzdHVzZXI6MTIzZWQtMTIzZmFjLTkxMzdkY2E=',
  'Content-Type':'application/json'

};

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

  return response.text()
}

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

};

request({
  url: 'https://api.kobiton.com/v1/security-banners/accepted',
  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/security-banners/accepted', 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/security-banners/accepted', params={

}, headers = headers)

print(response.json())
URL obj = new URL("https://api.kobiton.com/v1/security-banners/accepted");
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 /security-banners/accepted

Update user accepted security banner

Body data

{
  "accepted": true
}

Parameters

Parameter In Type Required Description
body body object true No description
» accepted body boolean true Determine whether use accepted security banner or not

Responses

Status Meaning Description
200 OK Update user accepted security banner successfully

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 dGVzdHVzZX