<div dir="ltr">Here's the Unity Connection APIs- <a href="http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_APIs">http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_APIs</a><div><br></div><div>You should be able to use the CUMI API to get this info I would think- <a href="http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Messaging_Interface_(CUMI)_API">http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Messaging_Interface_(CUMI)_API</a></div><div><br></div><div><a href="http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Messaging_Interface_(CUMI)_API_--_Using_the_CUMI_API">http://docwiki.cisco.com/wiki/Cisco_Unity_Connection_Messaging_Interface_(CUMI)_API_--_Using_the_CUMI_API</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 3:49 PM, Nick Barnett <span dir="ltr"><<a href="mailto:nicksbarnett@gmail.com" target="_blank">nicksbarnett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I found<a href="https://www.cisco.com/c/en/us/support/docs/unified-communications/unity-connection/118299-technote-cuc-00.html#anc8" target="_blank"> this SQL query</a> to return a count of all message boxes in CUC. I modified it to return the top 10 by adding "FIRST 10" immediately after "select" on the first line:<br><div><br></div><div><p class="MsoNormal">run cuc dbquery unitymbxdb1 select FIRST <b><span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:yellow">10</span></b> alias as UserID,
count (*) as messages \<span></span></p>
<p class="MsoNormal">from vw_message, unitydirdb:vw_mailbox, unitydirdb:vw_user \<span></span></p>
<p class="MsoNormal">where mailboxobjectid in \<span></span></p>
<p class="MsoNormal">(select mailboxid from vw_mailbox where unitydirdb:
vw_user.objectid = unitydirdb:vw_mailbox.<wbr>userobjectid) \<span></span></p>
<p class="MsoNormal">group by alias order by \<span></span></p>
<p class="MsoNormal">messages desc<span></span></p><p class="MsoNormal"><br></p><p class="MsoNormal">This works, but it's not very "dev ops friendly." I think I'd have to use an expect script and code in my CLI password... which I really don't want to do.</p><p class="MsoNormal"><br></p><p class="MsoNormal">I looked through the VMREST kit for CUC 10.5 and I don't see anything like this. I can usually find my way around the AXL kit in CUCM but I frequently have issues finding what I need in the CUC VMREST calls.<br></p><p class="MsoNormal"><br></p><p class="MsoNormal">Is there a way to execute this specific query via VMREST to CUC? Is there a VMREST call already baked into CUC that will return similar information?</p><p class="MsoNormal"><br></p><p class="MsoNormal">Thanks,</p><p class="MsoNormal">Nick</p></div></div>
<br>______________________________<wbr>_________________<br>
cisco-voip mailing list<br>
<a href="mailto:cisco-voip@puck.nether.net">cisco-voip@puck.nether.net</a><br>
<a href="https://puck.nether.net/mailman/listinfo/cisco-voip" rel="noreferrer" target="_blank">https://puck.nether.net/<wbr>mailman/listinfo/cisco-voip</a><br>
<br></blockquote></div><br></div>