We have some scripts that run some REST queries against Orion SDK/Rest API. These used to work but one of them started failing and when running in Postman we see toopleMetadata = null error?
The query we are trying to run is:
SELECT ContainerID, MemberPrimaryID, MemberEntityType, Name, Status, StatusInfo.StatusName FROM Orion.ContainerMembers, Orion.StatusInfo where ContainerMembers.Status = StatusInfo.StatusId and MemberEntityType = 'Orion.Groups'
This worked before but now fails:
{
"Message": "Value cannot be null.\r\nParameter name: toopleMetadata",
"ExceptionType": "System.ArgumentNullException",
"FullException": "System.ArgumentNullException: Value cannot be null.\r\nParameter name: toopleMetadata\r\n at SolarWinds.Data.Query.Toople..ctor(ToopleMetadata toopleMetadata)\r\n at SolarWinds.Data.Query.PhysicalQueryPlan.CrossProductOp.d__4.MoveNext()\r\n at SolarWinds.Data.Query.QueryStatisticsEnumerator.MoveNext()\r\n at SolarWinds.Data.Query.PhysicalQueryPlan.FilterOp.d__6.MoveNext()\r\n at SolarWinds.Data.Query.QueryStatisticsEnumerator.MoveNext()\r\n at SolarWinds.Data.Query.PhysicalQueryPlan.ProjectOp.d__7.MoveNext()\r\n at SolarWinds.Data.Query.QueryStatisticsEnumerator.MoveNext()\r\n at SolarWinds.Data.Query.PhysicalQueryPlan.PhysicalQueryPlan.d__4.MoveNext()\r\n at SolarWinds.InformationService.Core.InformationService.RowsCountingQueryResultReader.MoveNext()\r\n at SolarWinds.InformationService.Serialization.DataTableSerializer.Serialize(String query, IQueryExecutionPlan queryExecutionPlan, IQueryResultReader reader, Boolean isBase64EncodingAccepted, IMessageFormatterStrategy messageFormatterStrategy)\r\n at SolarWinds.InformationService.Core.InformationService.RunQuery(String query, IDictionary`2 parameters, IDataSerializer serializer, IMessageFormatterStrategy messageFormatterStrategy)"
}
We do another query:
SELECT Container.ContainerID as MemberPrimaryID
, Container.Name
, Container.Status
, Container.StatusDescription
, StatusInfo.StatusName
FROM Orion.Container, Orion.StatusInfo
WHERE Container.ContainerID NOT IN (
SELECT ContainerMembers.MemberPrimaryID
FROM Orion.ContainerMembers
WHERE MemberEntityType = 'Orion.Groups'
)
AND Container.Status = StatusInfo.StatusId
ORDER BY Name
And that continues to work fine returning the correct JSON response.
Any idea why the first fails and second succeeds?