Hello Fellow Thwackers!!
I am working on using the API and have successfully got several working but we are having trouble with the following below. We are trying to update an action description but cannot get the API to work. We are receiving syntax errors which I provided below. We have tried so many different string values but it keeps returning the error shown below.
API Call:
/Invoke/Orion.Actions/UpdateActionsDescriptions
Code:
{
"actionsDescriptions": [
{
"Key": 0,
"Value": "string"
}
]
}
ERROR we are receiving:
SolarWinds.InformationService.Verb.VerbExecutorException: Verb Orion.Actions.UpdateActionsDescriptions cannot unpackage parameter 'actionsDescriptions' (#0) with type System.Collections.Generic.Dictionary`2[System.Nullable`1[System.Int32],System.String] ---> Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.Nullable`1[System.Int32],System.String]' because the type requires a JSON object (e.g. {\"name\":\"value\"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {\"name\":\"value\"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath 'actionsDescriptions'.\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.<>c__DisplayClass26_0.g__GetParameterByIndex|0(Int32 index)\r\n --- End of inner exception stack trace ---\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.<>c__DisplayClass26_0.g__GetParameterByIndex|0(Int32 index)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.CreateParameters(Func`2 getParameterAt, Int32 parametersCount, Stream stream)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.UnpackageParameters(JObject parameters)\r\n at SolarWinds.InformationService.Core.InformationService.Invoke[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)