curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"string"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "string",
"phase": "admission",
"sandbox_id": "string",
"session_id": "string",
"user_id": "string"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"rule_score": 1,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"string"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 1,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "string"
}
],
"machine_score": 1,
"machine_verdict": "allow",
"processing_time_ms": 1
}
SandboxPolicyEvaluate
Required scope: write
POST
/
api
/
v1
/
policy
/
sandbox
/
evaluate
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"string"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "string",
"phase": "admission",
"sandbox_id": "string",
"session_id": "string",
"user_id": "string"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"rule_score": 1,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"string"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 1,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "string"
}
],
"machine_score": 1,
"machine_verdict": "allow",
"processing_time_ms": 1
}
Required scope:
write
Request body
SandboxPolicyRequest
SandboxActionCandidate
SandboxPolicyContext
object
string
required
SandboxPolicyPhase
string
string
string
Response
SandboxPolicyApiResponse
SandboxPolicyEvaluation
required
Show SandboxPolicyEvaluation
Show SandboxPolicyEvaluation
CanonicalSandboxAction
required
string
required
SandboxExpectedEffects
required
string
integer (int32)
required
SandboxPolicyVerdict
required
string[]
required
SandboxPolicyVerdict
required
string[]
required
number (double)
required
boolean
required
SandboxMachineProofNode[]
required
integer (int32)
required
SandboxPolicyVerdict
required
integer (int64)
required
Status codes
| Code | Meaning |
|---|---|
200 | Sandbox policy evaluation result |
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 |
500 | Internal server error |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"string"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "string",
"phase": "admission",
"sandbox_id": "string",
"session_id": "string",
"user_id": "string"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "string",
"isolation": "string",
"timeout_seconds": 1,
"type": "create_sandbox"
},
"rule_score": 1,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"string"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 1,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "string"
}
],
"machine_score": 1,
"machine_verdict": "allow",
"processing_time_ms": 1
}