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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.