I have a collection that uses
. This collection has a field
I want to display to the user the
field of the the 3 versions leading up to the currently published versions.
Basicly I want to show to the user a list like this
<ul> <li>Updated Mar 12 by X</li> <li>Updated Mar 15 by Y</li> <li>Updated Mar 16 by Z</li> </ul>
whats the best way to get this data?
Hey @moritz - you can do this by fetching to your rest api to the versions collection per your specific document.
Your api endpoint would look like this:
I've attached an image showing what this query would return
You can also find more information on what you can do with versions here:https://payloadcms.com/docs/versions/overview#versions
Let me know if you have any other questions!