Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-10T18:18:26.960Z
Answers.LastActivityDate: 2019-10-14T04:06:18.937Z
Answers.LastEditDate: 2019-10-14T04:06:18.937Z
Answers.UserDisplayName: Brad Bell
Body: <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>
  
Tags: <plugin-elementapi>
Title: Get last change timestamp in header response
ThreadText: # 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);
  
  ```
  
  
  ---
  
  