curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsrl/assert' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "philosopher(socrates). taught(socrates, plato)."
}'
{
"errors": [
"string"
],
"facts_added": 1,
"rules_added": 1,
"success": true
}
Assert facts and rules from NSR-L code
Required scope: write
POST
/
api
/
v1
/
nsrl
/
assert
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsrl/assert' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "philosopher(socrates). taught(socrates, plato)."
}'
{
"errors": [
"string"
],
"facts_added": 1,
"rules_added": 1,
"success": true
}
Required scope:
write
Request body
NSRLAssertRequest
string
required
NSR-L facts/rules to assert
Response
NSRLAssertResponse
string[]
required
integer
required
integer
required
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | Assertion result |
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/nsrl/assert' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "philosopher(socrates). taught(socrates, plato)."
}'
{
"errors": [
"string"
],
"facts_added": 1,
"rules_added": 1,
"success": true
}
Last modified on August 31, 2026