Get Device
4 min
use this method when you already know a device serial and need its current details this is useful immediately before creating an allocation or when checking whether a stored serial is still visible to the current credentials before you begin get the serial from list devices /devices/list devices or from your own device configuration sdk method java node js client devices() get(serial) await client devices() get(serial) parameter parameter required description serial yes exact serial returned by list devices examples device device = client devices() get("r58m123456a"); system out println(device marketname()); system out println(device state()); system out println(device issimulator()); system out println(device ispublic());const device = await client devices() get("r58m123456a"); console log(device marketname, device state, device issimulator, device ispublic); result returns one device issimulator identifies simulator records and ispublic describes public visibility both fields can be null when the server does not provide the value a device being visible does not automatically reserve it create an allocation before starting a test session if the serial does not exist or is not visible to the credentials, the sdk reports the device park response as an error continue with create allocation /allocations/create allocation
