Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Update Alert Notes via SDK

$
0
0

Ahoy,

I am trying to figure out how I can update an alert's note via the SDK and I'm not having much luck getting it done. I am trying to integrate a specific alert with our ticket system so that when a ticket is opened on this specific alert, the ticket system performs an HTTP POST to Orion to post the ticket ID into the alert notes. Now, I know that there seem to be two types of 'notes' in alerts - the view in the database shows 'Notes' and 'AlertNotes'. I want to be able to overwrite whatever is in the 'Notes' column with just the 6-digit ticket ID. Here is what I have so far:

 

I copied a previously configured POST update from my ticket system which updates some custom properties, but replaced the SWIS URL with what I thought was the right schema. As a test, I am using cURL on a server to make the POST:

 

curl -v -X POST -H "Content-Type: application/json" -k -u user:pass -d '{"Notes":"123456"}' https://orion-server:17778/SolarWinds/InformationService/v3/Json/swis://orion-server/Orion/Orion.AlertStatus/AlertObjectID=7849

 

This is the error that I get back:

 

{"Message":"Invalid key properties specified for entity Orion.AlertStatus.\u000d\u000aParameter name: filter","ExceptionType":"System.ArgumentException","FullException":"System.ArgumentException: Invalid key properties specified for entity Orion.AlertStatus.\u000d\u000aParameter name: filter\u000d\u000a   at SolarWinds.InformationService.Core.SwisUriResolver.ValidateAndResolveFilter(IEntityType entity, SwisUriFilter filter, Boolean isHosted)\u000d\u000a   at SolarWinds.InformationService.Core.SwisUriResolver.ValidateAndResolveUri(SwisUri uri, IQueryExecutionContext context)\u000d\u000a   at SolarWinds.InformationService.Core.SwisUriResolver.GetResolver(SwisUri uri, Boolean queryKeysOnly, IQueryProcessor queryProcessor, IQueryPlanCache queryPlanCache, IQueryExecutionContext context)\u000d\u000a   at SolarWinds.InformationService.Core.CrudProcessor.Update(SwisUri uri, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\u000d\u000a   at SolarWinds.InformationService.Core.InformationService.Update(S*

 

I am not sure what this all means. Any assistance understanding will be much appreciated.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>