지식 베이스 문서 생성
knowledge base 안에 text, webpage, file document를 생성합니다. document는 즉시 반환되며 처리는 비동기로 진행됩니다.
Authorizations
조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
GET /v3/knowledges에서 반환되는 숫자형 public knowledge ID입니다.
x >= 1Body
document 생성 요청입니다. text와 webpage document는 JSON을 사용하고, file 업로드는 multipart form data를 사용합니다.
- CreateTextDocumentRequest
- CreateWebpageDocumentRequest
text 타입 document 생성 요청 (application/json).
name 은 공백 제외 1~255자. 정의되지 않은 필드를 보내면 400 (extra=forbid).
Response
성공 응답
knowledge document 요약 응답입니다.
목록 조회와 생성 응답에서 공통으로 사용합니다.
knowledge document의 고유 식별자입니다.
상위 knowledge numeric public ID.
document 의 이름.
document 타입.
file, text, webpage 문서 처리 상태입니다. 업로드 중에서 완료 또는 실패로 전환됩니다. 웹페이지 최초 등록은 모든 URL 수집에 성공해야 완료됩니다. 하나라도 실패하면 실패 상태가 됩니다. 이후 갱신에 실패해도 기존 완료 상태와 공개본을 유지합니다. 갱신 결과는 refresh 상태에서, 실패한 페이지는 webpage_failures에서 확인하세요.
uploading, completed, failed 리소스 생성 시각입니다. unix milliseconds 형식입니다.
업로드 진행률(%)입니다. status가 uploading일 때만 의미가 있습니다. 집계 전에는 null입니다.
0 <= x <= 100document 의 토큰 수. 아직 집계하지 않았다면 null.
webpage document일 때만 값이 있습니다. 그 외에는 null입니다.
webpage document 의 페이지 단위 수집 실패 목록. key 는 URL, value 는 사유 (HTTP <status>, scrape error, empty content, no scrape result). HTTP 오류 페이지의 본문은 지식에 포함되지 않는다. 처리 전 또는 webpage 가 아니면 null, 처리 후 실패가 없으면 빈 객체.