The legal values of a property: the set, or its size when too wide, or why it cannot be enumerated
const url = 'http://localhost:11044/api/v1/admin/kg/schema/example/example/values';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/schema/example/example/values \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The node label to read the property from.
The property name on that label.
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 value domain in one of its three states
The legal values of a property, from /schema/{label}/{property}/values: the closed set, its size when too wide (tooMany), or not enumerable — branch on which.
object
False when the source cannot be asked at all — NOT the same as an empty set.
The node label from the path, echoed back.
The property name from the path, echoed back.
Why the domain cannot be enumerated — no such property, a credential-shaped one, a source that is unavailable or cannot be asked. Null unless enumerable is false.
Present when the domain is WIDER than max — its presence IS the signal.
object
How many distinct values exist. Null when the source could not be counted.
The cap that was exceeded — the property’s declared max.
A few values, to show the SHAPE of the domain. NEVER treat this as the set.
The closed set, when it fits within the property’s declared max.
Example generated
{ "enumerable": true, "label": "example", "property": "example", "reason": "example", "tooMany": { "count": 1, "max": 1, "sample": [ "example" ] }, "values": [ "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"}
