API: how to get discussion id when i have discussion url

Anton Litvinenko's Avatar

Anton Litvinenko

12 Jun, 2014 07:06 PM

Hello,

Looks like TenderApp uses discussion number to navigate discussion in UI. but in the API discussion ID is used everywhere. So, my question is how can i get discussion ID when all i have is a discussion URL?

thanks!

  1. 1 Posted by Julien on 12 Jun, 2014 07:16 PM

    Julien's Avatar

    Hi Anton,

    You can't. What are you trying to do/accomplish? Maybe I can help.

    Cheers!

  2. 2 Posted by Anton Litvinenk... on 12 Jun, 2014 10:21 PM

    Anton Litvinenko's Avatar

    I want to be able to load discussion info based on the url/number that user provides. In Tender app UI it is only possible to see discussion number or url, so I can't even ask for ID.

  3. Support Staff 3 Posted by Courtenay on 12 Jun, 2014 11:10 PM

    Courtenay's Avatar

    If you have the discussion url you have all the pieces you need.

    curl -H "Accept: application/vnd.tender-v1+json" "https://USER:[email blocked]/YOURSITE/category_permalink/discussion_number"
    
  4. Support Staff 4 Posted by Courtenay on 12 Jun, 2014 11:12 PM

    Courtenay's Avatar

    If you send a category permalink, it looks up by the discussion number; otherwise by the ID. Sorry for the confusion.

  5. Support Staff 5 Posted by Courtenay on 12 Jun, 2014 11:15 PM

    Courtenay's Avatar

    Here's the correct url form.

    > curl -H "Accept: application/vnd.tender-v1+json" "https://USER:[email blocked]/YOURSITE/categories/questions/123"
    
  6. 6 Posted by Anton Litvinenk... on 12 Jun, 2014 11:42 PM

    Anton Litvinenko's Avatar

    Not sure I understand, can you point me to a description of this call in API docs?

  7. 7 Posted by Julien on 13 Jun, 2014 03:26 PM

    Julien's Avatar

    Hi Anton,

    You can see the documentation here: https://help.tenderapp.com/kb/api/discussions#single-discussion

    You can use user/password or a token for authentication.

    Let me know if you have any question.

    Cheers!

  8. 8 Posted by Anton Litvinenk... on 13 Jun, 2014 03:28 PM

    Anton Litvinenko's Avatar

    Thanks! Looks good!

  9. Julien closed this discussion on 13 Jun, 2014 03:36 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac