Search cards using list of cards id

Nicolas June 28, 2020

Hi,

I'm trying to get cards information using list of cards id. I found that it possible to achieve using the api search but I couldn't pass the list of cards.

here is my url:

'https://api.trello.com/1/search?&modelType=cards&query="card1,card2"&key=[key]&token=[token]'

What am I doing wrong? or there is better way to receive this data?

Thx,

Nicolas 

1 answer

0 votes
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2020

@Nicolas this this from the py-trello library 

def search(self, query, partial_match=False, models=[],board_ids=[], org_ids=[], card_ids=[], cards_limit=10):

This query limits the search on information within board, cards...etc. It does not search card by card_id

If I have to get cards that matches card_ids I would go through all the cards but then if I already have the id then client.get_card(card_id) gets you the card...really no need to search.

** all based on py-trello

My apologies if I have not understood your question completely

Nicolas June 30, 2020

thank you for the quick answer

can i pass the search function wildcard on the query parameter and pass list of card ids ?

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2020

When you do that basically you are saying get me ‘xyz’ but look at only these cards with these IDs

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events