Skip to content

Return the runnable Cypher for a saved view invoked with the given arguments

POST
/api/v1/kg/studio/views/{name}/invocation
curl --request POST \
--url http://localhost:11044/api/v1/kg/studio/views/example/invocation \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "args": { "additionalProperty": "example" } }'
name
required
string

The view’s name, as GET /kg/studio/views lists it — a world or realm view, saved or shipped; no view of that name is a 404

Optional. The view’s arguments under args (name → value), merged over its declared defaults, coerced and substituted; omitted or empty runs on the defaults. A missing required or uncoercible argument is a 400. Keys sent beside args rather than inside it are ignored here

Media typeapplication/json

Arguments for invoking a saved view, the body of /views/{name}/invocation and /views/{name}/run.

object
args

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
key
additional properties

Example generated

{
"args": {
"additionalProperty": "example"
}
}

The runnable cypher for this invocation

Media typeapplication/json

The runnable cypher for a saved view invoked with the given arguments.

object
cypher
required

Run this through /execute, so a view uses the same engine as any other query.

string
name
required

The view’s name, as given in the path.

string

Example generated

{
"cypher": "example",
"name": "example"
}

Bad view arguments

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}

Not authenticated

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}

Unknown view

Media typeapplication/json

A refusal carrying only a human-readable reason.

object
error
required

What went wrong, in the terms the caller can act on.

string

Example generated

{
"error": "example"
}