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

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

How to get checklists from all the cards in a list?

Hello,

I know the ID of a List which contains many cards. Is there any API for getting checklists from all the cards which are there in that one list?

 

Thanks,

Jigar

3 answers

1 accepted

2 votes
Answer accepted
Felix Atlassian Team Mar 02, 2021

You can grab all the checklists in one call by using something like this:

https://api.trello.com/1/lists/:idList/cards?fields=id&checklists=all&checklist_fields=name,id

Check out the nested resource documentation for the query params that might be useful.

Make sure you only include the fields you actually need, that'll ensure this call is fast.

Also, depending on how many cards/checklists you've got in the list, you may need to break it up into smaller batches, using a limit parameter, and before and/or since params, to paginate the cards in the list.

Finally, if you have more questions about the API or Trello development, the Developer Community is probably a better place for questions like this :)

This is brilliant one liner perfectly suits for my need.

Thanks a lot @Felix 

@Jigar Baraiya 

Realised the equivalent of it using py-trello would be

client.fetch_json('/lists/' + '{idlist}' + '/cards', query_params=({'fields' : 'id', 'checklists' : 'all', 'checklist_fields' : 'name, id',}))

@Felix learned something

@milynnus 

Thanks for the response. So there is not short way other then iterate thru each card.

So I need to follow the steps:

1 . get the list of cards using https://api.trello.com/1/lists/5{listId}/cards?key=xxx&token=xxx

2. iterate thru each card and get the checklist using https://api.trello.com/1/cards/{cardId}/checklists/?key=xxx&token=xxx

Please let me know if any other approach is available for this.

@Jigar Baraiya 

I used a wrapper so I need not go down to this. You should just try. 

I am new to this. can you please post an example for this?

@Jigar Baraiya 

Definitely. You need to iterate through the cards on that list and get the checklist. just do a search you get the APIs.  

https://developer.atlassian.com/cloud/trello/rest/api-group-actions/#api-actions-id-get

Suggest an answer

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

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

153 views 9 7
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