I would like to export the phone status selected by device pool name from RisPort70 WSDL in python. But the documents shows:
There is no device pool name.
Does anyone have any ideal about it?
Thanks a lot.
As noted the Risport API (and underlying service) does not have info on the device pool of the devices and you can't query that way directly.
What you can do is use the AXL API to query for a list of all device names belonging to a particular device pool, then use Risport <selectCmDevice> providing all of the individual device names (up to 1000 in each request).
For example, this AXL <executeSqlQuery> request will return the device names of all devices (and note, not just 'phones' but including gateways and other esoteric device) for the 'Default' device pool:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5"> <soapenv:Header/> <soapenv:Body> <ns:executeSQLQuery sequence="1"> <sql>select device.name from device, devicepool where device.fkdevicepool = devicepool.pkid and devicepool.name = "Default" </sql> </ns:executeSQLQuery> </soapenv:Body> </soapenv:Envelope>
Example of a <selectCmDevice> request using multiple names:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap"> <soapenv:Header/> <soapenv:Body> <soap:selectCmDevice> <soap:StateInfo/> <soap:CmSelectionCriteria> <soap:MaxReturnedDevices>80</soap:MaxReturnedDevices> <soap:DeviceClass>Phone</soap:DeviceClass> <soap:Model>255</soap:Model> <soap:Status>Any</soap:Status> <soap:NodeName></soap:NodeName> <soap:SelectBy>Name</soap:SelectBy> <soap:SelectItems> <soap:item><soap:Item>SEP000000000001</soap:Item></soap:item> <soap:item><soap:Item>SEP000000000002</soap:Item></soap:item> </soap:SelectItems> <soap:Protocol>Any</soap:Protocol> <soap:DownloadStatus>Any</soap:DownloadStatus> </soap:CmSelectionCriteria> </soap:selectCmDevice> </soapenv:Body> </soapenv:Envelope>