I'm struggling to figure out how the smart device management API works. The end goal is to fetch a status of my nest thermostat on an ongoing basis for logging purposes, using service account credentials:
await using var stream = new FileStream(path, FileMode.Open, FileAccess.Read);
var credential = GoogleCredential.FromStream(stream)
.CreateScoped(SmartDeviceManagementService.ScopeConstants.SdmService);
var service = new SmartDeviceManagementService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential
});
This appears to be correct, however when I try and call service.Enterprises.Devices.List()
it requires a parent ID in the format of "^enterprises/[^/]+/devices/[^/]+$
But I do not know how to acquire this parent ID to begin testing my code.
Does anyone know how to obtain these strings which seem to be necessary to use the API?