When attempting to pull a list of devices from the API, if the first result contains a null value for one of the attributes, the API returns an error.
Sample query: SELECT Status,LastSystemUpTimePollUtc,ObjectSubType FROM Orion.Nodes ORDER BY ip WITH ROWS 1 TO 100 (modified)
Result via SWQL Studio:
Status LastSystemUpTimePollUtc ObjectSubType
1 NULL ICMP
1 NULL ICMP
1 2017-11-22 20:01:03.603 SNMP
Result via API pull in browser:
{"Message":"Cannot set Column 'LastSystemUpTimePollUtc' to be null. Please use DBNull instead.","ExceptionType":"System.ArgumentException","FullException":"System.ArgumentException: Cannot set Column 'LastSystemUpTimePollUtc' to be null. Please use DBNull instead.\u000d\u000a at System.Data.DataRow.set_Item(DataColumn column, Object value)\u000d\u000a at SolarWinds.InformationService.Serialization.DataTableSerializer.Serialize(IQueryExpr query, ISchema schema, IQueryResultReader reader)\u000d\u000a at SolarWinds.InformationService.Serialization.DataTableSerializer.PrepareSerialize(IQueryExpr query, ISchema schema, IQueryResultReader reader)\u000d\u000a at SolarWinds.InformationService.Core.InformationService.RunQuery(String query, IDictionary`2 parameters, IDataSerializer serializer)"}
Additional Test: If I perform a query and the first result doesn't have a null value for LastSystemUpTimePollUtc, the API pull works.