Skip to content

Upload and ingest a file

POST
/api/v1/documents/upload
curl --request POST \
--url http://localhost:11044/api/v1/documents/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--form file=@file

Upload a file (PDF, text, HTML, etc.) for ingestion. The optional fromOrgDomain field records which org the file is really from (the upload dialog’s From field).

fromOrgDomain
string

Domain of the organisation the file is really from, recorded as its publisher (the upload dialog’s From field); omitted or blank records none

tags
Array<string>

Tags to stamp on the document and its chunks, as repeated tags fields or one comma-separated value; trimmed, blanks dropped, duplicates collapsed. Omitted leaves the document untagged

Media typemultipart/form-data
object
file
required

The file to ingest (PDF, text, HTML and other formats the converter reads). Its original filename names the document, whose uri is upload://<world context>/<filename>; a part with no filename is called upload

string format: binary

Document ingested. status is ingested, or ingested_incomplete when some chunks could not be embedded: the document is kept and text-searchable, chunksWithoutEmbeddings of chunks miss semantic search

Media type*/*

A document ingested. Kept and text-searchable even when some chunks could not be embedded

object
chunks

How many chunks were stored, null where the stored record could not be read back

integer format: int32
chunksWithoutEmbeddings
required

How many chunks have no embedding. Zero when every chunk was embedded

integer format: int32
message

Present only for ingested_incomplete: how many chunks miss embeddings, and that re-ingesting embeds them

string
status
required

ingested, or ingested_incomplete when some chunks could not be embedded

string
Allowed values: ingested ingested_incomplete
title

The document’s title. For inline text, the given name where no title was found

string
uri
required

The document’s URI

string

No embedding model is set, so nothing could be searched: the reason names the command that sets one

Media type*/*

An ingest refused because this appliance has no embedding model yet. Not set up, rather than broken

object
embeddings
required

The embedding status this was decided from: configured, model, dimensions and reason

object
key
additional properties
any
message
required

Why, in the operator’s words, naming the command that sets a model

string
status
required

Always unavailable

string

Example

unavailable