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

Any Suggestions?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 18, 2018 in Trello

How two Biomed teachers use Trello to execute on Project Lead The Way

This is the first of many Showcases highlighting incredible Atlassian users in Education! And Michael Burke and Josh Clemmer are setting the Showcase bar high. The pair of Biome...

47,391 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you