Documents
list documents from the index (can have a diff with Knowledge bases if partial indexation is not launched)
Body
offsetintegerOptionalDefault:
0
limitintegerOptionalDefault:
20
stateany ofOptional
stringOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/document/list-docs HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"offset": 0,
"limit": 20,
"state": "text"
}
{
"response": [
{
"id": "text",
"name": "text",
"extraproperties": {
"audit_done": false,
"kb_signature": {
"type": "text",
"name": "text"
},
"kai_internal_state": "INITIAL_SAVED",
"kai_internal_count_chunks": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
retrieve information about one document from his id
Body
idany ofOptional
stringOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/document/doc HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"id": "text"
}
{
"response": {
"id": "text",
"name": "text",
"url": "text",
"extraproperties": {
"audit_done": false,
"kb_signature": {
"type": "text",
"name": "text"
},
"kai_internal_state": "INITIAL_SAVED",
"kai_internal_count_chunks": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
Download file from storage
Body
idany ofOptional
stringOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/document/download HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"id": "text"
}
{
"file": "binary"
}
Return document information of id list
Body
idsany ofOptionalDefault:
[]
string[]Optional
nullOptional
offsetintegerOptionalDefault:
0
limitintegerOptionalDefault:
20
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/document/docs-by-ids HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"ids": [
"text"
],
"offset": 0,
"limit": 20
}
{
"response": [
{
"id": "text",
"name": "text",
"extraproperties": {
"audit_done": false,
"kb_signature": {
"type": "text",
"name": "text"
},
"kai_internal_state": "INITIAL_SAVED",
"kai_internal_count_chunks": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
count documents present in the index by the state :
'INITIAL_SAVED' # initial save
"UPDATED" # document is updated (without the content) par rapport à l'API
'ON_CONTENT_EXTRACT'# document content is currently is working on fileparser
'CONTENT_EXTRACTED'# document content is fetch from fileparser and chunks is saved
"PARSING_ERROR" # document get an error when we parse his content (coul be wrong format, ...)
'ON_INDEXATION'# document is in indexation progress
'INDEXED' # document is indexed
Body
stateany ofOptional
stringOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/document/count-documents-by-state HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"state": "text"
}
{
"response": 1
}
Last updated