Genesys CTI User Forum > Genesys-related Development
CometD notificiations from WWE using Python
gen_rtfm:
Ok, here's a long shot simply trying to stitch together from different docs.genesyslab.com resources (full disclaimer - this is entirely speculation, hope it helps):
The cometd-client you're developing needs at the point in time you issue the http request to the API to be connected and subscribed to the corresponding channel where the data response will be sent.
It seems that the API has similar uri as the corresponding cometd channel, but cometd has replaced /api/v2/ucs/interactions with /api/v2/me/interactions (where 'me' indicates messages)
I assume that there will arrive a cometd-message on the corresponding topic when the request has been processed by the backend, and you need your client to await a message on that topic with the returned request_id from the http request you sent; you need to filter the messages in the cometd-client to get the response for that specific request, as all messages issued regardless of initiator will be published on that topic.
Looking here https://docs.genesys.com/Documentation/HTCC/8.5.2/API/AsynchronousEvents
I'd say that I'd try to simply listen in on /v2/me/devices channel to get login-events and save those to know who logged in at what time.
I can't find a topic corresponding to the /api/v2/ucs/interactions on that page though, maybe there is a cometd method for querying available topics? I guess that'd be in the official cometd documentation though, and hopefully the python library supports that method.
I found https://aiocometd.readthedocs.io/en/latest/ helpful in describing how to establish a session and subscribe to topics, at least it sounded 'sane' when I read it.
Br
Skickat från min Mi MIX 3 5G via Tapatalk
Kubig:
I would rather use PSDK for similiar tasks or to achieve the same goal as you want.
Mr.T:
[quote author=Kubig link=topic=11587.msg52805#msg52805 date=1587188225]
I would rather use PSDK for similiar tasks or to achieve the same goal as you want.
[/quote]
I can't connect directly to Config Server. its a cloud version, only access is thru web or api.
gen_rtfm:
[quote author=Mr.T link=topic=11587.msg52807#msg52807 date=1587220403]
[quote author=Kubig link=topic=11587.msg52805#msg52805 date=1587188225]
I would rather use PSDK for similiar tasks or to achieve the same goal as you want.
[/quote]
I can't connect directly to Config Server. its a cloud version, only access is thru web or api.
[/quote]Did you have any luck with the cometd session?
Skickat från min Mi MIX 3 5G via Tapatalk
jarrod:
You can also use Jython to access the PSDK library. We did that for the first version of our product as a prototype and then converted it into pure Java which might have been a waste of time.
It was relatively easy to do, I can pull out some of the code if you are interested. But we were connecting to the config server on, still it will you you some insight on how to get started.
Navigation
[0] Message Index
[*] Previous page
Go to full version