Using Google Cloud Identity API > Devices > List request with filter to include a query by serial number works as expected for records where the serial number does not include spaces i.e. 5HCS8767 but will return an empty response if the serial number includes spaces such as in with VMWare VMs i.e. WMWARE-34 98 83 DE 38... etc.
The request is an http get request like so:
device_query = f'{device_endpoint_url}?filter=serial:{serial_number}&view=COMPANY_INVENTORY'
res = requests.get(device_query, headers=headers).json()
A successful response looks like this:
{'devices': [{'name': 'devices/jsihshd98ashd98ahsd', 'createTime': '1000-01-01T01:01:01.011Z', 'lastSyncTime': '1970-01-01T00:00:00Z', 'ownerType': 'COMPANY', 'deviceType': 'CHROME_OS', 'serialNumber': '<SERIAL NUMBER>', 'assetTag': '<ASSET TAG>'}], 'nextPageToken': '<NEXT PAGE TOKEN>'}
A response to querying a serial number with spaces, the return is empty.
I have tried urlencoding the serial with the same results.
Has anyone come across a similar situation?
Thanks,