Forum Discussion
Zero Touch Customer API Feature Request
{written in Gemini ;) who literally wrote this out perfectly}
I'm requesting an enhancement to the Android Device Provisioning API (Zero Touch) to include filtering capabilities, specifically the ability to filter devices by serial number (and other relevant fields) in the initial API call.
Current Situation:
Currently, the API lacks direct filtering. As demonstrated in the code below, to find a device by its serial number, we must:
- Make a call to list all devices for a customer.
- Iterate through the entire list of devices in the response to find the specific device.
- Iterate through any following pages if not found on the first page.
This is inefficient, especially for customers with a large number of provisioned devices.
const listDevicesUrl = `https://androidprovisioning.googleapis.com/v1/customers/${customerId}/devices`; // ... const listResponse = await fetch(listDevicesUrl, { ... }); const listData = await listResponse.json(); let foundDevice = null; if (listData && listData.devices) { foundDevice = listData.devices.find(device => device.deviceMetadata && device.deviceMetadata.serialNumber === serialNumber); }
Desired Feature:
I propose adding a filter parameter to the device listing API, allowing us to directly query for devices based on specific criteria, such as serial number, manufacturer, model, and IMEI.
For example, the API call could look like this:
https://androidprovisioning.googleapis.com/v1/customers/{customerId}/devices?filter=serialNumber={serialNumber}
This would significantly improve the efficiency of device management and reduce the amount of data that needs to be transferred and processed.
Benefits:
- Improved Efficiency: Reduces the number of API calls and the amount of data transferred.
- Faster Processing: Speeds up device identification and management operations.
- Reduced Load: Decreases the load on Google's API servers and client applications.
- Simplified Development: Makes it easier for developers to integrate with the API.
I believe that adding filtering capabilities to the Android Device Provisioning API would be a valuable improvement and would greatly benefit the Android Enterprise community.
Thank you for considering our request.
Related Content
- 2 years ago