# REST API on getting pending task by roll or membership

**URL:** <https://community.ofelia.com/t/rest-api-on-getting-pending-task-by-roll-or-membership/11616>\
**Category:** Q&A\
**Tags:** extensions\
**Created:** [14 September 2023 06:28 UTC](https://community.ofelia.com/t/rest-api-on-getting-pending-task-by-roll-or-membership/11616 "2023-09-14T06:28:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_dev](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@chris\_dev](https://community.ofelia.com/u/chris_dev)\
**Post date:** [14 September 2023 06:28 UTC](https://community.ofelia.com/t/rest-api-on-getting-pending-task-by-roll-or-membership/11616/1 "2023-09-14T06:28:36Z")

</div>

I would like to know on how to get the pending task based on role / assigned actor?  
Currently, i can only get the pending task based on assigned\_id column

---

<div class="post-metadata">

**Author:** ![thalia.cruz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/thalia.cruz/32/1230_2.png) [@thalia.cruz](https://community.ofelia.com/u/thalia.cruz)\
**Post date:** [14 September 2023 09:45 UTC](https://community.ofelia.com/t/rest-api-on-getting-pending-task-by-roll-or-membership/11616/2 "2023-09-14T09:45:02Z")

</div>

Hi chris\_dev,

You can use the user\_id to filter the tasks. This will filter the tasks that are suitable for a specific user (depending on his role, membership) and even if those tasks are not still attributed to him. This is the logic used in the Bonita User Application where you're able to see the list of tasks available for a user under "To Do", which are separated from "My Tasks" which are already attributed.

The request would look like this: (I'm getting the tasks suitable for user\_id=4)

&nbsp;

 ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/0b350586e1b0d338a78d2176d94a3f0a063703f6.png)

hope this helps!

Thalia
