10-06-2021 05:08 AM
Hello,
For jabber AXL API, how do I get the App User Id by device number or userName or some indicator?
Solved! Go to Solution.
10-06-2021 08:54 AM
npetrele is correct in that the below request may return more than one row of matches, but in case it's helpful, you can use something like this <executeSqlQuery> request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/14.0"> <soapenv:Header/> <soapenv:Body> <ns:executeSQLQuery sequence="1"> <sql>select applicationuser.name,applicationuser.pkid from device,applicationuser,applicationuserdevicemap where applicationuserdevicemap.fkapplicationuser = applicationuser.pkid and applicationuserdevicemap.fkdevice = device.pkid and device.name = "CSFDSTAUDT"</sql> </ns:executeSQLQuery> </soapenv:Body> </soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:executeSQLQueryResponse xmlns:ns="http://www.cisco.com/AXL/API/14.0"> <return> <row> <name>testAppUser</name> <pkid>0085d951-9f27-a128-e2f7-378783caffc5</pkid> </row> </return> </ns:executeSQLQueryResponse> </soapenv:Body> </soapenv:Envelope>
10-06-2021 06:24 AM
Could you rephrase that or provide some more details? I don't understand the question.
10-06-2021 06:31 AM
For every app user we have a list of associated Devices.
I need away to know what is The appUser that is associated with a certain device number.
10-06-2021 07:10 AM
A device can be controlled by more than one app user. There's not a one-to-one relationship between a device and an app user.
10-06-2021 08:54 AM
npetrele is correct in that the below request may return more than one row of matches, but in case it's helpful, you can use something like this <executeSqlQuery> request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/14.0"> <soapenv:Header/> <soapenv:Body> <ns:executeSQLQuery sequence="1"> <sql>select applicationuser.name,applicationuser.pkid from device,applicationuser,applicationuserdevicemap where applicationuserdevicemap.fkapplicationuser = applicationuser.pkid and applicationuserdevicemap.fkdevice = device.pkid and device.name = "CSFDSTAUDT"</sql> </ns:executeSQLQuery> </soapenv:Body> </soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:executeSQLQueryResponse xmlns:ns="http://www.cisco.com/AXL/API/14.0"> <return> <row> <name>testAppUser</name> <pkid>0085d951-9f27-a128-e2f7-378783caffc5</pkid> </row> </return> </ns:executeSQLQueryResponse> </soapenv:Body> </soapenv:Envelope>
10-07-2021 07:49 AM
For what it's worth, here's a sample when the device is controlled by more than one app user:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5"> <soapenv:Header/> <soapenv:Body> <ns:executeSQLQuery> <sql>select applicationuser.name,applicationuser.pkid from device,applicationuser,applicationuserdevicemap where applicationuserdevicemap.fkapplicationuser = applicationuser.pkid and applicationuserdevicemap.fkdevice = device.pkid and device.name = "SEP001EF727852D"</sql> </ns:executeSQLQuery> </soapenv:Body> </soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:executeSQLQueryResponse xmlns:ns="http://www.cisco.com/AXL/API/12.5"> <return> <row> <name>norbert</name> <pkid>47f7c497-1e96-3724-f034-6fb56204cb0a</pkid> </row> <row> <name>daggett</name> <pkid>63e82413-5626-6a33-40ae-7a91a45635d9</pkid> </row> </return> </ns:executeSQLQueryResponse> </soapenv:Body> </soapenv:Envelope>
You would need some other criteria to determine which app user you were looking for.
10-09-2021 11:04 PM - edited 10-09-2021 11:19 PM
Thank You all For The Fast reply
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide