# API GET for Category User notification\_level

**URL:** https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701
**Category:** Development
**Tags:** rest-api
**Created:** [February 20, 2019, 10:17pm UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701 "2019-02-20T22:17:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kimardenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kimardenmiller/32/119631_2.png) [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)
#### Post date: [February 20, 2019, 10:17pm UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/1 "2019-02-20T22:17:33Z")

</div>

I see discussion about setting notification\_level via the API. What about reading values?

For example, I can set a value with:

```
PUT {{base_url}}/category/14/notifications.json?api_key={{api_key}}&api_username={{api_username}}&notification_level=3

```

How can I read that same value back?

---

<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: [February 21, 2019, 7:47am UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/2 "2019-02-21T07:47:50Z")

</div>

Have a look at [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576) visit your profile page on the tab that shows it, its in one of the user json payloads.

---

<div class="post-metadata">

### Author: ![kimardenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kimardenmiller/32/119631_2.png) [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)
#### Post date: [February 21, 2019, 6:50pm UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/3 "2019-02-21T18:50:39Z")

</div>

Normally reversing out the API has worked for me, but for some reason this time I don’t see it.

From a user’s profile page (`/u/user_name/summary`) I see the `/u/user_name/summary.json` payload, but don’t see anything in there about _notification\_level_’s there.

Clicking on the _Preferences_ tab loads `/user-badges/user_name.json`, also no _notification\_level_.

Clicking on _Categories_ does not seem to load any json payload.

Reloading the page from `/u/km_admin/preferences/categories` loads `\u\user_name.json`. That one has all the group _notification\_level_ settings, but nothing about category settings.

The user’s category notification level is also accessed by Discourse at `\c\category_name`, but I don’t see it returned there either, unless it’s called something without the string _notific …_ in it, as all I’m seeing returned there are notification levels for each returned topic.

Safe to assume the _content.css,_ mini-profiler _results_, and _poll_ payloads can be ignored?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 21, 2019, 6:56pm UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/4 "2019-02-21T18:56:17Z")

</div>

A GET to `https://meta.discourse.org/categories.json` contains:

```plaintext
{
  "category_list": {
    "categories": [
      {
        "notification_level": 1,
        ...
      },
    ]
  }
}

```

---

<div class="post-metadata">

### Author: ![kimardenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kimardenmiller/32/119631_2.png) [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)
#### Post date: [February 21, 2019, 7:35pm UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/5 "2019-02-21T19:35:51Z")

</div>

It finally occurred to me: `/categories.json > notification_level` is for the logged in user.

I took that to be the _default_ notification\_level for the category, which of course categories don’t have.

Thanks, @Falco!

---

<div class="post-metadata">

### Author: ![kimardenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kimardenmiller/32/119631_2.png) [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)
#### Post date: [February 22, 2019, 12:59am UTC](https://meta.discourse.org/t/api-get-for-category-user-notification-level/109701/6 "2019-02-22T00:59:02Z")

</div>

So … by this approach, that means getting a given user’s `/categories.json > notification_level` requires this update to the client object?

```
client.api_username = @each_users_username

```

One cannot just do something like so without changing the `client.api_username` value?:

```
client.categories(api_username=@users_username)

```
