Pin a captured scope: clear its expiry so it survives until explicitly deleted
const url = 'http://localhost:11044/api/v1/admin/kg/scopes/example/pin';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/scopes/example/pin \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The scope’s name as given in captureAs (the identifier referenced as $name in a query, without the $), among the acting user’s scopes; 404 when there is no such live scope, including one that has already expired
Query Parameters
Section titled “Query Parameters”Username whose scopes to act on, honoured only when the request has no authenticated principal (dev-mode calls); an authenticated caller always acts on its own scopes. 401 when neither resolves to a user
Responses
Section titled “Responses”The scope as stored, now with no expiry
A captured query scope: a frozen result set referenced in a later query as (x:$name).
object
When the membership froze, ISO-8601.
When the scope lapses, ISO-8601 — null means PINNED (kept until deleted).
How many members the capture froze. Membership is frozen; values stay live.
The name the scope was captured under, unique per user; a later query binds it as (x:$name).
The node label later references bind with.
The statement that produced the capture — the scope’s provenance.
Example generated
{ "capturedAt": "example", "expiresAt": "example", "members": 1, "name": "example", "outputLabel": "example", "statement": "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"}No such scope (or it already expired)
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
