Is there any way to extract a URL to a post from Discourse backend DB?

I need to build a report of posts made by a specific group of people so I pull a list of those from posts table, joined by users and topics. This gives me a nice view of the content for each post, its author, which topic it belongs to and which category it’s in. I’d like to also include a link to that specific post, but I can’t find which table are the URLs stored at. Tried searching the forum and didn’t find either.

Appreciate the help,
Oleg.

You might have a look at What cool data explorer queries have you come up with?.

The url is /t/post.topic_id/post.post_number if I remember the field names exactly right.

The slug is also stored in the topics table.

2 Likes