ServiceNow CUCM Integration - Need API endpoint for all records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 02:01 PM
I'm successfully able to retrieve information of one device from ServiceNow using SOAP,
Any idea on what SOAP method & body should I use to retrieve the information of all the devices hosted on the node using RISService70 ?
One Device:
Soap Method - selectCmDeviceExt
- Labels:
-
Other Services Topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 02:01 PM
Sample Body - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:selectCmDeviceExt>
<soap:StateInfo></soap:StateInfo>
<soap:CmSelectionCriteria>
<soap:MaxReturnedDevices>2000</soap:MaxReturnedDevices>
<soap:DeviceClass>Any</soap:DeviceClass>
<soap:Model>255</soap:Model>
<soap:Status>Any</soap:Status>
<soap:NodeName></soap:NodeName>
<soap:SelectBy>Name</soap:SelectBy>
<soap:SelectItems>
<!--Zero or more repetitions:-->
<soap:item>
<soap:Item>*******</soap:Item>
</soap:item>
</soap:SelectItems>
<soap:Protocol>Any</soap:Protocol>
<soap:DownloadStatus>Any</soap:DownloadStatus>
</soap:CmSelectionCriteria>
</soap:selectCmDeviceExt>
</soapenv:Body>
</soapenv:Envelope>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 07:19 AM - edited 01-07-2025 10:59 AM
@prakashJangam
To retrieve information about all devices hosted on the node using RISService70 and the selectCmDeviceExt method, you need to modify your SOAP request to include wildcard patterns or a broader scope in the query criteria. Here's how you can structure your SOAP body for this purpose:
SOAP Method: selectCmDeviceExt
SOAP Body Example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<ns:selectCmDeviceExt>
<StateInfo></StateInfo>
<CmSelectionCriteria>
<MaxReturnedDevices>1000</MaxReturnedDevices>
<DeviceClass>Any</DeviceClass>
<Model>255</Model> <!-- 255 for all models -->
<Status>Any</Status>
<NodeName>ALL</NodeName> <!-- Use ALL to query all nodes -->
<SelectBy>IPV4ADDRESS</SelectBy>
<SelectItems>
<item>
<Item>*</Item> <!-- Wildcard to retrieve all devices -->
</item>
</SelectItems>
<Protocol>Any</Protocol>
</CmSelectionCriteria>
<ReturnedTags>
<Name></Name>
<Description></Description>
<Product></Product>
<Model></Model>
<Class></Class>
<NodeName></NodeName>
<IPAddress></IPAddress>
<MACAddress></MACAddress>
<Status></Status>
<Protocol></Protocol>
<ActiveLoadID></ActiveLoadID>
<InactiveLoadID></InactiveLoadID>
</ReturnedTags>
</ns:selectCmDeviceExt>
</soapenv:Body>
</soapenv:Envelope>
Please mark this as helpful or solution accepted to help others
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 09:48 AM
Hi
Ty for the response but I'm getting error as 500 , any Idea ?
Request Body:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:selectCmDeviceExt>
<soap:StateInfo></soap:StateInfo>
<soap:CmSelectionCriteria>
<soap:MaxReturnedDevices>2000</soap:MaxReturnedDevices>
<soap:DeviceClass>Any</soap:DeviceClass>
<soap:Model>255</soap:Model>
<soap:Status>Any</soap:Status>
<soap:NodeName>ALL</soap:NodeName>
<soap:SelectBy>IPV4ADDRESS</soap:SelectBy>
<soap:SelectItems>
<!--Zero or more repetitions:-->
<soap:item>
<soap:Item>*</soap:Item>
</soap:item>
</soap:SelectItems>
<soap:Protocol>Any</soap:Protocol>
<soap:DownloadStatus>Any</soap:DownloadStatus>
</soap:CmSelectionCriteria>
</soap:selectCmDeviceExt>
</soapenv:Body>
</soapenv:Envelope>
HTTP Status: 500
Response Body :
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 08:06 AM - edited 01-09-2025 08:06 AM
@prakashJangam
Try the following:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:selectCmDeviceExt>
<soap:StateInfo></soap:StateInfo>
<soap:CmSelectionCriteria>
<soap:MaxReturnedDevices>2000</soap:MaxReturnedDevices>
<soap:DeviceClass>Any</soap:DeviceClass>
<soap:Model>255</soap:Model>
<soap:Status>Any</soap:Status>
<soap:NodeName>NombreDelNodo</soap:NodeName>
<soap:SelectBy>IPV4ADDRESS</soap:SelectBy>
<soap:SelectItems>
<!-- Deja este campo vacío para seleccionar todos los dispositivos -->
</soap:SelectItems>
<soap:Protocol>Any</soap:Protocol>
<soap:DownloadStatus>Any</soap:DownloadStatus>
</soap:CmSelectionCriteria>
</soap:selectCmDeviceExt>
</soapenv:Body>
</soapenv:Envelope>
MaxReturnedDevices
: Specifies the maximum number of devices to return. The maximum allowed value is 2000.DeviceClass
: Specifies the device class. Possible values:Any
,Phone
,Gateway
,H323
,Cti
,VoiceMail
,MediaResources
,HuntList
,SIPTrunk
,Unknown
.Model
: The device model number. Use255
to represent "any model."Status
: Filter devices by their status. Possible values:Any
,Registered
,UnRegistered
,Rejected
,PartiallyRegistered
,Unknown
.NodeName
: The name of the Cisco Unified Communications Manager node to query. Leave this blank to query all nodes in the cluster.SelectBy
: The criteria for selecting devices. Possible values:Name
,IPV4Address
,IPV6Address
,DirNumber
,Description
,SIPStatus
.SelectItems
: A list of items to match against theSelectBy
criteria. For example, ifSelectBy
isName
, include device names here. To select all devices, leave this empty or use a wildcard (*
).Protocol
: The device protocol. Possible values:Any
,SCCP
,SIP
,Unknown
.DownloadStatus
: The download status of the device. Possible values:Any
,Upgrading
,Successful
,Failed
,Unknown
.
If you encounter a 500 error, ensure that all parameters are correctly configured and that the rate limits are not exceeded.
Please mark this as helpful or solution accepted to help others
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 08:35 AM
HI Randy
Tried the above but no luck
Documentation says leave blank for all devices but error says otherwise , Any thoughts?
Error :
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>ERROR: SelectItems cannot be null</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 08:09 AM
@prakashJangam
Try the following:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:selectCmDeviceExt>
<soap:StateInfo></soap:StateInfo>
<soap:CmSelectionCriteria>
<soap:MaxReturnedDevices>2000</soap:MaxReturnedDevices>
<soap:DeviceClass>Any</soap:DeviceClass>
<soap:Model>255</soap:Model>
<soap:Status>Any</soap:Status>
<soap:NodeName>ALL</soap:NodeName>
<soap:SelectBy>Name</soap:SelectBy>
<soap:SelectItems>
<soap:item>
<soap:Item>*</soap:Item>
</soap:item>
</soap:SelectItems>
<soap:Protocol>Any</soap:Protocol>
<soap:DownloadStatus>Any</soap:DownloadStatus>
</soap:CmSelectionCriteria>
</soap:selectCmDeviceExt>
</soapenv:Body>
</soapenv:Envelope>SelectBy
:
- You are using
IPV4ADDRESS
, but the wildcard*
inSelectItems
might not work with thisSelectBy
value. Try changingSelectBy
toName
if*
should represent "all devices."
Some configurations or versions of the API might not support*
inSelectItems
, even if documentation implies it should work.
