It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there any way to search all organizations/members using /search API?

Hello,

 

I've a requirement to retrieve all organizations under my account. I tried /search API with the help of ?query for this. However, in query I need to try all the alphabets from 'a' to 'z' one by one. To avoid this, is there any other approach of using any wildcards like '*' or '%' or '.' in query so that in one request itself I will get all my organizations (teams).

 

Similarly, I need to retrieve all my members in one shot, either using /search?query or /search/members?query

 

Please help.

2 answers

0 votes
Iain Dooley Community Leader Nov 03, 2018

@Krishna Prasad PS check out the members/organizations endpoint:

https://developers.trello.com/reference/#membersidorganizations

You can then loop through these orgs to fetch all members in each:

https://developers.trello.com/reference/#organizationsidmembers

In the API "teams" are referred to as "organizations", I guess it's a terminology relic from when the API was initially created, and they later modified the interface to say "Teams" but didn't want to upset the apple cart by also modifying the endpoint, nor did they wish to have an endpoint "teams" as an alias for "organizations" :) Anyway, just a little peculiarity in the terminology

Thanks for the reply.

Let me reframe the question.

I need an endpoint to retrieve all members using single search query. Similarly, I need an endpoint to retrieve all organizations using single search query. In other words, the search query needs to have some wild card which indicates all members or organizations.

Please help.

Thanks for the reply.

Let me reframe the question.

I need an endpoint to retrieve all members using single search query. Similarly, I need an endpoint to retrieve all organizations using single search query.

Please help.

Iain Dooley Community Leader Nov 03, 2018

@Krishna Prasad PS The first endpoint above gives you all organizations your account has access to.

There's no sense in which you can "get all members in a single query" because members are either members of a board or members of an organization.

The only way you can get "get all members" of something that is not either a board or an organization is if you have an enterprise plan:

https://developers.trello.com/reference/#enterprisesidmembers

Ok, I got it. Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

Develop a new Habit during Lockdown

If you had to thrive a new habit during a lockdown, what would it be? Trello

1,622 views 15 6
Read article

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