Skip to content

Delete a captured scope

DELETE
/api/v1/admin/kg/scopes/{name}
curl --request DELETE \
--url http://localhost:11044/api/v1/admin/kg/scopes/example \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
name
required
string

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

username
string

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

Whether anything was deleted — false is an honest no-op, not an error

Media typeapplication/json

The outcome of deleting a captured scope.

object
deleted
required

True when a scope was dropped; false when the user had no live scope of that name, which is not an error.

boolean
name
required

The scope name from the path, echoed back.

string

Example generated

{
"deleted": true,
"name": "example"
}

No authenticated principal and no resolvable username

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