AI Operators

Modify standing check

Partial update of a standing check. Only fields present in the request are changed; a changed source is compiled first. Administrators can modify locked checks and change the lock flag.

patch/v1/ai/operators/{operator-id}/checks/{check-id}

Path parameters

operator-idinteger required
check-idinteger required

Request body

namestring

Check name (required on creation)

descriptionstring

What the check watches and why

enabledboolean

Enable or disable the check

lockedboolean

Lock the check against modification by the operator

sourcestring

NXSL source (required on creation). Contract: $object is bound to the check's object or null; return null or false when quiet; return a string (title) or a hash with title, severity, and details to fire; any other value is a check error.

intervalinteger

Run interval in seconds (floor 30)

objectIdinteger

Object bound as $object (0 = none); must be readable by the AI operator account

action'wake' | 'observe'

Action applied when the check fires

cooldowninteger

Minimum seconds between two action applications

renotifyIntervalinteger

Seconds after which the action is applied again while the check stays fired (0 = edge only)

Response

Check updated

idinteger

Unique check identifier

instanceIdinteger

Owning AI operator instance

namestring

Check name

descriptionstring

What the check watches and why

enabledboolean

True if the check is scheduled

lockedboolean

True if an administrator locked the check; the operator cannot modify or delete a locked check

createdBy'model' | 'human'

Who created the check

sourcestring

NXSL source code

intervalinteger

Run interval in seconds (minimum 30)

objectIdinteger

Object bound as $object (0 = none)

action'wake' | 'observe'

Action applied when the check fires

cooldowninteger

Minimum seconds between two action applications

renotifyIntervalinteger

Seconds after which the action is applied again while the check stays fired (0 = only on the quiet-to-fired edge)

lastRunstring date-time

Time of the last run

lastVerdict'never' | 'quiet' | 'fired' | 'error'

Verdict of the last run

lastFirestring date-time

Time the check last fired

lastPayloadstring

JSON payload (title, severity, details) of the last fired run, or error of the last failed run

consecutiveErrorsinteger

Consecutive failed runs; the check is disabled when AIOperator.Checks.MaxConsecutiveErrors is reached

runCountinteger

Total number of runs

compileErrorstring

Compilation diagnostic if the stored source no longer compiles (empty otherwise)

createdstring date-time

Creation time

modifiedstring date-time

Last modification time

Changes

Changed in 3 of the 115 revisions of this API.3