resolvePolicyValue
query · in the family Operating policy
What it does
What policy value applies right now (or at a chosen moment) for a location or organization.
Resolve the effective policy value for (scope × key) at an instant. 'at' absent = the server's now (past instants are legal — historical reconstruction is a read). What this quotes is exactly what the platform applies. An unknown key refuses naming the registry roster. Template class A18_POLICY (sensitive config — owner/manager).
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Operating policy — The operational policies and thresholds your organization runs by.
Roles that may call it:
- Owner
- Manager
- An API key whose scope allows
api:resolvePolicyValue
What happens
Reads only — exactly the value the platform applies: the location’s own window, else its organization’s, else the platform default.
Arguments
Returns
PolicyResolution PolicyResolution! — The effective resolved policy value for one (scope × key) at one instant: the winning nearest-ancestor record's identity + window, or the registry-default floor (source = default, record fields null). Resolution never misses.
Example request
query ExampleResolvePolicyValue($key: String!, $organizationId: ID!, $logicalFacilityId: ID) {
resolvePolicyValue(key: $key, organizationId: $organizationId, logicalFacilityId: $logicalFacilityId) {
key
valueInt
source
recordId
level
startAt
endAt
}
}Variables:
{
"key": "<key>",
"organizationId": "01900000-0000-7000-8000-1971e30a0000",
"logicalFacilityId": "01900000-0000-7000-8000-10c08c590000"
}Example response
{
"data": {
"resolvePolicyValue": {
"key": "<key>",
"valueInt": 1,
"source": "<source>",
"recordId": "01900000-0000-7000-8000-9f4565ec0000",
"level": "<level>",
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)