curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/programs/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"args": [
{
"type": "null"
}
],
"children": [
{
"type": "null"
}
],
"program": {
"index": 1,
"type": "var"
}
}'
{
"depth": 1,
"execution_time_ms": 250,
"output": {
"type": "null"
}
}
Evaluate a program with optional arguments
Required scope: write
POST
/
api
/
v1
/
nsr
/
programs
/
evaluate
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/programs/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"args": [
{
"type": "null"
}
],
"children": [
{
"type": "null"
}
],
"program": {
"index": 1,
"type": "var"
}
}'
{
"depth": 1,
"execution_time_ms": 250,
"output": {
"type": "null"
}
}
Required scope:
write
Request body
ProgramEvaluateRequest
SemanticValueRequest[]
Optional arguments to bind as variables
SemanticValueRequest[]
Optional child values for
child lookupsProgramRequest
required
Response
ProgramEvaluateResponse
integer
required
Program depth
integer (int64)
required
Evaluation time in milliseconds
Status codes
| Code | Meaning |
|---|---|
200 | Program evaluated |
400 | Invalid request |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/programs/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"args": [
{
"type": "null"
}
],
"children": [
{
"type": "null"
}
],
"program": {
"index": 1,
"type": "var"
}
}'
{
"depth": 1,
"execution_time_ms": 250,
"output": {
"type": "null"
}
}
Last modified on August 31, 2026