<p>If you've already got a reference to the entry, this should do it:</p>

<pre><code>HeaderHelper::setHeader('MyHeader', $entry-&gt;dateUpdated);
</code></pre>

CC BY-SA 4.0
2019-05-10T18:18:26.960Z
2019-10-14T04:06:18.937Z
2019-10-14T04:06:18.937Z
Brad Bell
<p>I'll be polling an endpoint created with the element-api plugin which will trigger a concourse build. I need to include a timestamp the last time any entry was changed.</p>

<p>So I need something to go in the setHeader function:</p>

<p><code>HeaderHelper::setHeader([...])</code></p>

<p>Many thanks in advance!</p>

<plugin-elementapi>
Get last change timestamp in header response
# Get last change timestamp in header response

(Asked by: username_0 on 2019-05-10)

I'll be polling an endpoint created with the element-api plugin which will trigger a concourse build. I need to include a timestamp the last time any entry was changed.

So I need something to go in the setHeader function:

`HeaderHelper::setHeader([...])`

Many thanks in advance!

**Tags:** plugin-elementapi


---

## 1 answers

### Answer by username_1 on 2019-05-10. Score: 1

If you've already got a reference to the entry, this should do it:
HeaderHelper::setHeader('MyHeader', $entry->dateUpdated);


---

