# Data Explorer / Discourse API issues

**URL:** https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055
**Category:** Data & reporting
**Tags:** data-explorer, rest-api
**Created:** [September 11, 2024, 6:27pm UTC](https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055 "2024-09-11T18:27:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xyzzy](https://avatars.discourse-cdn.com/v4/letter/x/e36b37/32.png) [@xyzzy](https://meta.discourse.org/u/xyzzy)
#### Post date: [September 11, 2024, 6:27pm UTC](https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055/1 "2024-09-11T18:27:57Z")

</div>

1. Is there any way to make a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query accessible via the Discourse API without making the user associated with the API key an admin? (From my experimentation, it seems all API queries are of the form “/admin/plugins/explorer/queries/NNN/run” and non-admins do not appear to have access to “/admin” and below.)

2. In the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) UI, I have “Allow groups to access this query” set to a specific group. Despite this, I’ve found that admin users that are _not_ members of the group still have access. Is this expected?

Many thanks in advance!

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [September 11, 2024, 6:44pm UTC](https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055/2 "2024-09-11T18:44:16Z")

</div>

> [@xyzzy](#):
>
> From my experimentation, it seems all API queries are of the form “/admin/plugins/explorer/queries/NNN/run” and non-admins do not appear to have access to “/admin” and below.

You can allow groups to access a query as you noticed… when this is enabled a non-admin member of a group can access a query from `g/{groupname}/reports/{id}`

> [@xyzzy](#):
>
> I’ve found that admin users that are _not_ members of the group still have access. Is this expected?

this is expected, admins can access everything

---

<div class="post-metadata">

### Author: ![xyzzy](https://avatars.discourse-cdn.com/v4/letter/x/e36b37/32.png) [@xyzzy](https://meta.discourse.org/u/xyzzy)
#### Post date: [September 12, 2024, 5:57pm UTC](https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055/3 "2024-09-12T17:57:25Z")

</div>

Hi! Thanks for the quick response!

1. I’m aware that the `g/{groupname}/reports/{id}` URL works for **users interactively logged into the Discourse site**. However, **using cURL to call the Discourse API using URLs of that format** does not work. I’ve tried a wide variety of user types, groups and API key settings and none worked. In the hopes of eliminating as many factors as possible, I tried with an API key that has no scopes configured (I assume this means its wide open) and associated that key with an admin user (who’s a member of the group that the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query references) and I get an HTML page in response that says “Oops! That page doesn’t exist or is private.”

2. Thanks for confirming that admins can access everything. I suspected as much.

Thanks again!

---

<div class="post-metadata">

### Author: ![albertocottica](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/albertocottica/32/119622_2.png) [@albertocottica](https://meta.discourse.org/u/albertocottica)
#### Post date: [May 5, 2025, 4:48pm UTC](https://meta.discourse.org/t/data-explorer-discourse-api-issues/326055/4 "2025-05-05T16:48:35Z")

</div>

> [@xyzzy](#):
>
> However, **using cURL to call the Discourse API using URLs of that format** does not work.

Hello all, I am also interested in a solution to this. 🙂
