Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get an agent list of a Service Desk via REST?

Marcos Strapazon January 24, 2023

Hello people!!

 

With this endpoint we get a list of Service Desks:

https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk

 

I wonder if there is a way to get the agents of each Service Desk.

Has anyone achived such requirement?

 

I went throught the documentation in the below link but I couldn't find a solution

https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/

 

Thanks in advance!

1 answer

0 votes
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2023

Hi @Marcos Strapazon 

 

First you have to make sure to use the right rest api doc, if you are on server you have to use the server api not the cloud one.

You can go to the admin section > Application > Application Access then get the name of the group that grant agent permission. Then use the api to get the list of user of this group.

https://docs.atlassian.com/software/jira/docs/api/REST/9.6.0/#api/2/group-getUsersFromGroup

 

Regards

Marcos Strapazon January 24, 2023

Hello @Florian Bonniec ! Thank you for your rapid answer!

in fact I don't need to the the aplication access but the users in a Service Desk (a project in the Service Managment Application).

I found a way to do so, first getting the Project's roles:

/rest/api/2/project/{projectIdOrKey}/role

and then, getting the information of each role:

/rest/api/2/project/{projectIdOrKey}/role/{id}

in this way I could retrieve the agents of a specific project because the response includes an array of users for that role.

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2023

Right it's the way to go if you want to have the information per project. Note that actually Service Desk role do not grant any permission.

 

In fact all agents from a project are all users having the Service Desk Agent permission (permission scheme of the project) and have the application access to JIRA Service Desk (Management).

 

So if in all your permissions scheme, Service Desk Agent permission is granted to Service Desk Team only, your solution will work.

 

Regadrs

Marcos Strapazon January 25, 2023

@Florian Bonniec thank you very much for your comments on this topic!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events