Simulate a given expression for a Condition, Policy or Criteria Script.

Prev Next
Post
/conditions/test

Simulate a given expression for a Condition, Policy or Criteria Script.

Security
HTTP
Type bearer
Body parameters

The evaluation details.

Expand All
object
expression
string Required

The javascript expression to evaluate.

Examplereturn claims.user.username === 'admin';
userClaims
object
Example{ "username": "admin", "groups": [ "CN=test,OU=unit,DC=company,DC=com", "CN=finance,OU=unit,DC=company,DC=com" ] }
deviceClaims
object
Example{ "os": { "name": "Microsoft Windows 10 Pro", "platform": "x64", "type": "desktop" }, "isUserAdmin": true, "language": "en-us" }
systemClaims
object
Example{ "connectTime": "2018-11-16T13:25:15.672Z", "tunIPv4": "15.0.0.24", "clientSrcIP": "192.168.111.184" }
time
string (date-time)
Responses
200

Evaluation result.

object
result
boolean

Whether the evaluation succeeded or not.

output
string

The output logs from the evaluation. Generated by "console.log" and "print" functions.

ExampleDebug log
error
string

The error text. Available if the evaluation has an error.

ExampleExpression does not return boolean. Received: String
executionMs
number

How long it took to evaluate the expression.

Example201.0
400

JSON error. Check the JSON format.

object

Generic HTTP error.

id
string

Machine readable error code.

message
string

Human readable error details.

401

Token error. Login again.

object

Generic HTTP error.

id
string

Machine readable error code.

message
string

Human readable error details.

403

Insufficient permissions to access this resource.

object

Generic HTTP error.

id
string

Machine readable error code.

message
string

Human readable error details.

406

Invalid 'Accept' header.

object

Generic HTTP error.

id
string

Machine readable error code.

message
string

Human readable error details.

422

Request validation error. Check "errors" array for details.

Expand All
object

Http 422 error for object validation.

id
string

Machine readable error code.

message
string

Human readable error details.

errors
Array of object

List of fields with validation errors.

object
field
string

Name of the field that failed validation.

Examplename
message
string

Failure reason.

Examplemay not be null
500

Unexpected server side error.

object

Generic HTTP error.

id
string

Machine readable error code.

message
string

Human readable error details.