Manage Pools
Use client.pools() to create a pool, delete a pool or change which devices belong to it. Pool membership operations identify devices by serial number.
SDK Methods
Operation | Java | Node.js | Returns |
|---|---|---|---|
Create pool | client.pools().create(request) | await client.pools().create(request) | Pool |
Delete pool | client.pools().delete(poolId) | await client.pools().delete(poolId) | void |
Add devices | client.pools().addDevices(poolId, serials) | await client.pools().addDevices(poolId, serials) | Device serial list |
Remove devices | client.pools().removeDevices(poolId, serials) | await client.pools().removeDevices(poolId, serials) | Device serial list |
Create a Pool
name is required, must not be blank and must be unique for the authenticated account.
CreatePoolRequest request = CreatePoolRequest.builder()
.name("Android Regression")
.build();
Pool pool = client.pools().create(request);
System.out.println(pool.id() + " - " + pool.name());The SDK sends { "name": "Android Regression" } as JSON to POST /management/api/v1/public/pools and returns the created Pool.
Add Devices
Pass a non-empty serial list. The endpoint receives each serial as a repeated query parameter and has no request body:
POST /management/api/v1/public/pools/pool-123/devices?serials=SERIAL-1&serials=SERIAL-2List<String> serials = Arrays.asList("SERIAL-1", "SERIAL-2");
List<String> devicesInPool = client.pools().addDevices("pool-123", serials);The returned list contains the device serials in the pool after the add operation.
Remove Devices
Removing a device only removes its pool membership. It does not delete the physical device.
DELETE /management/api/v1/public/pools/pool-123/devices?serials=SERIAL-1List<String> remainingSerials = client.pools().removeDevices(
"pool-123",
Collections.singletonList("SERIAL-1")
);The returned list contains the serials remaining in the pool.
Delete a Pool
client.pools().delete("pool-123");Deleting a pool does not delete its devices. The devices return to the available inventory and the deleted pool id must no longer be used as devicePoolId.
Validation and Errors
- create(...) rejects a missing or blank name before sending the request.
- delete(...), addDevices(...) and removeDevices(...) reject a missing or blank poolId.
- Membership methods reject a null or empty serial list.
- Device Park reports duplicate names, unknown pools, unknown serials and authorization failures through its normal HTTP error response.