# Data Explorer Queries accessible to public

**URL:** https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127
**Category:** Feature
**Tags:** data-explorer
**Created:** [09.Январь.2019 23:17:43 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127 "2019-01-09T23:17:43Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![rkaplan](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://meta.discourse.org/u/rkaplan)
#### Post date: [09.Январь.2019 23:17:43 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/1 "2019-01-09T23:17:43Z")

</div>

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](https://meta.discourse.org/t/32566?silent=true) plugin - correct?

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [10.Январь.2019 03:05:24 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/2 "2019-01-10T03:05:24Z")

</div>

There are currently plans to make [data explorer](https://meta.discourse.org/t/32566?silent=true) queries available to staff in general, but not everyone, no.

---

<div class="post-metadata">

### Author: ![rkaplan](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://meta.discourse.org/u/rkaplan)
#### Post date: [10.Январь.2019 05:19:19 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/3 "2019-01-10T05:19:19Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [10.Январь.2019 05:34:05 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/4 "2019-01-10T05:34:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rkaplan](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://meta.discourse.org/u/rkaplan)
#### Post date: [10.Январь.2019 05:58:50 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/5 "2019-01-10T05:58:50Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [10.Январь.2019 06:01:53 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/6 "2019-01-10T06:01:53Z")

</div>

> [@rkaplan](#):
>
> 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?

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

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …

---

<div class="post-metadata">

### Author: ![rkaplan](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://meta.discourse.org/u/rkaplan)
#### Post date: [10.Январь.2019 11:30:04 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/7 "2019-01-10T11:30:04Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [10.Январь.2019 13:24:58 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/8 "2019-01-10T13:24:58Z")

</div>

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 [Move from standalone container to separate web and data containers](https://meta.discourse.org/t/how-to-move-from-standalone-container-to-separate-web-and-data-containers/29413?source_topic_id=32823))

Edit: since you purchased a [two container install](https://www.literatecomputing.com/product/discourse-pro-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?

---

<div class="post-metadata">

### Author: ![tkearsley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tkearsley/32/155788_2.png) [@tkearsley](https://meta.discourse.org/u/tkearsley)
#### Post date: [11.Февраль.2020 21:25:44 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/9 "2020-02-11T21:25:44Z")

</div>

Привет, Джефф! У тебя есть сроки предоставления доступа к исследованию данных сотрудникам?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [11.Февраль.2020 21:31:21 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/10 "2020-02-11T21:31:21Z")

</div>

В прошлом октябре! [Discourse 2.4.0.beta5 Release Notes - #2 by justin](https://meta.discourse.org/t/discourse-2-4-0-beta5-release-notes/129988/2?u=jomaxro)

Приносим извинения, мы так и не опубликовали здесь обновление. Теперь вы можете предоставить группам доступ только для чтения к любому запросу в [Data Explorer](https://meta.discourse.org/t/32566?silent=true). Как администратор, откройте запрос, к которому вы хотите предоставить доступ группе, и введите название группы в поле «Разрешить группам доступ к этому запросу». После сохранения пользователи смогут видеть этот запрос на странице группы по адресу `example.com/g`

---

<div class="post-metadata">

### Author: ![tkearsley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tkearsley/32/155788_2.png) [@tkearsley](https://meta.discourse.org/u/tkearsley)
#### Post date: [11.Февраль.2020 22:22:35 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/16 "2020-02-11T22:22:35Z")

</div>

Всё в порядке. Спасибо!

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/4/c4b94cb8ac126d9222afab21fff2207996dd35b7.png)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [09.Октябрь.2020 15:10:21 UTC](https://meta.discourse.org/t/data-explorer-queries-accessible-to-public/106127/17 "2020-10-09T15:10:21Z")

</div>


