Continuous Testing allows device management using Rest API. The following are the supported Rest APIs for managing devices.
The role of the user performing the Rest Operation is specified by the 'Authorization' header.
For more information please visit How To Execute Rest API.
Get all Devices
Get the information of all the devices the user has access to.
GET /api/v1/devices |
---|
Get Devices by Query
Gets the devices' information based on device query.
This API returns devices which the user has access to.
Device query syntax reference: Device Queries
GET /api/v1/devices?query=@os='android' and starts-with(@model,'SM-') |
---|
Device query can be specified as parameter too.
GET /api/v1/devices |
---|
Parameter
Name | Type | Mandatory | Description |
---|---|---|---|
query | String | No | Returns all devices if not provided or empty string. |
Get Device
Gets the device information of the given id.
This API is available only for cloud admin.
GET /api/v1/devices/{id} |
---|
{id} - id of the device. DeviceId can be retrieved from the 'id' attribute of the /api/v1/devices API
Edit Device
Edit the device's name, notes or category.
This API is available only for cloud admin.
POST /api/v1/devices/{id} |
---|
{id} - id of the device. DeviceId can be retrieved from the 'id' attribute of the /api/v1/devices API
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
name | String | No | New name of the device |
notes | String | No | New notes of the device |
category | String | No | New category of the device (allowed categories: WATCH / TABLET / PHONE / UNKNOWN) |
Get Device Reservations
Get the device reservations of the specified device.
This API is available only for the cloud admin.
GET /api/v1/devices/{id}/reservations |
---|
{id} - id of the device
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
start | String | Yes | YYYY-MM-DD-hh-mm-ss as (2019-04-04-13-30-00) |
end | String | Yes | YYYY-MM-DD-hh-mm-ss |
current_timestamp | String | Yes | YYYY-MM-DD-hh-mm-ss |
Reserve Device
Reserves a device for the current user or the user with the userId if given.
If the reservation user has one project, the reservation project will be the user's project. Otherwise, the project id must be specified.
This API is available only for the cloud admin.
POST /api/v1/devices/{id}/reservations/new |
---|
{id} - id of the device
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
start | String | Yes | YYYY-MM-DD-hh-mm-ss |
end | String | Yes | YYYY-MM-DD-hh-mm-ss |
clientCurrentTimestamp | String | Yes | YYYY-MM-DD-hh-mm-ss |
userId | String | No | id of a user |
projectId | String | No | id of a project |
notes | String | No | a reason for this reservation |
Reserve Multiple Devices
Reserves multiple devices for the current user or the user with the userId if given.
If the reservation user has one project, the reservation project will be the user's project. Otherwise, the project id must be specified.
This API is available only for the cloud admin.
POST /api/v1/devices/reservations/new |
---|
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
devicesList | String | Yes | list of id of the device (as "8,235,54") |
start | String | Yes | YYYY-MM-DD-hh-mm-ss |
end | String | Yes | YYYY-MM-DD-hh-mm-ss |
clientCurrentTimestamp | String | Yes | YYYY-MM-DD-hh-mm-ss |
userId | String | No | id of a user |
projectId | String | No | id of a project |
notes | String | No | a reason for this reservation |
Release Device
Releases the device from its current user.
POST /api/v1/devices/{id}/release |
---|
{id} - id of the device
Reboot Device
Reboot the device.
This API is available only for cloud admin.
POST /api/v1/devices/{id}/reboot |
---|
{id} - id of the device
Reset USB Connection
Resets the USB Connection.
This API is available only for cloud admin
POST /api/v1/devices/{id}/resetusb |
---|
{id} - id of the device
Download App Container
(Only for iOS) - Download app container as a zip file, file name: '{bundle-id}.zip'
- The device must be reserved by User
- The app must be built for debugging
This API is available only for cloud admin.
GET /api/v1/devices/{id}/app-container/{bundle-id} |
---|
{id} - id of the device
{bundle-id} - bundle id of the application
Start web control on a specific device
Start web access control of the device
When choosing 'Debug' option - Grid must run (from the same user who ran the API)
This API is available only for cloud admin.
PUT /api/v1/devices/{id}/web-control |
---|
{id} - id of the device
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
type | String | Yes | 0-Manual, 1 - View, 2 - Automation, 3 - Debug |
emulatorInstanceName | String | No | Name for the emulator |