Embed a document's missing chunks as a job
const url = 'http://localhost:11044/api/v1/documents/embed-missing';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"uri":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/documents/embed-missing \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "uri": "example" }'Embeds only the chunks the document was stored without a vector for, without ingesting it again. Answers 202 with a job to follow at GET /documents/ingests/{id}; it settles with the chunks still missing.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The document to complete, by the uri GET /api/v1/documents lists it under in the caller’s world (404 if the world holds none there). Only its chunks stored without a vector are embedded, as a job; the document is not re-ingested
Body of POST /documents/embed-missing: the document whose unembedded chunks should be embedded.
object
The document’s uri, as GET /documents lists it. One the caller’s world does not hold is answered 404
Example generated
{ "uri": "example"}Responses
Section titled “Responses”Accepted; the job, queued
One document ingest job as its owner sees it: its stage, embedding progress, and how it ended. Answered by POST /documents/ingests, POST /documents/ingests/url, POST /documents/embed-missing and GET /documents/ingests/{id}
object
Chunks the stored document was cut into; null until the job succeeds, and when the store does not say
Chunks of the stored document with no embedding, which never match a semantic search; null until the job succeeds, and when the store does not say. POST /documents/embed-missing can embed them
Why the job failed, in words; null unless state is failed
Job id, a UUID; the {id} of GET /documents/ingests/{id}
What the job is called: the uploaded file’s name, the URL being ingested, or for an embed-missing job the document’s title (its URI when it has none)
Chunks embedded so far, of how many; null until the job starts embedding
object
Chunks embedded so far; never more than total
Chunks to embed: an estimate from the document’s text while the job runs, corrected to the true count when it succeeds; raised rather than exceeded when the document cuts into more
Times the appliance restarted while the job was unfinished and picked it up again under the same id; 0 for a job that ran straight through
When the job was submitted, ISO-8601 instant
Stage the job is at: queued, waiting_for_memory, converting, writing, embedding, succeeded or failed; the last two are final
Title of the stored document; null until the job succeeds, and when the document has none
When the job last changed stage or embedded a batch of chunks, ISO-8601 instant; a value that stops moving while the job is unfinished suggests it is stuck
URI of the stored document; null until the job succeeds
The caller’s world holds no document at that uri
A 404 from an ingest-job endpoint: no such job or document for the caller. A job may be unknown, forgotten after its retention, or somebody else’s
object
What was not found, as a sentence to show the user
Nothing can embed; not started
A 409 from an ingest-job endpoint: this appliance has no embedding model yet, so nothing was spooled or started. Not set up, rather than broken
object
The embedding status this was decided from: configured, model, dimensions and reason
object
Why, in the operator’s words, naming the command that sets an embedding model
Always unavailable

