Forums

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

Only getting actions of type commentCard from the API unlike from the website?

Bjarni
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!
March 14, 2020

Hello

When I have a card open in the browser and add .json at the end of the URL I get a json file which includes an array of actions of various types (commentCard, createCard, addMemberToCard, updateCard). However with the following API call:

https://api.trello.com/1/cards/{cardID}/actions?key={API_key}&token={API_token}

I only get actions of type commentCard. How can I get all actions of the card?

The problem is not that there are too many comments to show the other types.

Thanks.

1 answer

1 accepted

1 vote
Answer accepted
Iain Dooley
Community Champion
March 14, 2020

@Bjarni Have a look at the documentation do the card/actions end point and you’ll see that the default filter is commentCard, you need to include the filter parameter explicitly to get other types, and the limit parameter will also allow you to see more actions than the default: 

 

8DD03DA7-F32B-4E4B-A29E-6D1FEBBA4BEA.png

Bjarni
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!
March 14, 2020

It works perfectly now, I should have read the documentation more carefully. Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events