# 게시물 번호에서 게시물 ID로

**URL:** <https://meta.discourse.org/t/from-post-number-to-post-id/193247>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [6월 9, 2021, 7:06오전 UTC](https://meta.discourse.org/t/from-post-number-to-post-id/193247 "2021-06-09T07:06:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![marcozambi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcozambi/32/119505_2.png) [@marcozambi](https://meta.discourse.org/u/marcozambi)\
**Post date:** [6월 9, 2021, 7:06오전 UTC](https://meta.discourse.org/t/from-post-number-to-post-id/193247/1 "2021-06-09T07:06:57Z")

</div>

여러분 안녕하세요!  
`https://myweb.site/t/<topic_id>/<post_number>`와 같은 정본(canonical) 게시글 URL에서 게시글 ID를 가져올 수 있는 Discourse API 방식이 있는지 궁금합니다. 여기서 TN은 주제 ID/번호, PN은 게시글 번호를 의미합니다.

`https://myweb.site/t/<topic_id>.json`에서 가져온 게시글 스트림 데이터를 이용해 몇 가지 시도를 해보았는데요, 예를 들어 post\_number N이 호출 결과로 반환되는 `post_stream->stream` 데이터의 n번째 게시글 ID일 것이라고 생각했습니다. 하지만 주제 내 게시글 흐름에서 게시글이 삭제되거나 분할(split)이 이루어진 경우, post\_number는 `stream` 내의 n번째 위치와 일치하지 않습니다.

무언가 명백한 것을 놓치고 있는 걸까요?

---

_[View the full topic](https://meta.discourse.org/t/from-post-number-to-post-id/193247)._
