Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trello API to filter board's card-archive actions

Daniel Naftalovich
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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
AUG Leaders

Atlassian Community Events