How can I identify a topic created using the API?


(Aarskin) #1

Continuing the discussion from Post a new Topic with REST - 403 Forbidden:

I can successfully create topics via the API! Now I want to add a reply to the topic I just created, and I need the topic_id. Looking at the HttpResponseMessage I’m being returned doesn’t reveal this identifying piece of information.

Where can I find the topic_id of a newly created topic?


(Carlo Kok) #2

Wild guess, but did you look at the response headers (like Location) or response body?


(Aarskin) #3

Good thought but location is null and I don’t see anything in the Content either :confused:


(Aarskin) #4

Right now my workaround is to fetch the latest topics and do a manual title comparison. But I feel like there’s gotta be a more elegant way.

I thought the above could be a workaround, but even requesting latest.json is only returning two topics… the two oldest topics in fact, not the one I just created and can see from the front end.