Force a decorator to run against one specific node, bypassing the staleness check
const url = 'http://localhost:11044/api/v1/admin/kg/decorate/example/example';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/decorate/example/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 decorator’s registered name, exact and case-sensitive, as listed by GET /admin/kg/decorate; an unknown name answers 404 with the reason in error
The id of the graph node to decorate, run whether or not it is stale; 404 when no node has it. A node with no owning userId is refused when the decorator writes private artifacts and more than one user can see the node
Responses
Section titled “Responses”What the forced run did
What one decoration tick did.
object
Stale nodes this tick picked up. 0 with an error means the decorator is unknown.
Candidates decorated and stamped.
The decorator name from the path, echoed back, whether or not it is registered.
Why the tick could not complete, or null. Always present.
Candidates whose decoration threw; they stay unstamped, so a later tick tries them again. Above 0 on a forced run answers 500.
Candidates passed over without decorating: no node could be loaded, no single owning user could be resolved, or the tick was interrupted.
Example generated
{ "candidates": 1, "decorated": 1, "decorator": "example", "error": "example", "failed": 1, "skipped": 1}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"}Unknown decorator: the report carries the reason in error, with no candidates
What one decoration tick did.
object
Stale nodes this tick picked up. 0 with an error means the decorator is unknown.
Candidates decorated and stamped.
The decorator name from the path, echoed back, whether or not it is registered.
Why the tick could not complete, or null. Always present.
Candidates whose decoration threw; they stay unstamped, so a later tick tries them again. Above 0 on a forced run answers 500.
Candidates passed over without decorating: no node could be loaded, no single owning user could be resolved, or the tick was interrupted.
Example generated
{ "candidates": 1, "decorated": 1, "decorator": "example", "error": "example", "failed": 1, "skipped": 1}Decoration failed: the report says how many nodes failed
What one decoration tick did.
object
Stale nodes this tick picked up. 0 with an error means the decorator is unknown.
Candidates decorated and stamped.
The decorator name from the path, echoed back, whether or not it is registered.
Why the tick could not complete, or null. Always present.
Candidates whose decoration threw; they stay unstamped, so a later tick tries them again. Above 0 on a forced run answers 500.
Candidates passed over without decorating: no node could be loaded, no single owning user could be resolved, or the tick was interrupted.
Example generated
{ "candidates": 1, "decorated": 1, "decorator": "example", "error": "example", "failed": 1, "skipped": 1}
