REST API - GET runtime/tasks - sort parameter

In the Paging and sorting section of the REST API docs the paging and order parameters are introduced. It also mentions that the sort parameter is ‘different per query implementation’.

The documentation for GET runtime/tasks does not include a description of the sort parameter, for example:

Parameter    Required    Value     Description
sort         No          String    Sort field, should be createTime used together with order ('asc' | 'desc') or ???

These examples work as expected:

curl -i 'http://admin:test@localhost:8080/flowable-task/process-api/runtime/tasks?sort=createTime&order=asc'
curl -i 'http://admin:test@localhost:8080/flowable-task/process-api/runtime/tasks?sort=createTime&order=desc'

curl -i 'http://admin:test@localhost:8080/flowable-task/process-api/runtime/tasks?sort=name&order=asc'
curl -i 'http://admin:test@localhost:8080/flowable-task/process-api/runtime/tasks?sort=name&order=desc'

Additionally, the Flowable OpenAPI (Swagger) docs for GET runtime/tasks do not include a description of the sort parameter.

13

Hi Robinyo,

it is mentioned that the default value is different per query implementation, not the sort parameter itself. The sort parameters are described here: https://www.flowable.org/docs/userguide/index.html#restPagingAndSort - since this page is below the general principals, it is not mentioned for all specific endpoints.

For the swagger docs the main problem is that there is not really a way to add them to all required endpoints automatically. In case you have a way, please feel free to create a pull request.

Valentin

Hi Valentin,

Sure, but what is missing (from both docs) is a description of the set of valid values (e.g., createTime, name, ???) for a particular query, for example:

?sort=createTime&order=asc

or

?sort=name&order=desc

It’s shown in the docs for GET runtime/process-instances:

34

I haven’t done any Swagger stuff for a while (although I did enjoy working with ReDoc) and I’m a Flowable newbie :slight_smile: