Data Explorer Queries accessible to public


#1

I recognize that for security reasons we would not want the public to be to define new queries.

But there could be some really cool uses for a query created by an admin and accessible not only to admins and moderators but also to the public.

For example, it would be interesting let users do a full-text boolean search on the contents of a Category.

Or maybe a user wants to enter a keyword and then download a list of all the external links referenced in posts which have that keyword in the title.

I do not think this is possible currently with the Data Explorer plugin - correct?

How hard would it be to do this as a personal project or perhaps as a paid project in the Discourse Marketplace?


(Jeff Atwood) #2

There are currently plans to make data explorer queries available to staff in general, but not everyone, no.


#3

If I wanted to create a custom version of the plugin that allowed queries by other groups of users, would it be as simple as assigning permissions to specific sets of users? Or is it more complex than that for some reason?


(Sam Saffron) #4

It would not be simple to extend this to support arbitrary group permissions, would require extensive internal changes. For starters none of the client side payload is even delivered to non staff, the backend API is blocked from non staff, there is no UX to specify permission per query. And so on.


#5

OK - fair enough

If I wanted to write my own front-end to display the data - is it possible for me to determine the credentials to access the database for my forum hosted on Digital Ocean?


(Sam Saffron) #6

Discourse has a very robust API, the sky is the limit.


#7

Thanks for the API suggestion. That may well be the ultimate answer.

First though I am pondering the SQL or Postegre database itself. I regularly use an SQL front-end/reporting tool in my work and thus I am very familiar with creating reports directly from a database. Is it possible to determine the URL and password to access the database for a Discourse forum which I host?


(Jay Pfaffman) #8

If you want to access the database from an external source I believe that you’d need to switch to a two container configuration and open up the database port. If you have a budget, I can help). You can search here for “two container” but you’ll need to understand docker pretty well to get to what you want. (oh, but here is this How to move from standalone container to separate web and data containers)

Edit: since you purchased a two container install, you just need to add a line to the data container and use the password that’s in the file.

It would likely help if you describe your use case rather than focus on solutions that might not be appropriate. What data do you want to expose to whom?