Delete a captured scope
const url = 'http://localhost:11044/api/v1/admin/kg/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/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 scope’s name as given in captureAs (the identifier referenced as $name in a query, without the $), among the acting user’s scopes; a name that matches nothing answers deleted: false, not an error
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”Whether anything was deleted — false is an honest no-op, not an error
The outcome of deleting a captured scope.
object
True when a scope was dropped; false when the user had no live scope of that name, which is not an error.
The scope name from the path, echoed back.
Example generated
{ "deleted": true, "name": "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"}
