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!!
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.