How to get all the users on the card?

Rick
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!
November 9, 2017

Hi there,

I need your help to find the trello API(s) to get all the users on a given card:

  • the card creator
  • the members who are assigned the card
  • the users who are subscribed to the card
  • the users who have ever commented on the card
  • the users who have ever been "at" in the comment.

Does the trello has the API(s) to support this?

BTW, does the trello "@card" mean all the users above? 

thanks.

1 answer

0 votes
Caity
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2017

Hi there,

First, the "@card" notification option will notify every user who is a member of a card. That means every user whose avatar or initials is displayed on the card.

As for your questions about the API, let's go through those one by one:

The card creator

To find the card creator, you'll need to look up the "cardCreate" action using this request:

/1/cards/[card ID]/actions?filter=createCard

The "memberCreator" section in the API results for that action will give you the information of the person who created the card

You can find more information about getting card actions via the API here: https://developers.trello.com/v1.0/reference#cardsidactions

The members who are assigned the card

You can find this with the following request:

/1/cards/[card ID]/members

which is documented here:

https://developers.trello.com/v1.0/reference#cardsidmembers

The users who are subscribed to the card

Subscriptions are private, so this information isn't available via the API.

The users who have ever commented on the card

To do this, you would first want to use /1/cards/[card ID]/actions?filter=commentCard to get all of the comment actions that have occurred on that card. Then, you could write a script to parse the "memberCreator" information from those results.

The users who have ever been "at" in the comment.

There isn't a way to directly get this information via the API. The closest option would be to use the request described above to get all of the comment actions from a card, and then write a script that would look for a pattern of @ followed by some characters, followed by a space.

Rick
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!
November 15, 2017

Hi Caity,

This is very helpful, thank you so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events