Rest API

For continued mobile development project Bitbar Cloud can be integrated to your continuous integration environment and tests run using a REST API rather than manually uploading and configuring test projects. Full API is available online (requires login).


Bitbar Testing provides a very powerful and useful API for its users to manage all aspects of mobile development and test automation. The API allows access to our device farm, manage projects, test runs and results, plus many other things over a RESTful architecture returning JSON structures with appropriate HTTP response codes.

By default all api responses are in JSON format. As this was not always the case many samples still include the header Accept: application/json which now is redundant.


Swagger is a tool for browsing and testing REST APIs in real-time inside a browser window. Users have to be logged in to access the API through Swagger. Public Cloud users can access Swagger at and Private and On-premise users at https://<your cloud>/cloud/swagger-ui.html.

Getting Started Examples

cURL is used in the following examples. cURL is a software providing a library and command-line tool for transferring data using various protocols. It can be downloaded from here.

By default all of the api calls respond in XML format. To switch to JSON_ format, include header Accept: application/json to the header.

Note that all request timeouts are in seconds.


This example shows how to get access to Bitbar using the API. Bitbar Testing API uses OAuth 2.0 - an open standard for authorization. The OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web apps. As it is seamlessly used with Bitbar Testing API, you can use it to authorize further API calls to our cloud back-end.

An optional, but better suited for shared scripts, is to identify user using the apiKey approach. An apiKey is a secret token that is available from Bitbar Testing from under My Account link. If needed the apiKey token can also be re-generate to invalidate old scripts.

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6:

Create a Bitbar Testing Project

To create a new project from the command line using cURL and apiKey:

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X POST -d "name=NewProject"

Project Listing

Returns project listing containing details, Test Runs and Device Runs (accept application JSON).

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET

Details of a Specific Project

Query the details of a specific project defined by the project’s id PROJECT_ID and authenticating using apiKey:

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET

Get Test Run Details

Get a test run’s details by authenticating using the apiKey:

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET

Get Details of Certain Device Run

Authenticating using the API key:

curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET