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.NodesCustomProperties.CreateCustomProperty "Usages" syntax and values

Hi THWACK community,

Does anyone know the correct values and construction for the Usages argument of the CreateCustomProperty verb? I'm looking to fully understand it so that I can translate the knowledge into any language I have to use in the future.

This is similar to another old post, but I couldn't reply to it: https://thwack.solarwinds.com/product-forums/the-orion-platform/f/orion-sdk/45467/what-is-syntax-for-usages-dictionary

The Schema listed in the OrionSDK github site for this verb is pending completion: http://solarwinds.github.io/OrionSDK/2020.2/schema/Orion.NodesCustomProperties.html

The default value for this field will create a Custom Property with the following:

I've tried combinations of the following (removed the opening less-than signs of the XML so that it would print in the code block)

ArrayOfKeyValueOfstringboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
{
  "IsForAlerting": true,
  "IsForFiltering": true,
  "IsForGrouping": true,
  "IsForReporting": true,
  "IsForEntityDetail": true,
  "IsForAssetInventory": true
}
/ArrayOfKeyValueOfstringboolean>

ArrayOfKeyValueOfstringboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
[
  {"IsForAlerting": true},
  {"IsForFiltering": true},
  {"IsForGrouping": true},
  {"IsForReporting": true},
  {"IsForEntityDetail": true},
  {"IsForAssetInventory": true}
]
/ArrayOfKeyValueOfstringboolean>

Based on the example on the SwaggerUI page: https://solarwinds.github.io/OrionSDK/swagger-ui/#/Verbs/OrionAPMApplicationCustomPropertiesCreateCustomProperty
...I tried:

ArrayOfKeyValueOfstringboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
[
  {
    "Key": "IsForAlerting",
    "Value": true
  },
  {
    "Key": "IsForFiltering",
    "Value": false
  },
  {
    "Key": "IsForGrouping",
    "Value": false
  },
  {
    "Key": "IsForReporting",
    "Value": false
  },
  {
    "Key": "IsForEntityDetail",
    "Value": false
  },
  {
    "Key": "IsForAssetInventory",
    "Value": true
  }
]
/ArrayOfKeyValueOfstringboolean>

Haven't had any luck yet.

Also, if someone knows the above, do you also know what the name would be for the "Account Limitations" usage?

  • We had a THWACKcamp 2018 episode that talked about these (at least insofar as PowerShell is concerned. There's an API for That: Introduction to the SolarWinds Orion API.  Somewhere around the 18:00 minute mark, we discuss Custom Properties.

    In PowerShell a Dictionary Item is a Hashtable, in other languages it might be different, but you've got the general mechanics correct:

    $Usages = @{
        IsForAlerting       = $true
        IsForAssetInventory = $true
        IsForEntityDetail   = $true
        IsForFiltering      = $true
        IsForGrouping       = $true
        IsForReporting      = $true
    }

    And JSON like this would look something like this:

    {
      "IsForReporting": true,
      "IsForGrouping": true,
      "IsForAssetInventory": true,
      "IsForEntityDetail": true,
      "IsForFiltering": true,
      "IsForAlerting": true
    }

    If you want to do this DIRECTLY within SWQL Studio (using XML), I'd probably recommend against it.  It should be able to work, but I stay away from any of the XML stuff these days. The formatting is so finicky. 

  • Also, if someone knows the above, do you also know what the name would be for the "Account Limitations" usage?

    I am also looking for this information? Does anybody know anything about how to enable that property?