12-31-2020 06:31 AM
Hello all,
I have tried and failed to find great documentation for the CSPC XML API. I found another post that described how to get an inventory which was very helpful, but now I would like to add new devices (or discover them) programmatically.
If there is any good documentation on this API I would appreciate that too. The user guide basically just recognizes the API exists, and nothing else.
Or if there is a way to explore the API I don't know about, that would be useful.
Thank you!
05-11-2021 10:03 PM
Ever get anywhere with this request?
05-12-2021 07:20 AM - edited 05-12-2021 07:21 AM
Not super far. I started to inspect the API calls via the built in developer tools in Chrome, but CSPC compresses the data sent and received and I am having difficulty decompressing it with python. If you find a way to de-compress the body of the request and responses, please let me know!
05-12-2021 06:37 PM
Took a bit of a look through the XML API and managed to get a discovery to kick off via the use of the following XML run through the XML API Window. Note I had to take the Service name from our install, unsure if all instances are setup the same. Also have to build a unique value in the 'DiscoveryJob identifier' item for each job that gets run.
Hoping to spend some more time over the next couple of weeks to try and get something automated in our back end. Will update if I get anywhere.
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId="3333">
<Job service_name="SMARTNET_TOTAL_CARE">
<Schedule operationId="1">
<JobSchedule runnow="true"/>
<DiscoveryJob identifier="ipList">
<DiscoveryOptionsList>
<DiscoveryOptions>
<IPAddressList>
<IPAddress>10.1.1.1</IPAddress>
</IPAddressList>
</DiscoveryOptions>
</DiscoveryOptionsList>
</DiscoveryJob>
</Schedule>
</Job>
</Request>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide