The LogCollection API has some qwirks that anyone who have been trying to use it probably has come across. I thought I'd share some of my learnings here.

 

I've commented a few things that is good to know directly in the XML. These requests were tested with a CUCM 8.6 but I think they will work with both later and earlier versions as well. I've been using the same wsdl-generated code since 6.x without any issues I can recall.

 

To download traces one must talk to both the LogCollection as well as the DimeGetFile API. It might also be necessary to talk to a TimeZone API which is undocumented (and probably unsupported...). I have provided complete samples below. SoapUI is an excellent tool to test API requests, it work with both SOAP and REST services.

 

The SXML API:s are really ugly in my opinion. The AXL API is much prettier, I do hope that these also will be improved sometime.

 

I use Delphi to communicate with pretty much all of the CUCM API:s (Although the "real" programmers mock me for my choice of language). I have found Delphi to be quite a swiss army knife when it comes to working with CUCM since it is so easy to write stuff that the CUCM admin tools lack. The XML described here is platform independent though, as it shows what is actually sent and received on the wire (more or less).

 

LogCollection API:

 

This API contains only two methods. One method that lists all available trace file types, and one method that lists files for specific methods.

 

POST to https://CUCM:8443/logcollectionservice/services/LogCollectionPort

 

wsdl is available at https://CUCM:8443/logcollectionservice/services/LogCollectionPort?wsdl

 

List available trace file types:

 

(complete sample with HTTP, I will not show HTTP for later requests. Note that the SOAPAction is mandatory.)

 

Sample Request #1 Start, build by code generated from consuming the wsdl.

POST https://CUCM:8443/logcollectionservice/services/LogCollectionPort HTTP/1.1
SOAPAction: "http://schemas.cisco.com/ast/soap/#ListNodeServiceLogs"
Content-Type: text/xml; charset="utf-8"
User-Agent: CodeGear SOAP 1.3
Host: CUCM:8443
Content-Length: 506
Connection: Keep-Alive
Cache-Control: no-cache
Authorization: Basic <removed>

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
     <SOAP-ENV:Body xmlns:NS1="http://schemas.cisco.com/ast/soap/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <NS1:ListNodeServiceLogs>
             <ListRequest xsi:nil="true"/>
         </NS1:ListNodeServiceLogs>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Request #1 End

 

Sample Request #2 Start, manually coded

This is a "cleaner" request with comments and less namespaces. The namespaces seems to be a mess in this API... This request works. It returns all trace file types for all servers in the cluster.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
    <soapenv:Header/>
    <soapenv:Body>
       <soap:ListNodeServiceLogs>
         <!-- Haven't been able to filter anything. This request always returns all trace logs from all servers in the cluster -->
          <ListRequest/>
       </soap:ListNodeServiceLogs>
    </soapenv:Body>
</soapenv:Envelope>

Sample Request #2 End

 

Sample Response Start

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
       <ns1:ListNodeServiceLogsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
          <ListNodeServiceLogs soapenc:arrayType="ns2:NodeServiceLogList[2]" xsi:type="soapenc:Array" xmlns:ns2="http://cisco.com/ccm/serviceability/soap/LogCollection/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
             <item xsi:type="ns2:NodeServiceLogList">
                <name xsi:type="xsd:string">81.224.24.131</name>
                <ServiceLog soapenc:arrayType="xsd:string[129]" xsi:type="soapenc:Array">
                   <item xsi:type="xsd:string">Cisco License Manager</item>
                   <item xsi:type="xsd:string">Cisco IP Manager Assistant</item>
                   <item xsi:type="xsd:string">Cisco Dialed Number Analyzer</item>
                   <item xsi:type="xsd:string">Cisco CDR files on CM server</item>
                   <item xsi:type="xsd:string">Cisco User Data Services</item>
                   <item xsi:type="xsd:string">Cisco IP Voice Media Streaming App</item>
                   <item xsi:type="xsd:string">Cisco CDR files on Publisher Processed</item>
                   <item xsi:type="xsd:string">Cisco Extended Functions</item>
                   <item xsi:type="xsd:string">Cisco WebDialer Web Service</item>
                   <item xsi:type="xsd:string">Cisco CAR Web Service</item>
                   <item xsi:type="xsd:string">Cisco CDR Agent</item>
                   <item xsi:type="xsd:string">Cisco CDR Repository Manager</item>
                   <item xsi:type="xsd:string">Cisco Extended Functions Report</item>
                   <item xsi:type="xsd:string">Cisco Change Credential Application</item>
                   <item xsi:type="xsd:string">Cisco UXL Web Service</item>
                   <item xsi:type="xsd:string">SOAP - Diagnostic Portal Database Service</item>
                   <item xsi:type="xsd:string">Cisco Trust Verification Service</item>
                   <item xsi:type="xsd:string">Cisco Messaging Interface</item>
                   <item xsi:type="xsd:string">Cisco CallManager SNMP Service</item>
                   <item xsi:type="xsd:string">Cisco DHCP Monitor Service</item>
                   <item xsi:type="xsd:string">Cisco Extension Mobility Application</item>
                   <item xsi:type="xsd:string">Cisco CallManager</item>
                   <item xsi:type="xsd:string">Cisco Unified Mobile Voice Access Service</item>
                   <item xsi:type="xsd:string">Cisco TAPS Service</item>
                   <item xsi:type="xsd:string">Cisco CallManager Cisco IP Phone Services</item>
                   <item xsi:type="xsd:string">Cisco AXL Web Service</item>
                   <item xsi:type="xsd:string">Cisco CTIManager</item>
                   <item xsi:type="xsd:string">Cisco CAR Scheduler</item>
                   <item xsi:type="xsd:string">Cisco Extension Mobility</item>
                   <item xsi:type="xsd:string">Cisco Tftp</item>
                   <item xsi:type="xsd:string">Cisco Bulk Provisioning Service</item>
                   <item xsi:type="xsd:string">Cisco CTL Provider</item>
                   <item xsi:type="xsd:string">Cisco Certificate Authority Proxy Function</item>
                   <item xsi:type="xsd:string">Cisco Common User Interface</item>
                   <item xsi:type="xsd:string">Cisco Row Information Spooling</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter CallActivitiesReport</item>
                   <item xsi:type="xsd:string">Cisco CDP Agent</item>
                   <item xsi:type="xsd:string">Cisco Database Cli Output</item>
                   <item xsi:type="xsd:string">Cisco Database Library Trace</item>
                   <item xsi:type="xsd:string">Cisco AMC Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter AlertReport</item>
                   <item xsi:type="xsd:string">Cisco Called Party Tracing</item>
                   <item xsi:type="xsd:string">Cisco CCM PD Web Service</item>
                   <item xsi:type="xsd:string">Cisco DRF Master</item>
                   <item xsi:type="xsd:string">Cisco Corefile Recovery Tool</item>
                   <item xsi:type="xsd:string">Cisco GRT Communication Web Service</item>
                   <item xsi:type="xsd:string">Cisco Tomcat Stats Servlet</item>
                   <item xsi:type="xsd:string">Cisco CCMUser Web Service</item>
                   <item xsi:type="xsd:string">Cisco Audit Event Service</item>
                   <item xsi:type="xsd:string">Cisco Role-based Security</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter DeviceReport</item>
                   <item xsi:type="xsd:string">Cisco External Call Control Service</item>
                   <item xsi:type="xsd:string">Cisco AMC Service AlertLog</item>
                   <item xsi:type="xsd:string">Cisco AMC Service CallLog</item>
                   <item xsi:type="xsd:string">Cisco RTMT Web Service</item>
                   <item xsi:type="xsd:string">Cisco SOAP Web Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter ServiceReport</item>
                   <item xsi:type="xsd:string">Cisco Log Partition Monitoring Tool</item>
                   <item xsi:type="xsd:string">Cisco AMC Service ServerLog</item>
                   <item xsi:type="xsd:string">Cisco SOAPMessage Service</item>
                   <item xsi:type="xsd:string">Cisco CDP</item>
                   <item xsi:type="xsd:string">Cisco Abort Transaction Spooling</item>
                   <item xsi:type="xsd:string">Cisco CCM NCS Web Library</item>
                   <item xsi:type="xsd:string">Cisco DirSync</item>
                   <item xsi:type="xsd:string">Cisco Trace Collection Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter ServerReport</item>
                   <item xsi:type="xsd:string">Cisco RIS Data Collector PerfMonLog</item>
                   <item xsi:type="xsd:string">Cisco Database Installation Service</item>
                   <item xsi:type="xsd:string">Cisco CCMAdmin Web Service</item>
                   <item xsi:type="xsd:string">Cisco Database Notification Service</item>
                   <item xsi:type="xsd:string">Cisco CCMService Web Service</item>
                   <item xsi:type="xsd:string">Cisco Unified OS Platform API</item>
                   <item xsi:type="xsd:string">Cisco AMC Service DeviceLog</item>
                   <item xsi:type="xsd:string">Cisco Log4jinit Servlet</item>
                   <item xsi:type="xsd:string">Cisco Stored Procedure Trace</item>
                   <item xsi:type="xsd:string">Cisco Informix Database Service</item>
                   <item xsi:type="xsd:string">Cisco Certificate Change Notification</item>
                   <item xsi:type="xsd:string">Cisco AMC Service ServiceLog</item>
                   <item xsi:type="xsd:string">Cisco DRF Local</item>
                   <item xsi:type="xsd:string">Cisco Unified OS Admin Web Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter</item>
                   <item xsi:type="xsd:string">Cisco AMC Service PPRLog</item>
                   <item xsi:type="xsd:string">Cisco CCMRealm Web Service</item>
                   <item xsi:type="xsd:string">Cisco CCM DBL Web Library</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter PPRReport</item>
                   <item xsi:type="xsd:string">Cisco WebDialerRedirector Web Service</item>
                   <item xsi:type="xsd:string">Cisco Unified Reporting Web Service</item>
                   <item xsi:type="xsd:string">Cisco Database Layer Monitor</item>
                   <item xsi:type="xsd:string">Cisco Database Replicator Trace</item>
                   <item xsi:type="xsd:string">Cisco RIS Data Collector</item>
                   <item xsi:type="xsd:string">Cisco RisBean Library</item>
                   <item xsi:type="xsd:string">Cisco Audio Translator App</item>
                   <item xsi:type="xsd:string">Cisco Syslog Agent</item>
                   <item xsi:type="xsd:string">SNMP Master Agent</item>
                   <item xsi:type="xsd:string">MIB2 Agent</item>
                   <item xsi:type="xsd:string">Host Resources Agent</item>
                   <item xsi:type="xsd:string">System Application Agent</item>
                   <item xsi:type="xsd:string">Cisco Tomcat</item>
                   <item xsi:type="xsd:string">Prog Logs</item>
                   <item xsi:type="xsd:string">Service Manager</item>
                   <item xsi:type="xsd:string">Event Viewer-Application Log</item>
                   <item xsi:type="xsd:string">Event Viewer-System Log</item>
                   <item xsi:type="xsd:string">Boot Logs</item>
                   <item xsi:type="xsd:string">FIPS Logs</item>
                   <item xsi:type="xsd:string">Install and Upgrade Logs</item>
                   <item xsi:type="xsd:string">Service Registration Logs</item>
                   <item xsi:type="xsd:string">Security Logs</item>
                   <item xsi:type="xsd:string">Cisco Tomcat Security Logs</item>
                   <item xsi:type="xsd:string">IPT Platform GUI Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CertMgr Logs</item>
                   <item xsi:type="xsd:string">IPT Platform IPSecMgmt Logs</item>
                   <item xsi:type="xsd:string">IPT Platform Cluster Manager Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CLI Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CLI Created Reports</item>
                   <item xsi:type="xsd:string">Packet Capture Logs</item>
                   <item xsi:type="xsd:string">IPT Platform RemoteSupport Logs</item>
                   <item xsi:type="xsd:string">IPT Platform Cert Monitor Logs</item>
                   <item xsi:type="xsd:string">Install File Signing</item>
                   <item xsi:type="xsd:string">Spooler Logs</item>
                   <item xsi:type="xsd:string">Mgetty Logs</item>
                   <item xsi:type="xsd:string">Mail Logs</item>
                   <item xsi:type="xsd:string">Cron Logs</item>
                   <item xsi:type="xsd:string">SAR Logs</item>
                   <item xsi:type="xsd:string">NTP Logs</item>
                   <item xsi:type="xsd:string">Cisco Audit Logs</item>
                   <item xsi:type="xsd:string">Netdump Logs</item>
                   <item xsi:type="xsd:string">Cisco ControlCenter CLI</item>
                   <item xsi:type="xsd:string">SELinux logs</item>
                   <item xsi:type="xsd:string">Cisco SSO</item>
                </ServiceLog>
                <Systemlog xsi:type="xsd:string" xsi:nil="true"/>
             </item>
             <item xsi:type="ns2:NodeServiceLogList">
                <name xsi:type="xsd:string">81.224.24.132</name>
                <ServiceLog soapenc:arrayType="xsd:string[129]" xsi:type="soapenc:Array">
                   <item xsi:type="xsd:string">Cisco License Manager</item>
                   <item xsi:type="xsd:string">Cisco IP Manager Assistant</item>
                   <item xsi:type="xsd:string">Cisco Dialed Number Analyzer</item>
                   <item xsi:type="xsd:string">Cisco CDR files on CM server</item>
                   <item xsi:type="xsd:string">Cisco User Data Services</item>
                   <item xsi:type="xsd:string">Cisco IP Voice Media Streaming App</item>
                   <item xsi:type="xsd:string">Cisco CDR files on Publisher Processed</item>
                   <item xsi:type="xsd:string">Cisco Extended Functions</item>
                   <item xsi:type="xsd:string">Cisco WebDialer Web Service</item>
                   <item xsi:type="xsd:string">Cisco CAR Web Service</item>
                   <item xsi:type="xsd:string">Cisco CDR Agent</item>
                   <item xsi:type="xsd:string">Cisco CDR Repository Manager</item>
                   <item xsi:type="xsd:string">Cisco Extended Functions Report</item>
                   <item xsi:type="xsd:string">Cisco Change Credential Application</item>
                   <item xsi:type="xsd:string">Cisco UXL Web Service</item>
                   <item xsi:type="xsd:string">SOAP - Diagnostic Portal Database Service</item>
                   <item xsi:type="xsd:string">Cisco Trust Verification Service</item>
                   <item xsi:type="xsd:string">Cisco Messaging Interface</item>
                   <item xsi:type="xsd:string">Cisco CallManager SNMP Service</item>
                   <item xsi:type="xsd:string">Cisco DHCP Monitor Service</item>
                   <item xsi:type="xsd:string">Cisco Extension Mobility Application</item>
                   <item xsi:type="xsd:string">Cisco CallManager</item>
                   <item xsi:type="xsd:string">Cisco Unified Mobile Voice Access Service</item>
                   <item xsi:type="xsd:string">Cisco TAPS Service</item>
                   <item xsi:type="xsd:string">Cisco CallManager Cisco IP Phone Services</item>
                   <item xsi:type="xsd:string">Cisco AXL Web Service</item>
                   <item xsi:type="xsd:string">Cisco CTIManager</item>
                   <item xsi:type="xsd:string">Cisco CAR Scheduler</item>
                   <item xsi:type="xsd:string">Cisco Extension Mobility</item>
                   <item xsi:type="xsd:string">Cisco Tftp</item>
                   <item xsi:type="xsd:string">Cisco Bulk Provisioning Service</item>
                   <item xsi:type="xsd:string">Cisco CTL Provider</item>
                   <item xsi:type="xsd:string">Cisco Certificate Authority Proxy Function</item>
                   <item xsi:type="xsd:string">Cisco Common User Interface</item>
                   <item xsi:type="xsd:string">Cisco Row Information Spooling</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter CallActivitiesReport</item>
                   <item xsi:type="xsd:string">Cisco CDP Agent</item>
                   <item xsi:type="xsd:string">Cisco Database Cli Output</item>
                   <item xsi:type="xsd:string">Cisco Database Library Trace</item>
                   <item xsi:type="xsd:string">Cisco AMC Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter AlertReport</item>
                   <item xsi:type="xsd:string">Cisco Called Party Tracing</item>
                   <item xsi:type="xsd:string">Cisco CCM PD Web Service</item>
                   <item xsi:type="xsd:string">Cisco DRF Master</item>
                   <item xsi:type="xsd:string">Cisco Corefile Recovery Tool</item>
                   <item xsi:type="xsd:string">Cisco GRT Communication Web Service</item>
                   <item xsi:type="xsd:string">Cisco Tomcat Stats Servlet</item>
                   <item xsi:type="xsd:string">Cisco CCMUser Web Service</item>
                   <item xsi:type="xsd:string">Cisco Audit Event Service</item>
                   <item xsi:type="xsd:string">Cisco Role-based Security</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter DeviceReport</item>
                   <item xsi:type="xsd:string">Cisco External Call Control Service</item>
                   <item xsi:type="xsd:string">Cisco AMC Service AlertLog</item>
                   <item xsi:type="xsd:string">Cisco AMC Service CallLog</item>
                   <item xsi:type="xsd:string">Cisco RTMT Web Service</item>
                   <item xsi:type="xsd:string">Cisco SOAP Web Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter ServiceReport</item>
                   <item xsi:type="xsd:string">Cisco Log Partition Monitoring Tool</item>
                   <item xsi:type="xsd:string">Cisco AMC Service ServerLog</item>
                   <item xsi:type="xsd:string">Cisco SOAPMessage Service</item>
                   <item xsi:type="xsd:string">Cisco CDP</item>
                   <item xsi:type="xsd:string">Cisco Abort Transaction Spooling</item>
                   <item xsi:type="xsd:string">Cisco CCM NCS Web Library</item>
                   <item xsi:type="xsd:string">Cisco DirSync</item>
                   <item xsi:type="xsd:string">Cisco Trace Collection Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter ServerReport</item>
                   <item xsi:type="xsd:string">Cisco RIS Data Collector PerfMonLog</item>
                   <item xsi:type="xsd:string">Cisco Database Installation Service</item>
                   <item xsi:type="xsd:string">Cisco CCMAdmin Web Service</item>
                   <item xsi:type="xsd:string">Cisco Database Notification Service</item>
                   <item xsi:type="xsd:string">Cisco CCMService Web Service</item>
                   <item xsi:type="xsd:string">Cisco Unified OS Platform API</item>
                   <item xsi:type="xsd:string">Cisco AMC Service DeviceLog</item>
                   <item xsi:type="xsd:string">Cisco Log4jinit Servlet</item>
                   <item xsi:type="xsd:string">Cisco Stored Procedure Trace</item>
                   <item xsi:type="xsd:string">Cisco Informix Database Service</item>
                   <item xsi:type="xsd:string">Cisco Certificate Change Notification</item>
                   <item xsi:type="xsd:string">Cisco AMC Service ServiceLog</item>
                   <item xsi:type="xsd:string">Cisco DRF Local</item>
                   <item xsi:type="xsd:string">Cisco Unified OS Admin Web Service</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter</item>
                   <item xsi:type="xsd:string">Cisco AMC Service PPRLog</item>
                   <item xsi:type="xsd:string">Cisco CCMRealm Web Service</item>
                   <item xsi:type="xsd:string">Cisco CCM DBL Web Library</item>
                   <item xsi:type="xsd:string">Cisco Serviceability Reporter PPRReport</item>
                   <item xsi:type="xsd:string">Cisco WebDialerRedirector Web Service</item>
                   <item xsi:type="xsd:string">Cisco Unified Reporting Web Service</item>
                   <item xsi:type="xsd:string">Cisco Database Layer Monitor</item>
                   <item xsi:type="xsd:string">Cisco Database Replicator Trace</item>
                   <item xsi:type="xsd:string">Cisco RIS Data Collector</item>
                   <item xsi:type="xsd:string">Cisco RisBean Library</item>
                   <item xsi:type="xsd:string">Cisco Audio Translator App</item>
                   <item xsi:type="xsd:string">Cisco Syslog Agent</item>
                   <item xsi:type="xsd:string">SNMP Master Agent</item>
                   <item xsi:type="xsd:string">MIB2 Agent</item>
                   <item xsi:type="xsd:string">Host Resources Agent</item>
                   <item xsi:type="xsd:string">System Application Agent</item>
                   <item xsi:type="xsd:string">Cisco Tomcat</item>
                   <item xsi:type="xsd:string">Prog Logs</item>
                   <item xsi:type="xsd:string">Service Manager</item>
                   <item xsi:type="xsd:string">Event Viewer-Application Log</item>
                   <item xsi:type="xsd:string">Event Viewer-System Log</item>
                   <item xsi:type="xsd:string">Boot Logs</item>
                   <item xsi:type="xsd:string">FIPS Logs</item>
                   <item xsi:type="xsd:string">Install and Upgrade Logs</item>
                   <item xsi:type="xsd:string">Service Registration Logs</item>
                   <item xsi:type="xsd:string">Security Logs</item>
                   <item xsi:type="xsd:string">Cisco Tomcat Security Logs</item>
                   <item xsi:type="xsd:string">IPT Platform GUI Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CertMgr Logs</item>
                   <item xsi:type="xsd:string">IPT Platform IPSecMgmt Logs</item>
                   <item xsi:type="xsd:string">IPT Platform Cluster Manager Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CLI Logs</item>
                   <item xsi:type="xsd:string">IPT Platform CLI Created Reports</item>
                   <item xsi:type="xsd:string">Packet Capture Logs</item>
                   <item xsi:type="xsd:string">IPT Platform RemoteSupport Logs</item>
                   <item xsi:type="xsd:string">IPT Platform Cert Monitor Logs</item>
                   <item xsi:type="xsd:string">Install File Signing</item>
                   <item xsi:type="xsd:string">Spooler Logs</item>
                   <item xsi:type="xsd:string">Mgetty Logs</item>
                   <item xsi:type="xsd:string">Mail Logs</item>
                   <item xsi:type="xsd:string">Cron Logs</item>
                   <item xsi:type="xsd:string">SAR Logs</item>
                   <item xsi:type="xsd:string">NTP Logs</item>
                   <item xsi:type="xsd:string">Cisco Audit Logs</item>
                   <item xsi:type="xsd:string">Netdump Logs</item>
                   <item xsi:type="xsd:string">Cisco ControlCenter CLI</item>
                   <item xsi:type="xsd:string">SELinux logs</item>
                   <item xsi:type="xsd:string">Cisco SSO</item>
                </ServiceLog>
                <Systemlog xsi:type="xsd:string" xsi:nil="true"/>
             </item>
          </ListNodeServiceLogs>
       </ns1:ListNodeServiceLogsResponse>
    </soapenv:Body>
</soapenv:Envelope>


Sample Response End

List available trace files for a service:

 

When the service and log type is know this method is used to list the files available. This request can be used in different ways. I only use it to list the files so that I can download them with DimeGetFile later.

 

The request can ask for files in an absolute or relative time period. Note my comments regarding the time format in that I've inlined in the XML shown below.

 

Sample Absolute Request Start:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
    <soapenv:Header/>
    <soapenv:Body>
       <soap:SelectLogFiles>
          <FileSelectionCriteria xmlns:log="http://cisco.com/ccm/serviceability/soap/LogCollection/">
             <ServiceLogs xsi:type="log:ArrayOfString">
                <!-- More that one type can be listed -->
                <item>Cisco CallManager</item>
             </ServiceLogs>
             <SearchStr/>
             <JobType>DownloadtoClient</JobType>
           <!-- The documentation shows an incorrect format -->
           <!-- The format is "mm/dd/yy hh:mm AM/PM" -->
             <ToDate>02/13/14 11:45 PM</ToDate>
             <FromDate>02/13/14 09:45 PM</FromDate>
             <!-- The timezone format is some proprietary format which is quite ugly. If it is left blank -->
             <!-- it will use GMT (I believe) :-->
             <!-- The documentation is not clear on the format -->
             <!-- The format is "Client:()<TimeZone Name according to java.util.TimeZone> -->
             <!-- For example "()CET" of "()America/Los_Angeles" -->
             <!-- See http://tutorials.jenkov.com/java-date-time/java-util-timezone.html for a list -->
             <!-- You can put text inside the parentheses but it is not used. It is only the -->
             <!-- java timezone name that is used to map timezone. -->
             <!-- Note that there must be no whitespace after the (), but you may use for -->
             <!-- example "-", i.e "Client:(GMT-8:0)-America/Los_Angeles" -->

             <!-- The servers timezone can be retried from the undocumented web service at -->
             <!-- https://<cucm>/logcollectionservice/services/TimeZone?wsdl -->
             <!-- The format returned by the service works for this request (see separate sample xml) -->
             <TimeZone>Client:()CET</TimeZone>
          </FileSelectionCriteria>
       </soap:SelectLogFiles>
    </soapenv:Body>
</soapenv:Envelope>
Sample Absolute Request End:

 

Response to Absolute Request Start:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
       <ns1:SelectLogFilesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
          <FileSelectionResult xsi:type="ns2:SchemaFileSelectionResult" xmlns:ns2="http://cisco.com/ccm/serviceability/soap/LogCollection/">
             <Node xsi:type="ns2:Node">
                <name xsi:type="xsd:string" xsi:nil="true"/>
                <ServiceList soapenc:arrayType="ns2:ServiceLogs[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                   <item xsi:type="ns2:ServiceLogs">
                      <name xsi:type="xsd:string" xsi:nil="true"/>
                      <SetOfFiles soapenc:arrayType="ns2:file[2]" xsi:type="soapenc:Array">
                         <item xsi:type="ns2:file">
                            <name xsi:type="xsd:string">SDL001_100_000158.txt.gz</name>
                            <absolutepath xsi:type="xsd:string">/var/log/active/cm/trace/ccm/sdl/SDL001_100_000158.txt.gz</absolutepath>
                            <filesize xsi:type="xsd:string">199871</filesize>
                            <modifiedDate xsi:type="xsd:string">Thu Feb 13 22:38:19 CET 2014</modifiedDate>
                         </item>
                         <item xsi:type="ns2:file">
                            <name xsi:type="xsd:string">SDL001_100_000159.txt.gz</name>
                            <absolutepath xsi:type="xsd:string">/var/log/active/cm/trace/ccm/sdl/SDL001_100_000159.txt.gz</absolutepath>
                            <filesize xsi:type="xsd:string">199694</filesize>
                            <modifiedDate xsi:type="xsd:string">Fri Feb 14 00:36:14 CET 2014</modifiedDate>
                         </item>
                      </SetOfFiles>
                   </item>
                </ServiceList>
             </Node>
          </FileSelectionResult>
          <ScheduleList soapenc:arrayType="ns3:Schedule[0]" xsi:type="soapenc:Array" xmlns:ns3="http://cisco.com/ccm/serviceability/soap/LogCollection/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
       </ns1:SelectLogFilesResponse>
    </soapenv:Body>
</soapenv:Envelope>


Response to Absolute Request End

 

 

Sample Relative Request Start:

 

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
    <soapenv:Header/>
    <soapenv:Body>
       <soap:SelectLogFiles>
          <FileSelectionCriteria xmlns:log="http://cisco.com/ccm/serviceability/soap/LogCollection/">
             <ServiceLogs xsi:type="log:ArrayOfString">
                <!-- More that one type can be listed -->
                <item>Cisco CallManager</item>
             </ServiceLogs>
           <!-- Don't really know what this is used for -->
             <SearchStr/>
             <JobType>DownloadtoClient</JobType>
             <RelText>Minutes</RelText>
             <RelTime>15</RelTime>
             <!-- TimeZone must be used although it can be empty for relative requests -->
             <TimeZone/>
          </FileSelectionCriteria>
       </soap:SelectLogFiles>
    </soapenv:Body>
</soapenv:Envelope>

Sample Relative Request End

 

Response to Relative Request Start

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
       <ns1:SelectLogFilesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
          <FileSelectionResult xsi:type="ns2:SchemaFileSelectionResult" xmlns:ns2="http://cisco.com/ccm/serviceability/soap/LogCollection/">
             <Node xsi:type="ns2:Node">
                <name xsi:type="xsd:string" xsi:nil="true"/>
                <ServiceList soapenc:arrayType="ns2:ServiceLogs[1]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                   <item xsi:type="ns2:ServiceLogs">
                      <name xsi:type="xsd:string" xsi:nil="true"/>
                      <SetOfFiles soapenc:arrayType="ns2:file[1]" xsi:type="soapenc:Array">
                         <item xsi:type="ns2:file">
                            <name xsi:type="xsd:string">SDL001_100_000171.txt.gzo</name>
                            <absolutepath xsi:type="xsd:string">/var/log/active/cm/trace/ccm/sdl/SDL001_100_000171.txt.gzo</absolutepath>
                            <filesize xsi:type="xsd:string">151495</filesize>
                            <modifiedDate xsi:type="xsd:string">Fri Feb 14 23:33:09 CET 2014</modifiedDate>
                         </item>
                      </SetOfFiles>
                   </item>
                </ServiceList>
             </Node>
          </FileSelectionResult>
          <ScheduleList soapenc:arrayType="ns3:Schedule[0]" xsi:type="soapenc:Array" xmlns:ns3="http://cisco.com/ccm/serviceability/soap/LogCollection/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
       </ns1:SelectLogFilesResponse>
    </soapenv:Body>
</soapenv:Envelope>
Response to Relative Request End

 

 

TimeZone API:

 

This may or may not be useful. Since the timezone format is a bit weird this can help you get the TimeZone of the CUCM. This API is not officially documented by Cisco so use it at your own risk.

 

Contains only one method.

 

POST to https://CUCM:8443/logcollectionservice/services/TimeZone

 

wsdl available at https://CUCM:8443/logcollectionservice/services/TimeZone?wsdl

 

Sample Request Start

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tim="http://cisco.com/ccm/serviceability/soap/TimeZone/">
    <soapenv:Header/>
    <soapenv:Body>
       <tim:getTimeZone soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <localhost xsi:type="xsd:string"/>
       </tim:getTimeZone>
    </soapenv:Body>
</soapenv:Envelope>
S
ample Request End

 

Sample Response Start

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
       <ns1:getTimeZoneResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://cisco.com/ccm/serviceability/soap/TimeZone/">
          <timezone xsi:type="xsd:string"><![CDATA[<TimeZone><LocalTimeZone name="LocalTimeZone" value="(GMT+1:0)Central European Time-Europe/Stockholm"></LocalTimeZone><Mode name="Mode" value="Standard"></Mode></TimeZone>]]></timezone>
       </ns1:getTimeZoneResponse>
    </soapenv:Body>

</soapenv:Envelope>

Sample Response End

 

DimeGetFile API:

 

This is the API where the actual download of the files is performed. Contains only one method. It is using DIME. http://en.wikipedia.org/wiki/Direct_Internet_Message_Encapsulation

 

POST to https://CUCM:8443/logcollectionservice/services/DimeGetFileService

 

For some reason the wsdl is not available from the CUCM anymore. At least not on the version of 8.6 that I used. It can be obtained by various methods but I won´t get into that here :-)

 

Note that the API does not provide extraction of gzipped files so that has to be done locally on the client.

 

The response does not contain the filename, only a byte stream. In my applications I store the stream and names it from the filename in the request.

 

Sample Request Start

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
     <SOAP-ENV:Body xmlns:NS1="http://schemas.cisco.com/ast/soap/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <NS1:GetOneFile>
             <FileName xsi:type="xsd:string">/var/log/active/cm/trace/ccm/sdl/SDL001_100_000171.txt.gz</FileName>
         </NS1:GetOneFile>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Request End

 

Sample Response Start (I added the headers as well for clarity)

HTTP/1.1 200 OK
Content-Type: multipart/related; type="text/xml"; start="<567FC68098B97201CDCC66024F4FBD4B>";     boundary="----=_Part_31_28210217.1392420431895"
Date: Fri, 14 Feb 2014 23:27:11 GMT
Server:
Content-Length: 200400


------=_Part_31_28210217.1392420431895
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <567FC68098B97201CDCC66024F4FBD4B>

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <soapenv:Body>
         <ns1:GetOneFileResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
             <DataHandler href="cid:483FAB79B138EF45061AE240EE8DEB89" xsi:type="ns2:DataHandler" xmlns:ns2="DimeGetFileService"/>
         </ns1:GetOneFileResponse>
     </soapenv:Body>
</soapenv:Envelope>
------=_Part_31_28210217.1392420431895
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Id: <483FAB79B138EF45061AE240EE8DEB89>

������ ... Octet stream since it is a Gzipped file ...

------=_Part_31_28210217.1392420431895--

Sample Response End

 

I hope this i helpful to somebody!

 

All the best,

 

Dan