Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,948
Community Members
 
Community Events
168
Community Groups

Search Trello Cards based on either card name or card description

I have a requirement where user gives some text and I want to fetch all Trello cards which are having user entered text either in card name or card description. I found this Trello Rest API Search Documentation to search Trello cards. After I have gone through the documentation I constructed below API calls to filter Trello cards.

API 1: This fetches all Trello cards that contains XYZ in their card description.

https://api.trello.com/1/search?query=description:"XYZ"&partial=true&modelTypes=cards&board_fields=name&card_fields=name&list_fields=name&cards_limit=90&card_board=true&card_list=true&token=AccessToken&key=AppKey

API 2: This fetches all Trello cards that contains XYZ in their card name.

https://api.trello.com/1/search?query=name:"XYZ"&partial=true&modelTypes=cards&board_fields=name&card_fields=name&list_fields=name&cards_limit=90&card_board=true&card_list=true&token=AccessToken&key=AppKey

If I union API 1 and API 2 responses, then it gives all Trello cards which are having XYZ either in card name or in card description. I just wanted to know, this is the only way I can finish my requirement or is there other way/any direct Trello Rest API to accomplish my task.

Any suggestions/solutions more than welcome. Thanks in Advance.

1 answer

0 votes
Hakeem Olasupo Community Leader Nov 28, 2021

Thanks for sharing this 😊

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events