Start a slow, resumable fill of an expensive materialization
const url = 'http://localhost:11044/api/v1/admin/kg/fills';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"budgetPerTick":1,"cypher":"example","label":"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/admin/kg/fills \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "budgetPerTick": 1, "cypher": "example", "label": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Username to act as; when it resolves to a user it is used in preference to the authenticated principal. Omitted or blank, the authenticated principal acts; 401 when neither resolves
Request Bodyrequired
Section titled “Request Bodyrequired”The fill to start, owned by the acting user: cypher (required, 400 when blank) is the query the scheduler re-runs one chunk per tick until a pass makes no live call; budgetPerTick caps live producer calls per chunk, default 60, clamped to 1–500; label names the fill in progress and activity, and the fill’s id stands in when it is blank
What to fill: the body of POST /admin/kg/fills
object
Units of paid work one tick may buy: a producer fetch group or a group of an inline model judgement, not HTTP requests or tokens. Clamped to 1-500; defaults to 60 when absent
The Virtual Cypher query whose materialization the fill drives; every tick re-runs it. Blank is a 400
Display name for the fill, shown in its activity; empty when absent, and the fill id is shown instead
Example generated
{ "budgetPerTick": 1, "cypher": "example", "label": "example"}Responses
Section titled “Responses”The fill, as started — carrying a warning when its producers cannot outlive the sweep, so it will poll rather than converge
A fill: a slow, resumable materialization of one query, re-run a budgeted chunk per tick until a pass buys nothing. What /admin/kg/fills starts and lists.
object
Units of paid work one tick may buy — a producer fetch group or a group of an inline model judgement, not HTTP requests or tokens. Clamped to 1–500; defaults to 60.
The Cypher every tick re-runs, as it was submitted.
The fill’s id, fill_ plus 12 hex characters — what DELETE /admin/kg/fills/{id} takes.
A display name for the fill. Empty when none was given.
How far the fill has got, as of its most recent tick.
object
Keys the producer caches answer, of the total the last pass enumerated. keysTotal is null where the query has no denominator; never derive a fraction then.
object
Distinct key units, one per producer, key and period, answered in the execution from a cache tier or a successful fetch
Distinct key units the execution demanded; null when the sweep has no denominator (totality UNKNOWN), which never means zero
Epoch milliseconds at which the fill was started.
Why the most recent tick failed or was refused. Null when it ran clean. An error leaves the fill RUNNING.
Epoch milliseconds of the most recent tick, refused ones included. Null before the first.
Paid calls in the most recent tick alone, counted as liveCallsTotal counts them.
Paid calls across every tick: producer fetches, in-query model calls and semantic searches.
RUNNING, DONE (a full pass needed no paid work) or CANCELLED.
Chunks run so far. A chunk refused before it ran — a halt, a ceiling — does not count.
The routine the fill runs as, whose agent governs every chunk. Null for a fill an operator started outside any routine run.
The id of the user the fill belongs to and runs as.
Why this fill will keep polling rather than reach DONE — its producers’ records do not outlive a sweep. Decided at start. Null when it can converge, or when the query could not be planned to say.
Example
{ "progress": { "coverage": { "totality": "KNOWN" }, "trend": "UNKNOWN" }}Cypher is required: a fill needs the materialization it is filling
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}No authenticated principal and no resolvable username
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
