REST Resource: projects.locations.devices

Resource: Device

A single routable device configuration in the catalog.

JSON representation
{
  "name": string,
  "displayName": string,
  "manufacturer": string,
  "modelCode": string,
  "platform": enum (Platform),
  "hardwareType": enum (HardwareType),
  "formFactor": enum (FormFactor),
  "osVersion": string,
  "primaryScreen": {
    object (ScreenMetrics)
  },
  "supportedProducts": [
    {
      object (SupportedProduct)
    }
  ],
  "lifecycle": {
    object (Lifecycle)
  },
  "labels": {
    string: string,
    ...
  },
  "availability": {
    object (DeviceAvailability)
  },

  // Union field platform_details can be only one of the following:
  "androidDetails": {
    object (AndroidDeviceDetails)
  },
  "iosDetails": {
    object (IosDeviceDetails)
  }
  // End of list of possible types for union field platform_details.
}
Fields
name

string

Identifier. Identifies the device resource. Format: projects/{project}/locations/{location}/devices/{device}. The {device} segment is an opaque, stable string. Clients must not parse it to derive or assume device-specific details.

displayName

string

Output only. Provides a human-readable display name, e.g. "Pixel 5".

manufacturer

string

Output only. Specifies the hardware manufacturer of the device.

modelCode

string

Output only. Provides a human-readable model identifier for this device, independent of OS version. May be empty.

Platform-dependent: * Android physical: hardware codename (android.os.Build.DEVICE), e.g. "shiba". * Android virtual: AVD model identifier, e.g. "MediumPhone.arm". * iOS: model identifier, e.g. "iphone14pro".

platform

enum (Platform)

Output only. Specifies the platform of the device.

hardwareType

enum (HardwareType)

Output only. Indicates whether the device is physical or virtual.

formFactor

enum (FormFactor)

Output only. Specifies the form factor of the device.

osVersion

string

Output only. Specifies the OS version, e.g. "30" (Android API level) or "17.4" (iOS).

primaryScreen

object (ScreenMetrics)

Output only. Measurements of the primary device screen. Informational only. Unset for devices without a screen (e.g. some wearables).

supportedProducts[]

object (SupportedProduct)

Output only. Products/Services supported by this device.

lifecycle

object (Lifecycle)

Output only. The device lifecycle (maturity stage and removal date).

labels

map (key: string, value: string)

Output only. Additional information. Informational only. May change over the lifecycle of a device.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

availability

object (DeviceAvailability)

Output only. Reports the current fleet availability for this device configuration.

Union field platform_details. Contains platform-specific attributes. The field that is set matches platform. It is type-safe, so an iOS device can never carry Android-only fields. Filterable via dot-path, for example android_details.build_type = "userdebug". platform_details can be only one of the following:
androidDetails

object (AndroidDeviceDetails)

Output only. Contains Android-specific attributes (set when platform == ANDROID).

iosDetails

object (IosDeviceDetails)

Output only. Contains iOS-specific attributes (set when platform == IOS).

AndroidDeviceDetails

Android-specific device attributes.

JSON representation
{
  "buildType": string,
  "supportedAbis": [
    string
  ]
}
Fields
buildType

string

Output only. Mirrors the AOSP ro.build.type property, e.g. "user", "userdebug", "eng". Empty if unknown.

supportedAbis[]

string

Output only. Lists ABIs supported by the device (android.os.Build.SUPPORTED_ABIS), most preferred first, e.g. "arm64-v8a".

IosDeviceDetails

This type has no fields.

iOS-specific device attributes. Reserved for future iOS-only fields.

Platform

The platform of a device.

New values may be added in the future.

Enums
PLATFORM_UNSPECIFIED Platform not specified.
ANDROID Android.
IOS iOS.

HardwareType

Whether a device is physical or virtual.

New values may be added in the future.

Enums
HARDWARE_TYPE_UNSPECIFIED Hardware type not specified.
PHYSICAL Physical hardware device.
VIRTUAL Virtual device (emulator / simulator).

FormFactor

The form factor of a device.

New values may be added in the future.

Enums
FORM_FACTOR_UNSPECIFIED Form factor not specified.
PHONE Phone.
TABLET Tablet.
WEARABLE Wearable (e.g. watch).
TV TV.

ScreenMetrics

Screen measurements of a device.

JSON representation
{
  "densityDpi": integer,
  "widthPx": integer,
  "heightPx": integer
}
Fields
densityDpi

integer

Output only. Pixel density in dots per inch (dpi).

widthPx

integer

Output only. Width in pixels.

heightPx

integer

Output only. Height in pixels.

SupportedProduct

Declares that a device supports a given Device Cloud product, with optional per-product metadata. Discriminated by which product-specific message is set; adding a new product = new oneof arm + new per-product message.

JSON representation
{

  // Union field product can be only one of the following:
  "automation": {
    object (AutomationSupport)
  },
  "deviceStreaming": {
    object (DeviceStreamingSupport)
  }
  // End of list of possible types for union field product.
}
Fields
Union field product. Encapsulates the supported product and its per-product metadata. product can be only one of the following:
automation

object (AutomationSupport)

Output only. Represents Automation, which is DeviceRun-backed automated test execution.

deviceStreaming

object (DeviceStreamingSupport)

Output only. Represents DeviceStreaming, which is interactive remote device streaming.

AutomationSupport

This type has no fields.

Per-product metadata for the Automation (DeviceRun) product.

DeviceStreamingSupport

Per-product metadata for the DeviceStreaming product.

JSON representation
{
  "minimumAndroidStudioVersion": string
}
Fields
minimumAndroidStudioVersion

string

Output only. Specifies the minimum Android Studio version that supports this device. Optional; only set when the device is known to work only at or above a certain Android Studio version. Expected format "major.minor.micro.patch", e.g. "5921.22.2211.8881706".

Lifecycle

Device lifecycle: maturity state plus key lifecycle dates.

JSON representation
{
  "state": enum (State),
  "removalDate": {
    object (Date)
  }
}
Fields
state

enum (State)

Output only. Specifies the current maturity state of the device.

removalDate

object (Date)

Output only. Specifies the date the device is scheduled to be removed from the catalog. Only set when state == DEPRECATED.

State

Maturity state of a device in the catalog.

New values may be added in the future.

Enums
STATE_UNSPECIFIED State not specified.
PREVIEW Early access device. This device may have reduced stability and availability.
ACTIVE Generally available.
DEPRECATED Still usable, but scheduled for removal.

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values.
  • A month and day, with a zero year (for example, an anniversary).
  • A year on its own, with a zero month and a zero day.
  • A year and month, with a zero day (for example, a credit card expiration date).

Related types:

JSON representation
{
  "year": integer,
  "month": integer,
  "day": integer
}
Fields
year

integer

Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

month

integer

Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

day

integer

Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

DeviceAvailability

Fleet availability for a device configuration.

JSON representation
{
  "capacity": enum (Capacity),
  "available": enum (Availability)
}
Fields
capacity

enum (Capacity)

Output only. Specifies the current capacity bucket for this device configuration.

Represents the total number of online devices (idle or in use).

available

enum (Availability)

Output only. Specifies the current availability bucket (idle, immediately allocatable devices) for this device configuration.

This is a best-effort snapshot, refreshed periodically. It fluctuates depending on traffic as other requests allocate devices.

Capacity

Capacity based on the number of online devices in the lab.

New values may be added in the future.

Enums
CAPACITY_UNSPECIFIED The value of device capacity is unknown or unset.
CAPACITY_NONE

No online devices of this configuration.

These devices are unavailable either temporarily or permanently and should not be requested. If the device is also marked as deprecated, this state is very likely permanent.

CAPACITY_LOW

Devices that are low in capacity (the lab has a small number of these devices).

These devices may be used if users need to test on this specific device model and version. Please note that due to low capacity, the tests may take much longer to finish, especially if a large number of tests are invoked at once. These devices are not suitable for test sharding.

CAPACITY_MEDIUM

Devices that are medium in capacity (the lab has a decent number of these devices, though not as many as high capacity devices).

These devices are suitable for fewer test runs (e.g. fewer than 100 tests) and only for low shard counts (e.g. less than 10 shards).

CAPACITY_HIGH

Devices that are high in capacity (the lab has a large number of these devices).

These devices are generally suggested for running a large number of simultaneous tests (e.g. more than 100 tests).

Please note that high capacity devices do not guarantee short wait times due to several factors: 1. Traffic (how heavily they are used at any given moment). 2. High capacity devices are prioritized for certain usages, which may cause user tests to be slower than selecting other similar device types.

Availability

Describes how many idle devices are available for allocation.

New values may be added in the future.

Enums
AVAILABILITY_UNSPECIFIED The value of availability is unknown or unset.
AVAILABILITY_NONE

No devices of this configuration are currently idle.

A request can still be made, but it will queue until a device frees up. Expect longer wait times, and avoid requesting many devices at once (e.g. high shard counts).

AVAILABILITY_LOW

A small number of devices are currently idle.

Suitable for a few concurrent requests. Larger bursts (e.g. many shards) may queue until devices free up.

AVAILABILITY_MEDIUM

A moderate number of devices are currently idle.

Suitable for a moderate number of concurrent requests. Very large bursts may still queue.

AVAILABILITY_HIGH

Many devices are currently idle.

Suitable for a large number of concurrent requests with little to no queueing at the moment of observation.

Methods

get

Returns information about a specific device.

list

Lists all devices.