# UI - Sorting for User API

**URL:** <https://community.cumulocity.com/t/ui-sorting-for-user-api/170>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [September 28, 2023, 7:26am UTC](https://community.cumulocity.com/t/ui-sorting-for-user-api/170 "2023-09-28T07:26:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divya\_Krishnamurthy](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/divya_krishnamurthy/32/19498_2.png) [@Divya\_Krishnamurthy](https://community.cumulocity.com/u/Divya_Krishnamurthy)\
**Post date:** [September 28, 2023, 7:26am UTC](https://community.cumulocity.com/t/ui-sorting-for-user-api/170/1 "2023-09-28T07:26:25Z")

</div>

Hello,  
We have implemented a custom page that uses c8y-data-grid to display all the users in the tenant, we wanted to know if there is any way to apply the sort feature on User API, The columns we want to sort are username, email, and ID.

Thanks,  
Divya K

---

<div class="post-metadata">

**Author:** ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)\
**Post date:** [September 28, 2023, 1:34pm UTC](https://community.cumulocity.com/t/ui-sorting-for-user-api/170/2 "2023-09-28T13:34:25Z")

</div>

Hi Divya,

sorting users via the [User API](https://cumulocity.com/api/core/#operation/getUserCollectionResource) isn’t possible.

As a workaround you could use the [local variant of the c8y-data-grid](https://community.cumulocity.com/t/cumulocity-data-grid-tutorial-series-part-1/7211#local-data-example-6). In this case, you load all existing users of the tenant and set them on local `c8y-data-grid` using the `rows` parameter. The local data-grid already comes with basic filter and sortation capabilities.

Best regards

  

* * *

Christian Guether

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/3/c3a93a2618e4708f51be40fe2e142061f7c4edc7.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<div class="post-metadata">

**Author:** ![Divya\_Krishnamurthy](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/divya_krishnamurthy/32/19498_2.png) [@Divya\_Krishnamurthy](https://community.cumulocity.com/u/Divya_Krishnamurthy)\
**Post date:** [September 28, 2023, 1:48pm UTC](https://community.cumulocity.com/t/ui-sorting-for-user-api/170/3 "2023-09-28T13:48:09Z")

</div>

Thanks a lot Christian for the answer

  

* * *

Divya Krishnamurthy

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/3/c3a93a2618e4708f51be40fe2e142061f7c4edc7.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [March 26, 2024, 1:48pm UTC](https://community.cumulocity.com/t/ui-sorting-for-user-api/170/4 "2024-03-26T13:48:12Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
