Hey,
We are looking to have new builds imported with CHEF code and I am having a hard time finding a short API call that can be launched to start a discovery of the new node and assign the credential to use.
Unfortunately there is no short API call that can do this. But you can build a script that will do that the job and call that from chef. I recommend using the Discovery API for this.
Docs: Discovery · solarwinds/OrionSDK Wiki · GitHub
PowerShell sample: https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/DiscoverSnmpV3Node.ps1
Python sample: orionsdk-python/discover_one_node.py at master · solarwinds/orionsdk-python · GitHub
Those samples say "SNMPv3" not WMI, but the only real difference is whether you specify SNMPv3 credentials or Windows credentials.
If you are using the same credentials for monitoring all of these nodes (either because they are in the same Active Directory (good) or all using the same local Administrator password (bad)) then you just need to provide the credential ID. You can put it in the script or have the script query for it by name.
If you are using unique credentials for every node, then you will need to have the script import those credentials before you can use them to add a node. Credential Management · solarwinds/OrionSDK Wiki · GitHub