How to get a list of card with specific action property?

I’m building a Ruby script pulling data from Trello and stuck at getting specific action property.
Here is my link:{idList}/cards?fields=desc,name&attachments=true&attachment_fields=name,url&actions=commentCard&key={apiKey}&token={token}

I’ve tried to add action_fields=data, but it won’t work.

You are specifically filtering for actions of type commentCard. It may be the case that there are no actions of that type in the cards.

The following request with actions=all will give you all of the cards’ actions:,name&attachments=true&attachment_fields=name,url&actions=all

The return results have exactly actions I want but it comes with the other field(type, date, limits, memberCreator) that I don’t need.

I want the return result just have commentCard action with data field only.

I see. Unfortunately, there is no way to specify only that data be returned on the action. You must parse the response and hold onto the the things you need yourself.

1 Like