hi:
I’m developing the integration between TestLink (GitHub - TestLinkOpenSourceTRMS/testlink-code: TestLink Open Source Test & Requirement Management System) and Trello.
I need to get a card content, using the CARD NUMBER (idShort?) but after reading the documentation I was not able to find how to do the API CALL using the card number.
There is something I’m missing?
thanks
Hi,
It can be a little confusing as there are a number of different ways you can get a card’s information.
In general, we recommend using the full id
or the shortLink
of the card to access information about the card as that ID is unique across all of Trello.
The API call for getting card content should look like:
https://api.trello.com/1/cards/:id?key={{key}}&token={{token}}
Here’s the documentation that covers this request: https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-get
However, there are two other fields on the card that can be used to GET information about a card.
If we look at this example request, we can see there are three fields to use: https://api.trello.com/1/cards/3CsPkqOF?fields=id,idShort,shortLink
The shortLink
for a card can be used in place of the id
. It is unique across all of Trello as well. You can see in the request above we are using the short link.
Additionally, there is a idShort
. This is a number that is roughly correlated to the order of the cards creation on the board. It can be used to get a card’s info but only via a boards nested resource request. For instance, using the idShort
for the above card, we can get the same response via this request: https://trello.com/1/boards/5b6893f01cb3228998cf629e/cards/1
Kindly,
Valentyn