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

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

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
Esme Crutchley Community Leader Apr 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?

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
Iain Dooley Community Leader Apr 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

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,492 views 12 4
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