Return the runnable Cypher for a saved view invoked with the given arguments
const url = 'http://localhost:11044/api/v1/admin/kg/views/example/invocation';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"args":{"additionalProperty":"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/views/example/invocation \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "args": { "additionalProperty": "example" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The 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.
Request Body
Section titled “Request Body”Optional. The view’s arguments under args (name → value), merged over its declared defaults, coerced and substituted; omitted or empty resolves it on the defaults. A missing required or uncoercible argument is a 400. Keys sent beside args rather than inside it are ignored here
Arguments for invoking a saved view, the body of /views/{name}/invocation and /views/{name}/run.
object
Values by declared parameter name, merged over the view’s defaults; empty or absent runs it on its defaults. Keys sent beside args instead of inside it are refused with a 400 by /run.
object
Example generated
{ "args": { "additionalProperty": "example" }}Responses
Section titled “Responses”The runnable cypher for this invocation
The runnable cypher for a saved view invoked with the given arguments.
object
Run this through /execute, so a view uses the same engine as any other query.
The view’s name, as given in the path.
Example generated
{ "cypher": "example", "name": "example"}Bad view arguments
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
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"}Unknown view
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
