List of distinct available tasks for user

Is there any rest api (or just java API) to get just the list of distinct tasks (process definition key, task id,…)?