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

Trello API to filter board's card-archive actions

I am trying to use the Trello API to list the actions of a board that correspond to cards being archived.  Anyone know how I can set up a filter query in the API call to do that?

What I gathered so far is that card-archive actions are represented as actions of type `updateCard`, with a `old: {closed: false}` value inside the `data` property.  I can receive a list of actions and then filter that list for this value, but I'd rather get just the types of actions that I want directly from the API.

The 'Nested Actions via URL Params' section of the documentation shows that the `/object/{id}/actions` endpoint can be queried with a `filter` string, but it isn't clear to me how I can use that to get just `updateCard` actions that have a `old: {closed: false}` value in their data property.  Anyone know how to construct such a filter query?  Thanks!!

1 answer

0 votes
Garrett Atlassian Team Oct 26, 2018

Hey Daniel,

You can pass updateCard:closed as the filter.

It will include archived and unarchived cards. You'll have to filter out the unarchived ones if that's what you'd prefer.

Here's an example URL: https://api.trello.com/1/card/<idCard>/actions?key=<key>&token=<token>&filter=updateCard:closed

I hope this helps!

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,598 views 14 6
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