# How to get a previous version/revision of a post through the API

**URL:** <https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [3월 1, 2017, 12:53오후 UTC](https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164 "2017-03-01T12:53:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![paresy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paresy/32/96471_2.png) [@paresy](https://meta.discourse.org/u/paresy)\
**Post date:** [2월 21, 2021, 8:44오전 UTC](https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164/6 "2021-02-21T08:44:21Z")

</div>

여기서 게시물의 “첫 번째” 개정판을 찾으려고 했습니다. 제 해결책은 여기서 가져왔습니다: [discourse/app/serializers/post\_revision\_serializer.rb at a0bbc346cb5d5b89d1a3efdfa89869349a8b067f · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/a0bbc346cb5d5b89d1a3efdfa89869349a8b067f/app/serializers/post_revision_serializer.rb#L193)

```
 PostRevision.where(post_id: 46747).order(:number).to_a

```

이것은 첫 번째 개정판을 포함해 모든 원본 게시물 개정판을 반환합니다.

---

_[View the full topic](https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164)._
