<p>RFC5829 describes a <a href="https://www.rfc-editor.org/rfc/rfc5829#section-3.1" rel="nofollow noreferrer">version history</a> but does not suggest a return format.</p>
<p>First we assume you have a URL pointing to each version of the resource as in:</p>
<pre><code>/path/to/resource/  - returns latest
/path/to/resource/v1 - returns version v1    
/path/to/resource/v2 - returns version v2
</code></pre>
<p>So what you actually want is to return a <strong>collection of links</strong>.
The best representation for this is <a href="https://stackoverflow.com/questions/59270469/what-is-the-best-json-schema-to-use-for-a-collection-of-http-links">another question</a></p>
<p><a href="https://www.rfc-editor.org/rfc/rfc7089" rel="nofollow noreferrer">RFC7089 - HTTP Framework for Time-Based Access to Resource States - Memento</a> describes a similar thing called a <em>time-map</em> and suggests using <a href="https://www.rfc-editor.org/rfc/rfc6690" rel="nofollow noreferrer">application/link-format (RFC6690)</a>.
An example of this is given on <a href="https://www.rfc-editor.org/rfc/rfc7089#page-36" rel="nofollow noreferrer">page 36</a>:</p>
<pre><code>   HTTP/1.1 200 OK
   Date: Thu, 21 Jan 2010 00:06:50 GMT
   Server: Apache
   Content-Length: 4883
   Content-Type: application/link-format
   Connection: close

    &lt;http://a.example.org&gt;;rel=&quot;original&quot;,
    &lt;http://arxiv.example.net/timemap/http://a.example.org&gt;
      ; rel=&quot;self&quot;;type=&quot;application/link-format&quot;
      ; from=&quot;Tue, 20 Jun 2000 18:02:59 GMT&quot;
      ; until=&quot;Wed, 09 Apr 2008 20:30:51 GMT&quot;,
    &lt;http://arxiv.example.net/timegate/http://a.example.org&gt;
      ; rel=&quot;timegate&quot;,
    &lt;http://arxiv.example.net/web/20000620180259/http://a.example.org&gt;
      ; rel=&quot;first memento&quot;;datetime=&quot;Tue, 20 Jun 2000 18:02:59 GMT&quot;
      ; license=&quot;http://creativecommons.org/publicdomain/zero/1.0/&quot;,
    &lt;http://arxiv.example.net/web/20091027204954/http://a.example.org&gt;
       ; rel=&quot;last memento&quot;;datetime=&quot;Tue, 27 Oct 2009 20:49:54 GMT&quot;
       ; license=&quot;http://creativecommons.org/publicdomain/zero/1.0/&quot;,
    &lt;http://arxiv.example.net/web/20000621011731/http://a.example.org&gt;
      ; rel=&quot;memento&quot;;datetime=&quot;Wed, 21 Jun 2000 01:17:31 GMT&quot;
      ; license=&quot;http://creativecommons.org/publicdomain/zero/1.0/&quot;,
    &lt;http://arxiv.example.net/web/20000621044156/http://a.example.org&gt;
      ; rel=&quot;memento&quot;;datetime=&quot;Wed, 21 Jun 2000 04:41:56 GMT&quot;
      ; license=&quot;http://creativecommons.org/publicdomain/zero/1.0/&quot;,
    ...
</code></pre>
<p>link-format is just the same format for links used in http for the link header itself but with whitespace removed (contrary to the example above!).</p>
<p>link-format may be more alien than JSON to API clients, so you might consider returning some kind of JSON document via content-type negotiation. There is no standard format for representing a collection of links in JSON (or rather there are several competing standards with different strengths and weaknesses). A reasonable overview is <a href="https://www.mnot.net/blog/2011/11/25/linking_in_json" rel="nofollow noreferrer">Mark Nottingham's blog</a>. Though this is old at the time of writing, the formats he mentions are still the formats you will come across if you search for suggestions.
A good suggestion might be <em>HAL+JSON</em>. See <a href="https://en.wikipedia.org/wiki/Hypertext_Application_Language" rel="nofollow noreferrer">wikipedia</a> and the <a href="https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-08" rel="nofollow noreferrer">draft RFC</a> (note the draft is expired but the link is not).
Using this a version history would look something like:</p>
<pre><code>{
  &quot;_links&quot;: {
    &quot;self&quot;: { &quot;href&quot;: &quot;/versions&quot; },
    &quot;first&quot;: { &quot;href&quot;: &quot;/foobar/version1&quot;, &quot;datetime&quot;: &quot;2019-01-01T12:00:00Z&quot; },
    &quot;memento&quot;: { &quot;href&quot;: &quot;/foobar/version2&quot;, &quot;datetime&quot;: &quot;2019-01-02T12:00:00Z&quot;  }
    &quot;latest&quot;: { &quot;href&quot;: &quot;/foobar/version3&quot;, &quot;datetime&quot;: &quot;2019-01-03T12:00:00Z&quot;  }
  }
}
</code></pre>
<p>I've added the datetime attribute here (possibly incorrectly) to represent a version time and used <a href="https://www.rfc-editor.org/rfc/rfc3339" rel="nofollow noreferrer">RFC3339</a> format (which is my personal preference).</p>
<p>For both formats suggested here, you may want to consider carefully what relation names to use - see <a href="https://stackoverflow.com/q/59176515/1569204">https://stackoverflow.com/q/59176515/1569204</a></p>
What is an appropriate format for returning version-history of a resource via http
<p>I am designing a ReSTful web service which provides a versioned resource.
What is an appropriate return format (content-type) for returning a <a href="https://www.rfc-editor.org/rfc/rfc5829#section-3.1" rel="nofollow noreferrer">version history</a>?</p>