cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Welcome to the Smart Net Total Care Community!

Our community includes Cisco experts to answer your questions about the Smart Net Total Care (SNTC) portal and CSP-Collector.
Click the navigation links below to access materials for using our service and supported collectors.

676
Views
0
Helpful
3
Replies
ekman
Beginner

Get Managed Devices via XML API for CSPC

Hello

 

I am trying to find if it is possible to fetch managed devices and their properties such as SNMP version through the XML API in the CSPC platform. I have gone through the User Guide but cannot seem to find any guides how to establish a connection to the CSPC plattform through scripts, or which XML call to perform to get a complete list of devices.

 

Is this possible with the CSPC platform?

BR

Rasmus

1 ACCEPTED SOLUTION

Accepted Solutions
iportuga
Cisco Employee

Hi Rasmus,


It is possible. The CSPC XML API is available in this URL endpoint: https://{{CSPC-host}}:8001/cspc/xml

 

Request samples:

 

<!-- Get device list -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceList all="true" /> </Get> </Manage> </Request>

 

 

<!-- Get all credentials profile list -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceCredentialList all="true" /> </Get> </Manage> </Request>

 

<!-- Get one or multiple credential profiles details -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceCredentialList> <DeviceCredential identifier="SNMPv3_credential" /> <DeviceCredential identifier="SNMPv2c_credential" /> <DeviceCredential identifier="SSH_credential" /> </DeviceCredentialList> </Get> </Manage> </Request>

 

Regards,
Igor

 

 

View solution in original post

3 REPLIES 3
iportuga
Cisco Employee

Hi Rasmus,


It is possible. The CSPC XML API is available in this URL endpoint: https://{{CSPC-host}}:8001/cspc/xml

 

Request samples:

 

<!-- Get device list -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceList all="true" /> </Get> </Manage> </Request>

 

 

<!-- Get all credentials profile list -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceCredentialList all="true" /> </Get> </Manage> </Request>

 

<!-- Get one or multiple credential profiles details -->
<Request xmlns="http://www.parinetworks.com/api/schemas/1.1" requestId=""> <Manage> <Get operationId="1"> <DeviceCredentialList> <DeviceCredential identifier="SNMPv3_credential" /> <DeviceCredential identifier="SNMPv2c_credential" /> <DeviceCredential identifier="SSH_credential" /> </DeviceCredentialList> </Get> </Manage> </Request>

 

Regards,
Igor

 

 

View solution in original post

ekman
Beginner

Hello Igor!


Thanks a lot for the help, it does solve my needs at this point completely. Follow up question, when I try to browse to the URL you provided in the start, I get a 405 error back. Do I need to CURL the URL from the CLI in order to get the available APIs?

 

Do you have any documentation in terms of what is required in the header/cookies to perform API calls. If you do not have any available documentation I will just have to do some digging to see which fields are sent to and from the CSPC when I perform the API calls manually through the GUI.

 

HTTP Status 405 – Method Not Allowed


Type Status Report

Message Method Not Allowed

Description The method received in the request-line is known by the origin server but not supported by the target resource.


Apache Tomcat/8.5.51

For the sample requests, the supported HTTP method is POST

Create
Recognize Your Peers
Right-rail
Navigation
Be sure to bookmark these support pages and use them in the future to find all the self-help information.
Helpful Links