This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Orion.Accounts/UpdateAccount PropertyBag

Hello Orion SDK Community,

Happy Birthday THWACK!

Can anyone reveal the mystical properties of the "properties" propertybag argument of the "UpdateAccount" verb?

If possible in REST format? Also, (I'm not an expert with XML), is their a way to find this information through the XML namespace?

If there is, can you please illuminate me as if this information was available through the namespace, that would solve about 90% of my automation woes if I didn't have to bug anyone emoticons_happy.png.

Thank you and have a great Friday,

=swql

Parents
  • I believe I may have answered my own question:

    SELECT EntityName, PropertyName, Name, Value, Type, DisplayName, Description, InstanceType, Uri, InstanceSiteId

    FROM Metadata.PropertyMetadata

    WHERE EntityName = 'Orion.Accounts'

    Will test and see.

  • Here's the list. Most of these are also properties of Orion.Accounts.

    AccountEnabled

    DisableSessionTimeout

    AllowAdmin

    AllowNodeManagement

    AllowMapManagement

    AllowCustomize

    AllowReportManagement

    AllowAlertManagement

    AllowUnmanage

    AllowDisableAction

    AllowDisableAlert

    AllowDisableAllActions

    AlertSound

    LastLogin

    SummaryViewID

    HomePageViewID

    DefaultNetObject

    DefaultNetObjectID

    Expires

    ReportFolder

    AlertCategory

    AllowEventClear

    MenuName

    ToolsetIntegration

    GroupPriority

    AllowViewCopCheck

    NetPerfMon.VolumeDetailsViewID

    NetPerfMon.NodeDetailsViewID

    NetPerfMon.ContainerDetailsViewID

    NetPerfMon.ActiveAlertDetailsViewID

    NPM.InterfaceDetailsViewID

  • Hello tdanner,

    Thank you for that, I was using the following so far - do I have the syntax of the propertybag right? Or is this supposed to be in JSON format? Wasn't sure as sometimes the request expects XML string vs JSON.

    [

    "SOMEUSERNAME",

    "<dictionary xmlns=\"http://schemas.solarwinds.com/2007/08/informationservice/propertybag\"><item><key>Enabled</key><type>System.String</type><value>Yes</value></item><item><key>AllowNodeManagement</key><type>System.String</type><value>Yes</value></item><item><key>AllowMapManagement</key><type>System.String</type><value>Yes</value></item><item><key>AllowAdmin</key><type>System.String</type><value>Yes</value></item><item><key>CanClearEvents</key><type>System.String</type><value>Yes</value></item><item><key>AllowReportManagement</key><type>System.String</type><value>Yes</value></item><item><key>AllowCustomize</key><type>System.String</type><value>Yes</value></item><item><key>AllowUnmanage</key><type>System.String</type><value>Yes</value></item><item><key>AllowDisableAlert</key><type>System.String</type><value>Yes</value></item><item><key>AllowDisableAllActions</key><type>System.String</type><value>Yes</value></item><item><key>AccountType</key><type>System.String</type><value>1</value></item><item><key>AllowCopCheck</key><type>System.String</type><value></value></item><item><key>DisplayName</key><type>System.Boolean</type><value></value></item><item><key>Description</key><type>System.Boolean</type><value></value></item></dictionary>"

    ]

    Getting the following response:

    {

      "Message": "Verb Orion.Accounts.UpdateAccount cannot unpackage parameter 1 with type SolarWinds.InformationService.Addons.PropertyBag",

      "ExceptionType": "SolarWinds.InformationService.Verb.VerbExecutorException",

      "FullException": "SolarWinds.InformationService.Verb.VerbExecutorException: Verb Orion.Accounts.UpdateAccount cannot unpackage parameter 1 with type SolarWinds.InformationService.Addons.PropertyBag ---> Newtonsoft.Json.JsonSerializationException: Error converting value \"<dictionary xmlns=\"http://schemas.solarwinds.com/2007/08/informationservice/propertybag\"><item><key>Enabled</key><type>System.String</type><value>Yes</value></item></dictionary>\" to type 'SolarWinds.InformationService.Addons.PropertyBag'. Path ''. ---> System.ArgumentException: Could not cast or convert from System.String to SolarWinds.InformationService.Addons.PropertyBag.\r\n   at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)\r\n   at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)\r\n   --- End of inner exception stack trace ---\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)\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__DisplayClass22_0.<UnpackageParameters>b__0(Int32 index)\r\n   --- End of inner exception stack trace ---\r\n   at SolarWinds.InformationService.Verb.VerbExecutorContext.<>c__DisplayClass22_0.<UnpackageParameters>b__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(JArray parameters)\r\n   at SolarWinds.InformationService.Core.InformationService.Invoke[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)"

    }

    Thank you,

  • In this case we can just use json in the json. Like this:

    ["tdanner",{"AllowMapManagement":true}]

    Note that for the various "AllowXXX" properties you should use actual json booleans (true/false) and not the weird legacy "Y" and "N" values you get when you query Orion.Accounts.

  • Hello tdanner​,

    emoticons_happy.png - I appreciate the fast response and I'm severely happy with being able to use JSON for this.

    Thank you!

    =swql

  • Hello ,

    Is there a reason why it is not possible to update the account limitation via the verb? The only "reason" I could find is that the names of the properties are the "display names" in the "metadata.property" view (without spaces) and that the display names are empty for the account limitation fields

Reply
  • Hello ,

    Is there a reason why it is not possible to update the account limitation via the verb? The only "reason" I could find is that the names of the properties are the "display names" in the "metadata.property" view (without spaces) and that the display names are empty for the account limitation fields

Children
No Data