# Get variable for closed task

**URL:** https://forum.flowable.org/t/get-variable-for-closed-task/7531
**Category:** Flowable Engine
**Created:** [February 24, 2021, 11:11am UTC](https://forum.flowable.org/t/get-variable-for-closed-task/7531 "2021-02-24T11:11:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bibekguptab7](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/bibekguptab7/32/2156_2.png) [@bibekguptab7](https://forum.flowable.org/u/bibekguptab7)
#### Post date: [February 24, 2021, 11:11am UTC](https://forum.flowable.org/t/get-variable-for-closed-task/7531/1 "2021-02-24T11:11:00Z")

</div>

Hi Team,

I am not getting _variables_ for closed/completed task from restAPI,

1. /flowable-rest/service/runtime/tasks/
2. /flowable-rest/service/history/historic-variable-instances?taskId=
3. /flowable-rest/service/history/historic-task-instances/

please help.

Thank you in advance!

---

<div class="post-metadata">

### Author: ![jwashington](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jwashington](https://forum.flowable.org/u/jwashington)
#### Post date: [February 24, 2021, 10:27pm UTC](https://forum.flowable.org/t/get-variable-for-closed-task/7531/2 "2021-02-24T22:27:13Z")

</div>

I think you need to add the _ **includeProcessVariables=Yes** _ query parameter to the rest calls.

---

<div class="post-metadata">

### Author: ![bibekguptab7](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/bibekguptab7/32/2156_2.png) [@bibekguptab7](https://forum.flowable.org/u/bibekguptab7)
#### Post date: [February 25, 2021, 6:37am UTC](https://forum.flowable.org/t/get-variable-for-closed-task/7531/3 "2021-02-25T06:37:39Z")

</div>

Hi @jwashington ,  
thanks a lot for pointing that out… It worked 🙂
