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 https://cloud.bitbar.com/cloud/swagger-ui.html and
Private and On-premise users at
Available API Clients¶
Getting Started Examples¶
By default all of the api calls respond in XML format. To switch to
JSON_ format, include header
Accept: application/json to the
Note that all request timeouts are in seconds.
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" https://cloud.bitbar.com/api/me/projects
Returns project listing containing details, Test Runs and Device Runs (accept application JSON).
curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET https://cloud.bitbar.com/api/me/projects
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 https://cloud.bitbar.com/api/me/projects/PROJET_ID
Get Test Run Details¶
Get a test run’s details by authenticating using the apiKey:
curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET https://cloud.bitbar.com/api/me/projects/PROJECT_ID/runs
Get Details of Certain Device Run¶
Authenticating using the API key:
curl -H "Accept: application/json" -u xYY5hsdPXAXsBBd1G3ijnb18wlqPeOA6: -X GET https://cloud.bitbar.com/api/me/projects/PROJECT_ID/runs/RUN_ID/device-runs