Karen Gonzalez
Karen Gonzalez

Reputation: 674

Trello Api: list all cards for a given date range considering last activity date of the card in Trello?

I need to list all the cards for a given date range in Trello. I know that I can use "since" and "before" as arguments. BUT I don't know which date would consider this filter. I need it to be the "dateLastActivity" of the card. So, the question is, "Which date is using Since and Before arguments to do the search? Is there a way to list the cards that I need for a given date range considering dateLastActivity?" ... Thanks in advance.

Upvotes: 0

Views: 2917

Answers (1)

Rob
Rob

Reputation: 56

The since and before arguments to the api call shown below look at the date a card was created. I tested this and found that only cards that were created since '2015-07-30' were returned, even though there was activity on other cards on the same board.

https://api.trello.com/1/board/[board id]/cards?fields=name,labels,url,idShort,idList,dateLastActivity&since=2015-07-30&key=[key]&token=[token]

I have the same requirement to only gather cards using dateLastActivity in a certain date range but found it wasn't supported. I also tried the actions_since argument, but this only affects what actions appear in the result set linked to the card. It won't filter out cards. My workaround has been to get all cards and then in my program filter out the ones I don't need by comparing a date range to dateLastActivity.

Upvotes: 4

Related Questions