cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
785
Views
0
Helpful
6
Replies
KomalJagtap26756
Beginner

How to get Team data for Supervisor.

Hi there,

       For Supervisor,there should get Team Information assigned to that supervisor.I have done proper finesse request(passing the supervisor id), but in the Cisco Rest API Guide,XML is not given.

      I am passind this XML in Finese Request(xml = "<Team><id>"+teamIdd+"</id></Team>";),for teamIdd ,I have tried both team Id & Supervisor Id,but it not worked. So,I am not getting what XML and Request parameter have to pass in the Finese request.

Thanks in advance,

Komal

6 REPLIES 6
Anthony Holloway
Cisco Employee

Can you share your actual request? Are you trying from Postman or the like?

Hi,

 

Like Anthony requested, can you share your actual request? Are you making REST request or trying to subscribe to get team notifications? If you are making a REST request, this is the API to get the data from a team: https://developer.cisco.com/docs/finesse/#!teamget-team/teamget-team

 

Thanx,

Denise

Hi Denise,

       I am already  making the REST request to get data from team as you specified the API link.But still nothing is getting in the response.

         Before sending REST request for getting  team data is there need to subscribe team notification? If yes ,then how to subscribe for team notifiaction.In the Cisco REST API Guide,sufficient information for team notification subcription is not there.No HTTP Request format given.

Thanks in advance,

Komal


@dekwan wrote:

Hi,

 

Like Anthony requested, can you share your actual request? Are you making REST request or trying to subscribe to get team notifications? If you are making a REST request, this is the API to get the data from a team: https://developer.cisco.com/docs/finesse/#!teamget-team/teamget-team

 

Thanx,

Denise



@dekwan wrote:

Hi,

 

Like Anthony requested, can you share your actual request? Are you making REST request or trying to subscribe to get team notifications? If you are making a REST request, this is the API to get the data from a team: https://developer.cisco.com/docs/finesse/#!teamget-team/teamget-team

 

Thanx,

Denise


 

Hi Anthony ,

              I am not trying from Postman .I am trying from REST request.I am passing this (calling getTeam Finesse function)request _finesse.getTeam(_username,_getTeamHandler,_getTeamHandler) to finesse(to get team data).In this request _useraname is the Supesrvisor/AgentId (Login Id )which is getting from the following XML .I have tried _username as teamId also:

<Update>
<data>
<user>
<dialogs>/finesse/api/User/Agent001/Dialogs</dialogs>
<extension>6001</extension>
<firstName>Jane</firstName>
<lastName>Doe</lastName>
<loginId>Agent001</loginId>
<loginName>Agent001</loginName>
<mediaType>1</mediaType>
<pendingState></pendingState>
<reasonCode>
<category>NOT_READY</category>
<code>32760</code>
<forAll>true</forAll>
<id>34</id>
<label>Agent Logon</label>
<uri>/finesse/api/ReasonCode/34</uri>
<systemCode>true</systemCode>
</reasonCode>
<reasonCodeId>34</reasonCodeId>
<roles>
<role>Agent</role>
<role>Supervisor</role>
</roles>
<settings>
<wrapUpOnIncoming></wrapUpOnIncoming>
<wrapUpOnOutgoing></wrapUpOnOutgoing>
</settings>
<state>NOT_READY</state>
<stateChangeTime>2020-08-17T09:50:33.558Z</stateChangeTime>
<teamId>2</teamId>
<teamName>Team_IT_Tier1</teamName>
<teams>
<Team>
<id>2</id>
<name>Team_IT_Tier1</name>
<uri>/finesse/api/Team/2</uri>
</Team>
</teams>
<uri>/finesse/api/User/Agent001</uri>
<wrapUpTimer>-1</wrapUpTimer>
</user>
</data>
<event>PUT</event>
<requestId></requestId>
<source>/finesse/api/User/Agent001</source>
</Update>

 

And in the Finesse I have written the actual function for getTeam is as follows:

this.getTeam = function (teamIdd,handler, errHandler) {
var method = "GET",
url = _webappPath + "/api/Team/" + teamIdd ;
params = {"teamIdd": teamIdd};
_sendReq(url, method, null, params, handler, errHandler);
};

 

Thanks,

Komal 

 

 

I recommend using something like Postman to understand the request first, then you can write the javascript to support it. In this way, you'll see that you do not POST xml to the resource like you stated you were doing in your original post. Nor would you send a param named "teamIdd" to it (E.g., ?teamIdd=1).

The request is simply:

GET https://{{UCCX Pub}}:8445/finesse/api/Team/1

*Team 1 is the default team for testing, you'd supply your own Team ID.

I wonder if you could get it working knowing that, or if you need javascript help.

Hi,

 

Agree with Anthony about recommending to try with Postman first. 

 

As far as your question about subscriptions, if you want to be getting a notification every time a change happens in the team, then you need to subscribe to the node. You can find more info here for non Javascript&colon; https://developer.cisco.com/docs/finesse/#!subscription-management and here for Javascript&colon; https://developer.cisco.com/docs/finesse/#!rest-services-team/team

 

Thanx,

Denise

 

 

 

 

Create
Recognize Your Peers
Content for Community-Ad