# Expose Category and Group IDs to admins

**URL:** https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428
**Category:** Feature
**Created:** [26 juni 2019 om 19:44 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428 "2019-06-26T19:44:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [26 juni 2019 om 19:44 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/1 "2019-06-26T19:44:14Z")

</div>

Hi, I think it would make it easier for admins to edit [data explorer](https://meta.discourse.org/t/32566?silent=true) queries if it was easier to find Category and Group IDs. If this information was made visible to accounts with admin status it wouldn’t bother most people while making it simple to find for those who need access.

Alternatively, in the meantime, if there are already easy ways to find Category and Group IDs, I’m eager to learn how to find this information.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [26 juni 2019 om 20:50 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/2 "2019-06-26T20:50:23Z")

</div>

I’ll admit it’s not super easy to find if you don’t know where to look, but here’s a couple ways:

- [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query:

- via `categories.json`

- via the JS console in the browser, e.g.:

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [26 juni 2019 om 23:18 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/3 "2019-06-26T23:18:45Z")

</div>

> [@outofthebox](#):
>
> I think it would make it easier for admins to edit [data explorer](https://meta.discourse.org/t/32566?silent=true) queries if it was easier to find Category and Group IDs.

For [Data Explorer](https://meta.discourse.org/t/32566?silent=true) queries, you can use a pattern similar to the `WHERE` statement in this query to avoid having to lookup category or group ids:

```sql
--[params]
-- string :category_name

SELECT
id AS topic_id
FROM topics t
WHERE t.category_id = (SELECT id FROM categories WHERE name = :category_name)

```

---

<div class="post-metadata">

### Author: ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)
#### Post date: [25 januari 2024 om 17:07 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/4 "2024-01-25T17:07:01Z")

</div>

Bumping this topic because I had the same question. For categories, it’s relatively easy to look at the URL:

```plaintext
https://meta.discourse.org/c/announcements/67
                                           ^^

```

But I can’t find anything like that for groups. An ideal location for that would be on the group profile page (`/g/[group_name]/manage/profile`) somewhere. It’s not a huge problem of course ([Data Explorer](https://meta.discourse.org/t/32566?silent=true) is my security blanket), but it is an annoyance when [working with the API](https://docs.discourse.org/#tag/Groups/operation/addGroupMembers).

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [25 januari 2024 om 17:10 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/5 "2024-01-25T17:10:55Z")

</div>

For anything internal-ish you can just tack `.json` after an URL. Also works for those pesky post ID’s.

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

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [25 januari 2024 om 17:13 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/6 "2024-01-25T17:13:11Z")

</div>

My vote for the [data explorer](https://meta.discourse.org/t/32566?silent=true) would be for more `user_id` style parameters like this #Contribute > Feature request for groups:

> [@Param dropdown for group\_id in data explorer query](https://meta.discourse.org/t/wishlist-param-dropdown-for-data-explorer-query/253883):
>
> I’d love to be able to specify something like this: -- [params] -- groups.id :group\_id to get a parameter input that’s a dropdown of groups. I’ve named the value group\_id here because I assume that’s what such a dropdown would give me.

---

<div class="post-metadata">

### Author: ![Shirly\_Nowak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shirly_nowak/32/571731_2.png) [@Shirly\_Nowak](https://meta.discourse.org/u/Shirly_Nowak)
#### Post date: [19 maart 2026 om 16:18 UTC](https://meta.discourse.org/t/expose-category-and-group-ids-to-admins/121428/7 "2026-03-19T16:18:50Z")

</div>

> [@RGJ](#):
>
> For anything internal-ish you can just tack `.json` after an URL. Also works for those pesky post ID’s.

Thanks for this tip 😃
