# List attachments on a task and Get an attachment of a taskapi's using history data rather than runtime data

**URL:** <https://forum.flowable.org/t/list-attachments-on-a-task-and-get-an-attachment-of-a-taskapis-using-history-data-rather-than-runtime-data/6252>\
**Category:** Flowable Engine\
**Created:** [June 20, 2020, 7:50am UTC](https://forum.flowable.org/t/list-attachments-on-a-task-and-get-an-attachment-of-a-taskapis-using-history-data-rather-than-runtime-data/6252 "2020-06-20T07:50:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![svijay](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@svijay](https://forum.flowable.org/u/svijay)\
**Post date:** [June 20, 2020, 7:50am UTC](https://forum.flowable.org/t/list-attachments-on-a-task-and-get-an-attachment-of-a-taskapis-using-history-data-rather-than-runtime-data/6252/1 "2020-06-20T07:50:25Z")

</div>

HI,

I have observed that List attachments on a task and Get an attachment of a task API’s are getting the task based on taskId from the history data, not from runtime whereas Create attachment on a task and Delete attachment of a task API’s are getting the task based on taskId from the runtime data.

Why this difference is there between task attachment API?

If I don’t persist history data, I will not be able to get the created attachments of the task then how can I solve this problem?

Regards,  
svijay

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [June 28, 2020, 9:38am UTC](https://forum.flowable.org/t/list-attachments-on-a-task-and-get-an-attachment-of-a-taskapis-using-history-data-rather-than-runtime-data/6252/2 "2020-06-28T09:38:29Z")

</div>

> [@svijay](#):
>
> Why this difference is there between task attachment API?

Note that this API is very old and hasn’t gotten much attention in the last years.

If I remember correctly, the attachment are always stored in the history, because it’s static and is the same for both runtime/history (just explaining the reasoning from back then, not sure if it still makes sense). So it does need history turned on indeed.
