Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get url of an card you made

Scraayp April 19, 2021

After long search in api I couldn't find an easy way to get url of the card I make. The card make post function doesn't give any data with it, and the card find requires ID which you can't get automaticly.

So the question is, what's the fastest way to get the id of an card you make with the api without needing an human to do something!

3 answers

1 accepted

4 votes
Answer accepted
Sunny Ape
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.
April 19, 2021

Hello @Scraayp 

When using Trello's REST API to create a card via a POST request to the /1/cards endpoint, the body of the response contains extensive information about that new card, including both the long and the short URL for the card.

Here is a just small sample of what the REST API will tell you about a card that was just created:

 

"idBoard": "602786e91c69d30e45a9ccd8",
"idList": "60541af09b1c4353c8a3b29b",
"idMembersVoted": [],
"idShort": 80,
"idAttachmentCover": null,
"idLabels": [],
"manualCoverAttachment": false,
"name": "Test card",
"pos": 81919,
"shortLink": "4JB4J6h2",
"isTemplate": false,
"cardRole": null,
"dueComplete": false,
"due": null,
"email": null,
"labels": [],
"shortUrl": "https://trello.com/c/4JB4J6h2",
"start": null,
"url": "https://trello.com/c/4JB4J6h2/80-test-card",


The Trello REST API documentation doesn't list all the values the REST API will return for all request types, so you have to try making a request once yourself, then look at the results to know what will be sent back in addition to the response status number.

Scraayp April 19, 2021

I don't understand why they didn't specify in documentation what the api returns but it works! 

Thank you

0 votes
Scraayp April 19, 2021

Those are the parameter to give when creating the card. So this doesn't actually return the url of the card created! 

So no, it doesn't answer my questions

Thanks for trying tho

Scraayp April 19, 2021

Just ignore this one, I didn't see the reply button! Ye ye, I know. I'm big noob

0 votes
Vero Rivas
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.
April 19, 2021

Hi @Scraayp 

   Look at this post, maybe can help you

   https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post

   rpta.JPG

Cheers

   

Scraayp April 19, 2021

Those are the parameter to give when creating the card. So this doesn't actually return the url of the card created! 

So no, it doesn't answer my questions

Thanks for trying tho

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events