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

What API query will return a set of cards filtered on a label and status of archived over timerange?

Stephen_Ohimor January 22, 2020

I would like the list of cards that satisfy the following criteria:

  • I've set the label to Done (light-blue)
  • I've archived the card
  • The card was created in the year 2019

 

What I've tried so far

  1. Attempted to use the UI but there is a limit of 50 cards per search and I require 300-500 cards.  There doesn't appear to be a way to page through results via the UI
  2. Signed up for the api and started pulling cards via the following endpoint:
    1. https://api.trello.com/1/boards/{board_Id}/cards?limit=1000&label_fields=Done&key={key}&token={token}
    2. Note, "Done" won't work because it isn't in the set of enumerations, however, I'm not sure how to filter the cards using the label as there doesn't appear to be anything similar to an "IN" operator.

This is a bit urgent.

3 answers

0 votes
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2020

@Stephen_Ohimor You can't search for cards that way using the boards endpoint, but you can use the search endpoint, here's my implementation of it in the Trellinator code:

https://github.com/iaindooley/trellinator-libs/blob/master/TrelloApi.js#L39

The thing you wanted to do would look something like this:

https://gist.github.com/iaindooley/490adcb84ab22fecb03627cd2d3f340e

You can read more about Trellinator here:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271

Thanks for the heads up @Esme Crutchley and apologies for the delayed response

0 votes
Stephen_Ohimor April 27, 2020

It would be helpful if the card/record count restriction was lifted.  I found a workaround via the archive list but this was a real pain point.  Not having the feature made me rethink using Trello and it's so fundamental it feels unfair to have to pay for it.  

0 votes
Esme Crutchley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2020

Hi @Stephen_Ohimor 

Did you manage to get this sorted out in the end?

@Iain Dooley is this something that Trellinator could help with?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events