# Baserow API Order By Feature

**URL:** https://community.baserow.io/t/baserow-api-order-by-feature/1538
**Category:** Integrations
**Tags:** api
**Created:** [October 7, 2022, 9:58am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538 "2022-10-07T09:58:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dpetrenko](https://community.baserow.io/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dpetrenko](https://community.baserow.io/u/dpetrenko)
#### Post date: [October 7, 2022, 9:58am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/1 "2022-10-07T09:58:26Z")

</div>

Hello. I’m using your API to build my own UI and I faced an issue with order\_by property. Is there any way to sort by system fields like id or order? I tried to sort by id and I’ve received an error “The field id was not found in the table”.

---

<div class="post-metadata">

### Author: ![Alex](https://community.baserow.io/user_avatar/community.baserow.io/alex/32/253_2.png) [@Alex](https://community.baserow.io/u/Alex)
#### Post date: [October 7, 2022, 10:12am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/2 "2022-10-07T10:12:08Z")

</div>

Hey there @dpetrenko

This can depend on the endpoint you are requesting. Could you clarify which endpoint you tried to use and what exactly the payload looked like?

Thanks 🙂

---

<div class="post-metadata">

### Author: ![dpetrenko](https://community.baserow.io/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dpetrenko](https://community.baserow.io/u/dpetrenko)
#### Post date: [October 7, 2022, 10:20am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/3 "2022-10-07T10:20:02Z")

</div>

I use this one /database/rows/table/{table\_id}

---

<div class="post-metadata">

### Author: ![Alex](https://community.baserow.io/user_avatar/community.baserow.io/alex/32/253_2.png) [@Alex](https://community.baserow.io/u/Alex)
#### Post date: [October 7, 2022, 10:26am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/4 "2022-10-07T10:26:57Z")

</div>

Hey, thanks for providing the url.

I had a quick look at the code, and it does seem like we might be restricting the `order_by` to just fields. But I also understand that if you don’t use `order_by` at all, it should be sorted by the field id or am I mistaken there?

What exactly is the response you are getting and how does that response differ from what you expected?

---

<div class="post-metadata">

### Author: ![dpetrenko](https://community.baserow.io/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dpetrenko](https://community.baserow.io/u/dpetrenko)
#### Post date: [October 7, 2022, 10:30am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/5 "2022-10-07T10:30:53Z")

</div>

Thanks for the quick reply.  
By default data is sorted by id but in this case the last added item will be at the end of list so I try to have it on top of list so looks like I need to use order\_by with -id value but it does not work.

---

<div class="post-metadata">

### Author: ![Alex](https://community.baserow.io/user_avatar/community.baserow.io/alex/32/253_2.png) [@Alex](https://community.baserow.io/u/Alex)
#### Post date: [October 7, 2022, 10:46am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/6 "2022-10-07T10:46:56Z")

</div>

I see, you want to sort by `id` but `descending` instead of `ascending`.

Given that this isn’t possible in our UI either, I can imagine that we don’t support an ordering like that.

Not sure what the impact would be if we would allow an ordering like that (on a code refactor level). But this could be suggested as a feature and we can discuss internally if it’s feasible.

---

<div class="post-metadata">

### Author: ![Alex](https://community.baserow.io/user_avatar/community.baserow.io/alex/32/253_2.png) [@Alex](https://community.baserow.io/u/Alex)
#### Post date: [October 7, 2022, 10:47am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/7 "2022-10-07T10:47:31Z")

</div>

Feel free to create a new feature request on our gitlab page if you want to!

[https://gitlab.com/bramw/baserow/-/issues/new](https://gitlab.com/bramw/baserow/-/issues/new)

---

<div class="post-metadata">

### Author: ![dpetrenko](https://community.baserow.io/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dpetrenko](https://community.baserow.io/u/dpetrenko)
#### Post date: [October 7, 2022, 10:47am UTC](https://community.baserow.io/t/baserow-api-order-by-feature/1538/8 "2022-10-07T10:47:59Z")

</div>

I got it. Thanks a lot!
