Delete a world-tier named scope
const url = 'http://localhost:11044/api/v1/admin/kg/ask/scopes/example';const options = {method: 'DELETE', 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 DELETE \ --url http://localhost:11044/api/v1/admin/kg/ask/scopes/example \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The world-tier scope to delete, by the name GET /ask/scopes lists it under. A realm-shipped scope is refused with 409
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 scope as it was before deletion
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"}Unknown scope; the declared names travel with the refusal
The named scope does not exist in the acting user’s world; the ones that do travel with the refusal.
object
The scope names this world declares (its focuses).
Names the scope that was not found.
Example generated
{ "available": [ "example" ], "error": "example"}The scope is realm-shipped and is removed with its realm
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
