Replan a goal view over the world's current steps and pin the compiled statement
const url = 'http://localhost:11044/api/v1/admin/kg/views/example/replan';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
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/views/example/replan \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The goal view’s name, as GET /views lists it.
Query Parameters
Section titled “Query Parameters”Optional, and never needed: the call always acts as the signed-in principal. Naming the principal changes nothing; naming anyone else is refused with 403.
Responses
Section titled “Responses”The goal was planned and its compiled statement pinned; savedCypher is that statement
A view was saved.
object
The name the view was saved under — the requested name, trimmed.
Why the stored query differs from the one sent
Always true; a refusal answers 400 with a different body.
The stored query, when promotion inlined captured scopes into it
Example generated
{ "name": "example", "note": "example", "ok": true, "savedCypher": "example"}Not a goal view, an unknown view, or a goal that no longer plans — unreachable, a tie, or refused
A view was refused: a bad name, an unrunnable body, or a name already taken.
object
Why the view was refused. Always present.
The requested name, trimmed. Absent when the declaration itself was malformed — a reserved or uncoercible param, say — and refused before a save was attempted.
Always false.
Preflight defects when the body names shapes the schema contradicts.
Example generated
{ "error": "example", "name": "example", "ok": true, "violations": [ "example" ]}No authenticated principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}username names someone other than the signed-in principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
