07-31-2018 03:45 AM - edited 06-04-2019 02:40 AM
Hello all,
Looking for a bit of help please as this is the final bit of my puzzle.
I would like get the details from CUCM page about groups from members search criteria using AXLtoolkit in SOAPUI with API 11.5.
this bit of code loads all members in a given group where the group is called "testgroup"
<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:getLineGroup> <name>testgroup<name/> <returnedTags> <members> <member> <directoryNumber> <pattern/> </directoryNumber> </member> </members> <name/> </returnedTags> </ns:getLineGroup> </soapenv:Body> </soapenv:Envelope>
What I am wanting to now do is the opposite of this.
I am wanting to load all groups that a given member say member 70001 is in, I know that this member is in two groups but I now want to load those groups from the member search.
Can you help with what call I need to do this with please?
thank you for any and all help given as always.
Solved! Go to Solution.
08-01-2018 10:08 AM
I think in order to get at the data 'backwards' like this, you will need to use a custom SQL query. This seems to be a good starting point:
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns:executeSQLQuery xmlns:ns="http://www.cisco.com/AXL/API/11.5"> <sql xsi:type="xsd:string">select linegroup.name from linegroup, numplan, linegroupnumplanmap where linegroupnumplanmap.fklinegroup=linegroup.pkid and linegroupnumplanmap.fknumplan=numplan.pkid and numplan.dnorpattern='1000'</sql> </ns:executeSQLQuery> </soap:Body> </soap:Envelope>
07-31-2018 08:04 PM - edited 07-31-2018 08:07 PM
Hi,
The getLineGroup function gets the particular name only. If you would like to list all line groups then you need to use listLineGroup. as follows
<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:listLineGroup sequence="1">
<searchCriteria>
<name>%</name>
</searchCriteria>');
<returnedTags><uuid/><name/></returnedTags>
</ns:listLineGroup>
</soapenv:Body>
</soapenv:Envelope>
Note: % = list all line groups in CUCM
In this example I only return uuid and name.
Hope this would help you.
Regards
Thuy Doan
07-31-2018 10:26 PM
Thank you Thuy Doan for your reply, however the answer you posted is not what I am looking for on this occasion.
All this does is list the groups or list a group I already know the name of.
I am trying to list all of the groups that a user/member is apart of, so the search criteria needs to include the user/member of that group in this case "70001" and as far as I can see the listLineGroup function does not allow for that search criteria.
I welcome all responses to solve this problem.
07-31-2018 10:52 PM - edited 07-31-2018 11:31 PM
Hi,
You mean the line group is the Hunt List. If so, you can use getHuntList and will return uuid, description, name, members (members -> lineGroupName - uuid)...
Hope this would help you.
Regards,
Thuy Doan
07-31-2018 11:41 PM - edited 08-01-2018 12:02 AM
Hi Thuy Doan
Thank you for the response.
can you show me the code for this as i cannot get it work without a faultstring error or using a Hunt list to search for a line group but I need to use the user to search for groups they are apart of and this does not seem to be an option as i can see using getHuntList?
thank you for any and all help
08-01-2018 12:03 AM
Hi,
This is a sample code as follows
<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:getHuntList sequence="1">
<name>YourHuntName</name>
<returnedTags><uuid/><name/><description/>
<members>
<member>
<uuid/>
<lineGroupName>
<uuid/>
</lineGroupName>
</member>
</members>
</returnedTags>
</ns:getHuntList>
</soapenv:Body>
</soapenv:Envelope>
Regards,
Thuy Doan
08-01-2018 12:20 AM - edited 08-01-2018 12:22 AM
Thank you Thuy Doan, however this still does not help. this has just moved the problem up. this is using a hunt list name as the search term.
to be clear I need to do the following:
input a user/member of a group as the only search term in this test case "70001"
I then need my query to output the groups or to be clearer the Line groups this member/user is part of.
as far as i can see getHuntGroup, getLineGroup or getHuntList cannot be used in this way.
kind regards.
08-01-2018 12:18 AM
Hi,
As I know getUser will return firstName, lastName, uuid, associatedGroups (userGroup, userRoles -> userRole)...
If you getUserGroup will return uuid, name, members (member -> uuid), userRoles -> userRole -> uid,
userRoles -> userRole ->roleName -> uuid)
and getHuntList function. It depends on which function you want to use in your case.
Hope this would help you.
Regards,
Thuy Doan
08-01-2018 12:31 AM
Hi,
Please confirm if <70001> is the hunt/line group or extension or group name.
Regards
Thuy Doan
08-01-2018 12:44 AM - edited 08-01-2018 12:46 AM
70001 is the username/extension, all users on my system are stored by a 5 digit number.
I am needing to input in the username and output the group
08-01-2018 01:02 AM
Hi,
If <70001> is an username then you need to use getUser and will return firstName, lastName, associatedGroups....
If <70001> is an extension then you need to use getLine and will return pattern, description, presenceGroupName ....
Regards,
Thuy Doan