GetDashboardDeviceInfo
GetDashboardDeviceInfo is used to get the details for one or more devices in the system. Usually it is used in other calls, but you can also use it to inspect the state of a current device. It has a flexible input format to allow devices to be identified in different ways and will return a list of matching devices. You should limit the number of devices requested in a single call to 1000. Requests larger than 1000 should use successive calls to the web service. The equivalent option in the dashboard is the details displayed on the Device details tab for a device.
Signature
ServiceResponse GetDashboardDeviceInfo (CallingContext callingContext, GetDashboardDeviceInfoInput input, out GetDashboardDeviceInfoResult result);
Data structure
The GetDashboardDeviceInfoInput data structure uses an enumeration to tell the service which input to use and how to interpret it. You can call this API with a specific list of device IDs if you know them. However, you may not be maintaining the list of GUIDs that identify each device in the system. Instead, you may have given each device a unique device name or put your own unique identifier in one of the custom fields. In any case, you must tell the call how to interpret the data in the array. To tell the service how to interpret the FieldData array, set the whichField property to the appropriate enumeration: EntityId, EntityName, Custom1, Custom2, or Custom3.
[DataContract]
public class GetDashboardDeviceInfoInput
{
[DataMember]
public EntityInfoInputFormat WhichField;
[DataMember]
public string[] FieldData;
}
public enum EntityInfoInputFormat
{
EntityIds,
EntityName,
Custom1,
Custom2,
Custom3
}
Result
In addition to the BaseServiceResult described in General API structure, GetDashboardDeviceInfoResult is an array of DashboardDeviceInfo and GetInfoErrorDetails structures. The DashboardDeviceInfo structure is a collection of information about the device at the time of the call, and GetInfoErrorDetails contains information on which field could not be resolved to device information. This is important because it is possible that multiple results could be returned for a specific input field (such as Custom1), however, other inputs might not return anything. There may not be a one-to-one correspondence between input field and output results. The GetInfoErrorDetails structure identifies which fields did not result in device information being returned.
Any values which are of type DateTime which do not yet have a valid value, for example, if the device has never been canceled, are returned as the minimum DateTime defined in SQL. DateTime structures cannot be null. Currently, the minimum DateTime is 01-01-1980.
If a device is assigned to a QuickCache, the QuickCacheAllocatedId and name will be filled in. The ID will be the empty GUID if the device is not assigned to a QuickCache. If the device has used a QuickCache, the QuickCacheLastUsedId and name will be filled in. These will generally be the same, but it could be different if the allocated QuickCache has changed and the device has not connected to the new one yet. The time the device last reported being connected to the QuickCache and if that was the last time the device reported status are also available.
[DataContract]
public class GetDashboardDeviceInfoResult : BaseServiceResult
{
public GetDashboardDeviceInfoResult()
{
}
[DataMember]
public DashboardDeviceInfo[] DeviceInfo;
[DataMember]
public GetInfoErrorDetails[] ErrorDetails;
}
[DataContract]
public struct DashboardDeviceInfo
{
[DataMember]
public Guid DeviceId;
[DataMember]
public string DeviceName;
[DataMember]
public string UserEmail;
[DataMember]
public string Custom1;
[DataMember]
public string Custom2;
[DataMember]
public string Custom3;
[DataMember]
public string CompanyName;
[DataMember]
public Guid CompanyId;
[DataMember]
public Guid UserGroupId;
[DataMember]
public string UserGroupName;
[DataMember]
public Guid PartnerId;
[DataMember]
public string PartnerName;
[DataMember]
public string UserFirstName;
[DataMember]
public string UserLastName;
[DataMember]
public Guid PolicySetId;
[DataMember]
public string PolicySetName;
[DataMember]
public int StorageQuotaGB;
[DataMember]
public long ClientUsageBytes;
[DataMember]
public DateTime LastBackupUtc;
[DataMember]
public string ClientVersion;
[DataMember]
public DateTime LastCompleteBackupUtc;
[DataMember]
public DateTime InitialActivationDateUtc;
[DataMember]
public string LastActivationCode;
[DataMember]
public DeviceState State;
[DataMember]
public DateTime LastResetUtc;
[DataMember]
public DateTime CreatedDateUtc;
[DataMember]
public DateTime CancelledDateUtc;
[DataMember]
public Guid QuickCacheAllocatedId;
[DataMember]
public string QuickCacheAllocatedName;
[DataMember]
public Guid QuickCacheLastUsedId;
[DataMember]
public string QuickCacheLastUsedName;
[DataMember]
public DateTime QuickCacheLastKnownConnectedTimeUtc;
[DataMember]
public bool QuickCacheConnectedAtLastStatus;
}
[DataContract]
public struct GetInfoErrorDetails
{
[DataMember]
public string InputField;
[DataMember]
public GetInfoErrorResult ErrorResult;
[DataMember]
public string AdditionalInfo;
}