Using Trello API: - I've been able to get all the cards that are assigned to a Trello user - I've been able to get all the boards that are assigned to an Organization
But I can't get any API call that returns all the lists that are in an Organization or User. Is there any function that allows that ?
Thanks in advance
I don't believe there is a method in the Trello API to do this, so you'll have to get a list of boards for a user or organization:
GET /1/members/[idMember or username]/boards
Which returns (truncated to show just the parts we care about):
Then get the lists for each board:
GET /1/boards/[board_id]/lists
Which returns (truncated to only show the list id and name:
And go through this response for each board to build a list of all the lists a user or organization has.
For the users who want the easiest way to access the id of a list :
Use the ".json" hack !
add ".json" at the end of your board URL to display the same output of the API query for that board, in your browser ! (no other tool needed, no hassle dealing with authentication).
For instance, if the URL of your board is :
point your browser to
And you will obtain something like
Where you can just search for the name of your list to easily find its id next to it.
tip: use a json viewer extension to make your browser display a nice json. Personnally I use https://github.com/tulios/json-viewer/tree/0.18.0 but I guess there are a lot of good alternatives out there.
You can do it by calling
GET /1/organizations/[idOrg]/boards?lists=all
It is here: https://developers.trello.com/advanced-reference/organization#get-1-organizations-idorg-or-name-boards
Look at the arguments.
There are several filters and fields. You can customize it.