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

GetLine (dn + partition) of a device of a specific userid using AXL SQLquery API

I have successfully got the lines for all the devices in CUCM using the following AXL SQLQuery:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.0">

   <soapenv:Header/>

       <soapenv:Body>

          <ns:executeSQLQuery>

             <sql>select d.name,d.description,n.dnorpattern as DN,rp.name as partition

                from device as d

                inner join devicenumplanmap as dmap on dmap.fkdevice=d.pkid

                inner join numplan as n on dmap.fknumplan=n.pkid

                inner join routepartition as rp on n.fkroutepartition=rp.pkid

                where d.tkclass=1

                order by d.name</sql>

          </ns:executeSQLQuery>

       </soapenv:Body>

</soapenv:Envelope>

Now, what I failed doing, is running this query agains a specific userid. So, somewhere in the query I would like to get, instead of all the lines for all the devices, a line for a device that belongs to a specific user.

Is there any way that I could do this using AXL API ?

1 REPLY 1

dstaudt
Cisco Employee
Cisco Employee

As a possible hint, the relationship between the user and the device is stored in 'enduserdevicemap'.  You can probably add another join on 'device.pkid = enduserdevicemap.fkdevice' and 'enduser.pkid = enduserdevicemap.fkuser'

Note, the table uses the user's PKID/uuid in the 'fkenduser' field (not the 'user ID'), so you may need to retrieve the user's PKID/uuid first, i.e. via <listUser> or <getUser>.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: