Skip to content

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

POST
/api/v1/admin/kg/views/{name}/invocation
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" } }'
name
required
string

The view’s name, as GET /views lists it.

username
string

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.

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

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"
}

No authenticated principal

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"
}

username names someone other than the signed-in principal

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"
}