[cisco-voip] Finesse API Get Users State
Ryan Burtch
rburtch3 at gmail.com
Fri Feb 12 13:08:41 EST 2016
*Steve/Brian,*
I have tried all morning to get a XPath tester(
http://codebeautify.org/Xpath-Tester#) to parse my data but It won't work.
I'm using XPath expression: /Users/User/*[text()[contains(.,'firstName')]
| text()[contains(.,'LOGOUT')]]
I basically need a list of users that DO NOT have the state of LOGOUT.
Here is an example of my XML
<dialogs>/finesse/api/User/10097499/Dialogs</dialogs>
<extension></extension>
<firstName>Ryan</firstName>
<lastName>Burtch</lastName>
<loginId>10097499</loginId>
<loginName>10097499</loginName>
<pendingState></pendingState>
<reasonCodeId>-1</reasonCodeId>
<roles>
<role>Agent</role>
</roles>
<settings>
<wrapUpOnIncoming></wrapUpOnIncoming>
</settings>
<state>LOGOUT</state>
<stateChangeTime></stateChangeTime>
<teamId>5004</teamId>
<teamName>Test_RyanBurtch</teamName>
<uri>/finesse/api/User/10097499</uri>
Can you help?????
Sincerely,
Ryan Burtch
On Thu, Feb 11, 2016 at 2:49 AM, Stephen Welsh <stephen.welsh at unifiedfx.com>
wrote:
> Hi Ryan,
>
> From reading the Finesse API documentation there is no way to filter the
> response from the Finesse server, I can see one or two resources do have
> query string filters, but the User resource is not one of them. So unless
> someone knows of an undocumented capability to filter the User list
> returned from the Finesse API you will have to write some code to do the
> parsing/filtering of the response from Finesse. I believe Brian was
> referring to your server/application, that you will need to pull all users,
> parse the data and filter the users within your application.
>
> The response from Finesse is simple XML, it’s usually quite easy to load
> the XML into a DOM document/model and use an XPath expression to filter the
> data from there. If you don’t mind providing some info on the environment
> you are developing with (i.e. Javascript/node, PHP, Perl, C# etc.) happy to
> help with the DOM Object and XPath expression statements to filter/extract
> the data you are looking for.
>
> Kind Regards.
>
> Stephen Welsh
> CTO
>
>
> On 11 Feb 2016, at 05:47, Ryan Burtch <rburtch3 at gmail.com> wrote:
>
> How would I filter Server-Side? Forgive my ignorance.
>
>
> Sincerely,
>
> Ryan Burtch
>
> On Feb 10, 2016, at 5:51 PM, Brian Meade <bmeade90 at vt.edu> wrote:
>
> I'd say just pull in the whole list and then filter through server-side
> before presenting the data into your other app.
>
> On Wed, Feb 10, 2016 at 5:51 PM, Ryan Burtch <rburtch3 at gmail.com> wrote:
>
>> Guys,
>>
>> I have all finesse agents. I need to pull all agents who are logged on
>> into another app i'm working on, but I can't seem to filter the API
>> request. There aren't any query parameters in API. Help.
>>
>>
>>
>>
>> Sincerely,
>>
>> Ryan Burtch
>>
>> On Wed, Feb 10, 2016 at 3:55 PM, Brian Meade <bmeade90 at vt.edu> wrote:
>>
>>> If you're split and only want Finesse info, you can use "http://<FQDN>/finesse/api/User/<id>"
>>> and replace <id> with the agent extension from each user you get in
>>> /api/Users and then you can see state information.
>>>
>>> On Wed, Feb 10, 2016 at 4:51 PM, Brian Meade <bmeade90 at vt.edu> wrote:
>>>
>>>> I'm guessing your split so that some users are on CAD and you only want
>>>> info on Finesse users?
>>>>
>>>> If you're only on Finesse, I'd just look at the Live Report for Agent
>>>> State in CUIC.
>>>>
>>>> On Wed, Feb 10, 2016 at 4:45 PM, Ryan Burtch <rburtch3 at gmail.com>
>>>> wrote:
>>>>
>>>>> All,
>>>>>
>>>>> IS there a way to get all the names and agent states of all agents
>>>>> currently logged into Finesse?
>>>>>
>>>>> I have pulled been able to pull ALL the agents that have used finesse
>>>>> via GEThttp://<server>/finesse/api/Users/
>>>>> <http://10.36.41.25/finesse/api/Users/>, but I would like to pull
>>>>> only certain user states like Not Ready, Ready, Talking, etc
>>>>> Do you know how I could accomplish that?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Ryan Burtch
>>>>>
>>>>> _______________________________________________
>>>>> cisco-voip mailing list
>>>>> cisco-voip at puck.nether.net
>>>>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>>>>
>>>>>
>>>>
>>>
>>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20160212/abc3916e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1364 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20160212/abc3916e/attachment.png>
More information about the cisco-voip
mailing list