Rest API curl search command - How to search for card on a board

@GlennWilliams

Review the How To Search In Trello page or the Search for cards page, where declaring the board in a search query is described.

I think the REST API documentation is currently being changed, as the parameter for declaring the board used to be the query parameter ‘board’, not a request parameter ‘idBoards’. The former is what is described on those two other pages and what still works on Trello itself.

Here is an example where query parameter ‘board’ is used to find all cards on a particular board that are open:

https://api.trello.com/1/search?query=board:602786e91c69d30e45a9ccd8 is:open&key={ApiKey}&token={ApiToken}

And in the response, the two parameters are properly parsed as search modifiers:

"modifiers": [
            {
                "text": "board:602786e91c69d30e45a9ccd8"
            },
            {
                "text": "is:open"
            }
],

Searching by board name also works:

https://api.trello.com/1/search?query=board:"my board" is:open&key={ApiKey}&token={ApiToken}

The REST API documentation says the request parameter idBoards is meant to be a thing called a ‘oneOf’:

idBoards
oneOf [string, string]
mine or a comma-separated list of Board IDs
Style: form

…not a comma separated string, as per every single other array parameter on the page!

I’m not sure why there are two separate ways to define the board(s) to be included in the search, or what happens if the two were to overlap or contradict each other

This is the second time in the past few days (refer to this question) that I’ve noticed a previous text based parameter in the Trello REST API docs has disappeared and replaced by a new ID based parameter. There have been no announcements from the Trello team about these changes.

1 Like