Retrieve task using processInstanceKey using Tasklist REST API

How to retrieve a task depending on a certain variable’s value using Tasklist REST API? For instance, obtain the currently active task that corresponds to the process instance key.

I guess you can find this doc helpful:

Very helpful documentation. Thanks a lot!