# Changed API for directory\_items

**URL:** https://meta.discourse.org/t/changed-api-for-directory-items/150669
**Category:** Development
**Created:** [May 7, 2020, 1:30am UTC](https://meta.discourse.org/t/changed-api-for-directory-items/150669 "2020-05-07T01:30:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DLu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlu/32/121933_2.png) [@DLu](https://meta.discourse.org/u/DLu)
#### Post date: [May 7, 2020, 1:30am UTC](https://meta.discourse.org/t/changed-api-for-directory-items/150669/1 "2020-05-07T01:30:09Z")

</div>

[This commit](https://github.com/discourse/discourse/commit/2f9879a9a134f3b9bf17489dce977e1655df5d37) moves `total_rows_directory_items` and `load_more_directory_items` under the `meta` object. This is the current behavior on the test server.

However, this is different than what [the documentation says](https://docs.discourse.org/#tag/Users/paths/~1directory_items.json?period=%7Bperiod%7D&order=%7Border%7D/get) and different than the previous behavior, thus breaking my scripts that use the API.

Was this an intentional change to the API, @vinothkannans?

[post originally had more links, but I’m a new user]

---

<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: [May 7, 2020, 2:24am UTC](https://meta.discourse.org/t/changed-api-for-directory-items/150669/2 "2020-05-07T02:24:49Z")

</div>

The documentation necessarily lags behind the code. If it’s changed, it’s changed. The best way to know about the API is [How to reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576).

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [May 7, 2020, 4:49am UTC](https://meta.discourse.org/t/changed-api-for-directory-items/150669/3 "2020-05-07T04:49:14Z")

</div>

[https://github.com/discourse/discourse/commit/2f9879a9a134f3b9bf17489dce977e1655df5d37](https://github.com/discourse/discourse/commit/2f9879a9a134f3b9bf17489dce977e1655df5d37)

Yes, it’s an intentional change like I mentioned in the commit message. I will update the documentation. Else you can contribute with a PR in [discourse\_api\_docs](https://github.com/discourse/discourse_api_docs).

---

<div class="post-metadata">

### Author: ![DLu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlu/32/121933_2.png) [@DLu](https://meta.discourse.org/u/DLu)
#### Post date: [May 8, 2020, 8:54pm UTC](https://meta.discourse.org/t/changed-api-for-directory-items/150669/4 "2020-05-08T20:54:17Z")

</div>

Okay, thank you both for the responses. I just missed seeing it in the release notes.
