List the named scopes the acting user's asks can be narrowed to
const url = 'http://localhost:11044/api/v1/admin/kg/ask/scopes';const options = {method: 'GET', 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 GET \ --url http://localhost:11044/api/v1/admin/kg/ask/scopes \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”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 world’s declared scopes; empty when none are declared
A named scope: a declared realm set an ask can be narrowed to via scope=.
object
What the scope is for, as its focus declares it. Empty when the declaration gives none.
The scope’s name — the value scope= accepts.
The realm names whose schema the scoped ask sees (plus the always-on core).
Example generated
[ { "description": "example", "name": "example", "realms": [ "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"}
