# Does query task api supports orderby and OR operator clause

**URL:** <https://forum.flowable.org/t/does-query-task-api-supports-orderby-and-or-operator-clause/3289>\
**Category:** Uncategorized\
**Created:** [January 22, 2019, 10:42am UTC](https://forum.flowable.org/t/does-query-task-api-supports-orderby-and-or-operator-clause/3289 "2019-01-22T10:42:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Robinyo](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Robinyo](https://forum.flowable.org/u/Robinyo)\
**Post date:** [January 22, 2019, 8:43pm UTC](https://forum.flowable.org/t/does-query-task-api-supports-orderby-and-or-operator-clause/3289/2 "2019-01-22T20:43:17Z")

</div>

See:

- [General Flowable REST principles](https://www.flowable.org/docs/userguide/index.html#_general_flowable_rest_principles)
- [Paging and sorting](https://www.flowable.org/docs/userguide/index.html#restPagingAndSort)
- [List of tasks](https://www.flowable.org/docs/userguide/index.html#restTasksGet)

> [@ramling\_h](#):
>
> in flowable rest api is it possible to get tasks in a specific order.

Yes, for example:

```auto
  public getTasks(): Observable<any> {

    const endpoint = `${this.processEngineUriPrefix}runtime/tasks`;

    const sort = 'createTime';
    const order = 'desc';

    const params = new HttpParams().set('sort', sort).set('order', order);

    return this.httpClient.get<TaskListModel>(endpoint, this.getHttpOptions(params))
      .pipe(
        tap(() => {
          this.logger.info('TasksService: getTasks() completed');
        }),
        catchError(this.handleError('getTasks', []))
      );

  }

```

Also see: [Upcomig task for a user](https://forum.flowable.org/t/upcomig-task-for-a-user/3287/2)

---

_[View the full topic](https://forum.flowable.org/t/does-query-task-api-supports-orderby-and-or-operator-clause/3289)._
