Skip to content

The legal values of a property: the set, or its size when too wide, or why it cannot be enumerated

GET
/api/v1/admin/kg/schema/{label}/{property}/values
curl --request GET \
--url http://localhost:11044/api/v1/admin/kg/schema/example/example/values \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
label
required
string

The node label to read the property from.

property
required
string

The property name on that label.

username
string

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.

The value domain in one of its three states

Media typeapplication/json

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
enumerable
required

False when the source cannot be asked at all — NOT the same as an empty set.

boolean
label
required

The node label from the path, echoed back.

string
property
required

The property name from the path, echoed back.

string
reason

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.

string
tooMany

Present when the domain is WIDER than max — its presence IS the signal.

object
count

How many distinct values exist. Null when the source could not be counted.

integer format: int32
max
required

The cap that was exceeded — the property’s declared max.

integer format: int32
sample
required

A few values, to show the SHAPE of the domain. NEVER treat this as the set.

Array<string>
values

The closed set, when it fits within the property’s declared max.

Array<string>

Example generated

{
"enumerable": true,
"label": "example",
"property": "example",
"reason": "example",
"tooMany": {
"count": 1,
"max": 1,
"sample": [
"example"
]
},
"values": [
"example"
]
}

No authenticated principal

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

username names someone other than the signed-in principal

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