# 카테고리 내 모든 첫 게시물을 가져오는 최적의 API

**URL:** <https://meta.discourse.org/t/best-api-for-all-first-posts-in-a-category/204883>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [9월 30, 2021, 4:00오후 UTC](https://meta.discourse.org/t/best-api-for-all-first-posts-in-a-category/204883 "2021-09-30T16:00:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [10월 4, 2021, 3:01오후 UTC](https://meta.discourse.org/t/best-api-for-all-first-posts-in-a-category/204883/3 "2021-10-04T15:01:41Z")

</div>

> [@John\_Lehmann](#):
>
> 가능하다면, 주제/게시물별로 하나의 요청을 보내는 것을 피하고 싶습니다.
> 
> 지금까지 찾은 최선의 방법은 검색을 사용해 주제를 가져온 다음, 각 주제를 하나씩 가져와 스트림에서 첫 번째 게시물을 추출하는 것입니다.

여러 주제에 대한 첫 번째 답변을 일괄적으로 가져오는 방법에 대해서는 알지 못합니다. 각 주제를 순회하며 첫 번째 게시물을 가져오는 것이 아마도 최선의 선택일 것입니다.

> [@John\_Lehmann](#):
>
> 웹훅은 미래에 좋은 옵션이 될 것이지만, 우리는 PULL 방식부터 시작하고 싶습니다.

네, 웹훅은 실제로 여기서 좋은 옵션이며, "Post Event"를 트리거로 사용할 수 있습니다.

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/6/26838c8331e3dcbf495864e4f8164474e3242174.png)

하지만 이는 모든 게시물 이벤트에 대해 트리거가 발생하므로, 주제에서 첫 번째 답변이 아닌 모든 게시물은 무시해야 합니다.

---

_[View the full topic](https://meta.discourse.org/t/best-api-for-all-first-posts-in-a-category/204883)._
