PacteryDevelopers

페이지네이션

목록 엔드포인트는 커서 기반 페이지네이션을 사용합니다.

요청 파라미터

파라미터 기본값 설명
limit 20 한 번에 가져올 개수 (최대 100)
starting_after 이 ID 다음부터 (다음 페이지)
ending_before 이 ID 이전까지 (이전 페이지)

응답 구조

{
  "object": "list",
  "data": [ { "id": "doc_3", "object": "document" }, { "id": "doc_2", "object": "document" } ],
  "has_more": true
}

다음 페이지는 마지막 항목의 ID를 starting_after로 넘겨 요청합니다.

curl "https://api.pactery.com/v1/documents?limit=20&starting_after=doc_2" \
  -H "Authorization: Bearer sk_live_..."

has_morefalse가 될 때까지 반복하면 전체를 순회할 수 있습니다.