Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trello API: getting boards / lists / cards information

Tags:

list

trello

api

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

like image 648
Juan Fco. Sierra Avatar asked Oct 24 '14 16:10

Juan Fco. Sierra


People also ask

Can Trello count cards in list?

Trello Card Counter reveals many useful insights into your Trello boards by counting the number of cards in each list, by counting the total number of cards across yours boards and by calculating the average number of cards per list.

How do I see all cards on a Trello board?

You can view all of the cards that you have been assigned or added yourself to across all boards, and sort them by board or due date by going to your cards page. To do this just click on your name in the global header and select "Cards" or go to https://trello.com/my/cards .

Does Trello provide API?

Trello provides a simple RESTful web API where each type of resource (e.g. a card, a board, or a member) has a URI that you can interact with. The Trello API documentation is available at https://developer.atlassian.com/cloud/trello.


1 Answers

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 :

https://trello.com/b/EI6aGV1d/blahblah 

point your browser to

https://trello.com/b/EI6aGV1d/blahblah.json 

And you will obtain something like

{   "id": "5a69a1935e732f529ef0ad8e",   "name": "blahblah",   "desc": "",   "descData": null,   "closed": false,   [...]     "cards": [       {           "id": "5b2776eba95348dd45f6b745",           "idMemberCreator": "58ef2cd98728a111e6fbd8d3",           "data": {             "list": {               "name": "Bla blah blah blah blah",               "id": "5a69a1b82f62a7af027d0378"             },             "board": {             [...] 

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.

enter image description here

like image 51
edelans Avatar answered Sep 19 '22 12:09

edelans