How to get the completed tasks of a process with a process Instance Id in flowable rest api

Hi,
How to get the completed tasks of a process with a process Instance Id in flowable rest api.

/runtime/tasks returns only the active ones and not the completed ones.

Completed ones are available in History. but I need to pass the task Id

/history/historic-task-instances/{taskId}

Could you please suggest on how to achieve this.

Thanks,
Esther.

See REST API ยท Flowable Open Source Documentation

You need to pass it as a query parameter: ?taskId=X