Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to list groups and their members in specific directory via RestAPI?

Hi everyone,

How do I get a list of all group and their members in specific directory in crowd? I just want to see a display name of user/group. Also a user status, I want to get only users are activating.

For example

  • Group A:
    • User1
    • User2
    • ...
  • Group B

I reading Crowd REST API document, but it not mention about Crowd directory, any idea?


3 answers

1 accepted

1 vote
Answer accepted
Tarun Sapra Community Leader May 30, 2018

Hello @tiendungitd

The Crowd REST API is built to be accessed by Applications and thus you can fetch details of users which are part of application-directory mapping i.e. your application must be mapped to the directory whose users you want to fetch. You can also create a dummy application for this purpose.

From the docs

This set of REST APIs is intended to be used by applications connecting to Crowd.

@Tarun Sapra

I'm using the command below to fetch user membership

curl -u user:pass http://localhost:8095/crowd/rest/usermanagement/latest/group/membership

But it get all users/groups in all Crowd Directories, my expect is only get from one Directory. 



Tarun Sapra Community Leader May 30, 2018

That's happening because the username:password you are using belong to an application that is mapped to all directories.

Thanks Tarun, now I got your idea. I just added new Generic Application with application url is a current crowd url, now I can get user information in Directory which mapping to the new Application.

Do you know how to list all group?

Yes, it's easy

please go through the docs here

Get all membershipsGET /rest/usermanagement/1/group/membership

Retrieves full details of all group memberships, with users and nested groups. This resource is optimised for streaming XML responses, and does not support JSON responses.

above given command does work me after i did some changes.

i need to crowd api to create groups for new user for a new onboarding project 

Tarun Sapra Community Leader May 30, 2018

Hello @Moses Thomas

I think you have mis-read the question as it's about "Crowd Rest API" but the link shared by you is for the "Cloud API"

Moses Thomas Community Leader May 30, 2018

Yes thanks for the point

@tiendungitdPlease see link posted by  @Tarun Sapra

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

328 views 0 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you