Hi, I've done a lot of research, I couldn't find a detalied white paper on how to programatically create NCM jobs through the API (REST, SWIS ?).
Is this feasible ? Please help
I found : Cirrus.NCM_NCMJobs so I guess we have to use the verb addJob with some of the listed properties ?
Which properties are mandatory/optional ? Is there any guidance on how to fill the properties values ?
Here are the docs: NCM Config Transfer · solarwinds/OrionSDK Wiki · GitHub
And here is some sample code in PowerShell: OrionSDK/NCM.ExecuteScript.ps1 at master · solarwinds/OrionSDK · GitHub
Ok this is fantastic. But what about the jobs ? Otherwise I'll just execute scripts when the time comes to this but I'm curious :
- can we create jobs ?
- can we list all jobs ? (I'd like to delete the older ones since it can't be done in the web app)
- I couldn't find verbs related to listing the actual jobs in the schema. So how could one know the ID of a job ?
I want to do it in REST. I code in Perl It's been easy so far, I hope I can achieve the transactions this way.
Also I was wondering how to translate from the schema to /SolarWinds/InformationService/v3/Json/Invoke/
For instance, NCM_NCMJobs .. ? Is this covered somewhere or is there a logic I didn't get yet ?
So many questions ...
Hi Tim, ok I'm finally getting things done.
One last question , how can I find which params are required for the verbs ? For instance, AddJob in NCM_NCMJobs ? All of them ? The doc doesn't specifiy.
tdanner
I also want to automate my job creation, doing it manually takes too long. Where can we get a reference of the SolaerWinds.NCM.Contracts.InformationService.NCMJob class. I have no idea what is expected as an input here. I am guessing it is XML like the HardwareItem class example
I wish they can help us with this request, some day. Last time I asked my account manager, she told me I can pay a third party company for a training on how to use the API ... This is so disappointing.
For calling AddJob through SWQL Studio or PowerShell, the XML format for an NCMJob object would be needed. For REST, json format would be needed.
The NCMJob object is pretty complex - it has dozens of fields, some of which are sub-objects with still more fields. This API was, frankly, not designed with customer use in mind.
If you are planning on automating job creation, I assume you are creating many similar jobs that just vary in terms of which nodes are targeted or schedule/notification details. If this is true, then you can create an example job in the UI and then use the GetJob verb to get its representation in XML (SWQL Studio or PowerShell) or JSON (HTTPS). The field names look reasonable to me, so hopefully you will be able to see how to generate your variations. If not, just ask here.