Skip to main content
GET
지식 베이스 문서 조회

Authorizations

Authorization
string
header
required

워크스페이스 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.

Path Parameters

knowledge_id
integer
required

GET /v3/knowledges에서 반환되는 숫자형 public knowledge ID입니다.

Required range: x >= 1
document_id
string<uuid>
required

knowledge document ID입니다.

Query Parameters

cursor
string | null

이전 응답의 next_cursor 값입니다. 다음 페이지를 조회할 때 그대로 전달합니다. 처음부터 읽을 때는 생략합니다.

Response

성공 응답

knowledge document 단건 조회 응답입니다. 요약 필드에 추출 본문 한 쪽과 원본 파일 링크가 더해집니다.

id
string<uuid>
required

knowledge document의 고유 식별자입니다.

knowledge_id
integer
required

상위 knowledge numeric public ID.

name
string
required

document 의 이름.

document_type
enum<string>
required

document 타입.

Available options:
file,
text,
webpage
status
enum<string>
required

문서 처리 상태입니다. 업로드 중에서 완료 또는 실패로 전환됩니다. 웹페이지 최초 등록은 모든 URL 수집에 성공해야 완료됩니다. 하나라도 실패하면 실패 상태가 됩니다. 이후 갱신에 실패해도 기존 완료 상태와 공개본을 유지합니다. 갱신 결과는 refresh 상태에서, 실패한 페이지는 webpage_failures에서 확인하세요.

Available options:
uploading,
completed,
failed
created_at
integer
required

리소스 생성 시각입니다. unix milliseconds 형식입니다.

upload_percentage
integer | null

업로드 진행률(%)입니다. status가 uploading일 때만 의미가 있습니다. 집계 전에는 null입니다.

Required range: 0 <= x <= 100
token_count
integer | null

document 의 토큰 수. 아직 집계하지 않았다면 null.

webpage_urls
string<uri>[]

webpage document일 때만 값이 있습니다. 그 외에는 null입니다.

webpage_failures
Webpage Failures · object | null

webpage document 의 페이지 단위 수집 실패 목록. key 는 URL, value 는 사유 (HTTP <status>, scrape error, empty content, no scrape result). HTTP 오류 페이지의 본문은 지식에 포함되지 않는다. 처리 전 또는 webpage 가 아니면 null, 처리 후 실패가 없으면 빈 객체.

content
string | null

이 페이지에 해당하는 추출 텍스트입니다. 최대 40,000자(Unicode code point 기준)입니다. 추출된 텍스트가 아직 없으면(예: 업로드 중이거나 텍스트 추출 전에 실패한 document) null입니다. 빈 문자열은 추출은 되었으나 텍스트가 비어 있다는 뜻입니다.

content_length
integer | null

페이지가 아닌 전체 추출 텍스트의 길이입니다. 단위는 Unicode code point입니다. content가 null이면 null입니다.

next_cursor
string | null

다음 페이지 커서입니다. 조회할 항목이 더 없으면 null입니다.

source_file_url
string | null

file document에서만 값이 있습니다. 업로드한 원본 파일을 내려받을 수 있는 서명 URL이며 15분 동안 유효합니다. text와 webpage document는 null입니다.

source_file_url_expires_at
integer | null

source_file_url의 만료 시각입니다. unix milliseconds 형식입니다. URL이 없으면 null입니다.