Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get url of an card you made

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

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.

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

Thank you

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

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

0 votes
Vero Rivas Community Leader Apr 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

   

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
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristjan Geir Mathiesen - Origo for sharing the picture of Taco having fun with his new friend...

550 views 19 20
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you