문서 내용 검색

Retrieve contents of a document by its ID.

get

Returns the content of the document with the specified ID, along with the index of the latest retrieved chunk. Each call fetches up to 20 chunks. To get more, use the end_chunk value from the response as the start_chunk for the next call.

Path parameters
document_idintegerRequired

The ID of the document to retrieve contents for.

Query parameters
start_chunkintegerOptional

Indicate the starting chunk that you want to retrieve. If not specified, the default value is 0.

end_chunkintegerOptional

Indicate the ending chunk that you want to retrieve. If not specified, the default value is start_chunk + 20.

Responses
200
Content of the document and index of the latest retrieved chunk.
application/json
get
GET /api/v1/documents/{document_id}/contents/ HTTP/1.1
Host: api.rememberizer.ai
Accept: */*
{
  "content": "text",
  "end_chunk": 20
}

예제 요청

curl -X GET \
  "https://api.rememberizer.ai/api/v1/documents/12345/contents/?start_chunk=0&end_chunk=20" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

YOUR_JWT_TOKEN을 실제 JWT 토큰으로, 12345를 실제 문서 ID로 교체하세요.

경로 매개변수

매개변수
유형
설명

document_id

정수

필수. 내용을 검색할 문서의 ID입니다.

쿼리 매개변수

매개변수
유형
설명

start_chunk

정수

시작 청크 인덱스. 기본값은 0입니다.

end_chunk

정수

종료 청크 인덱스. 기본값은 start_chunk + 20입니다.

응답 형식

{
  "content": "문서 조각의 전체 텍스트 내용...",
  "end_chunk": 20
}

오류 응답

상태 코드
설명

404

문서를 찾을 수 없음

500

내부 서버 오류

대용량 문서의 페이지 매김

대용량 문서의 경우, 콘텐츠가 청크로 나뉩니다. 여러 요청을 통해 전체 문서를 검색할 수 있습니다:

  1. start_chunk=0으로 초기 요청을 합니다.

  2. 반환된 end_chunk 값을 다음 요청의 start_chunk로 사용합니다.

  3. 모든 청크를 검색할 때까지 계속합니다.

이 엔드포인트는 문서의 원시 텍스트 콘텐츠를 반환하여, 자세한 처리나 분석을 위해 전체 정보를 액세스할 수 있도록 합니다.

Last updated