Search code examples
listapitrello

Trello API: Retrieve list name from a card


I'm using Trello's API and I'm trying to retrieve the List name of the list of a defined card.

If I do

https://api.trello.com/1/cards/{idCard}?key={mykey}&token={mytoken}

This returns me all the informations about the card that I defined with the Id, and gives me the idList.

enter image description here How can I obtain the list name of the card's list with only one query?

There is something similar to wordpress that let the user to retrieve all the information embedded in the json using the _embed tag in the query?

Thank you


Solution

  • Check the official document of /cards/{id}/{field}. You can get any field like this, and in case of idList:

    https://api.trello.com/1/cards/{idCard}/idList?key={mykey}&token={mytoken}
    

    Another way:

    https://api.trello.com/1/cards/{idCard}/list?key={mykey}&token={mytoken}&fields=id