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

Script to list Customers in a project

C_ Derek Fields
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 28, 2021

 Can you point me to an API or approach that will return a list of customers in a specific service desk? I can get the customers associated with the organizations. I don't see any API that will return the customers who are not associated with an organization.

1 answer

1 accepted

5 votes
Answer accepted
Ivan Lima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2021

Hey @C_ Derek Fields, have you tried the Get customers API. It's marked as experimental, but it should do what you're looking for.

Ivan Lima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2021

I just realized you tagged the question as Server. I'll dig around to see if I can get some insight into that.

C_ Derek Fields
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 29, 2021

I appreciate the help. I have looked through the entire JSM Java API and can't find anything that appears to return customers who are not associated with an organization.

I even looked through the database and can't figure out how they are associating customers with a project. It has to be in the database somewhere but I haven't found it.

Ivan Lima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2021

Yeah, there is no API. A feature request, JSDSERVER-6791, was raised through this community post, SERVER REST API - How to get users without organization, which is related to what we're discussing here. As suggested in the post, I have tested the Server REST API just in case, and it doesn't work.

For the database, you can find the users, organizations and their relations in the tables: 

  • AO_54307E_ORGANIZATION_MEMBER
  • AO_54307E_ORGANIZATION

You can find all JSM tables, starting with "AO_54307E" at List of Jira Server AO table names and vendors. More details at How to Identify Active Objects AO Tables in Jira Application Database.You can also find them on your installation by navigating to JIRA_URL/plugins/servlet/active-objects/tables/list.

I noticed that if you have customers without organizations, they won't show up on the AO_54307E tables, but you can get the list of customers through the Service Desk Customers roles using the Get project roles API.

I hope that makes sense.

C_ Derek Fields
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2021

@Ivan Lima That is awesome. Thanks for the direction towards the Role API. I wish I could find a matching Java API since I am writing my script in Groovy, but so be it. This will work for me. Thanks so much!

Like Ivan Lima likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events