Simulate a given expression for an Entitlement Script.

Prev Next
Post
/entitlement-scripts/test

Simulate a given expression for an Entitlement 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)
type
string Required

The type of the Entitlement Script.

Valid values[ "host", "portOrType", "appShortcut" ]
Responses
200

Evaluation result.

object
result
Array

What the evaluation returned as a list.

AnyOf
string
string
Example10.0.0.1
AppShortcut
object (AppShortcut)
name
string

Name for the App Shortcut which will be visible on the Client UI.

ExampleAccounting Software
description
string

Description for the App Shortcut which will be visible on the Client UI.

ExampleThis app will get you to the Accounting Software.
url
string

The URL that will be triggered on the OS to be handled. For example, an HTTPS URL will start the browser for the given URL.

Examplehttps://service.company.com
colorCode
integer

The code of the published app on the client.

  • 1: Light Green
  • 2: Green
  • 3: Indigo
  • 4: Deep Purple
  • 5: Yellow
  • 6: Lime
  • 7: Light Blue
  • 8: Blue
  • 9: Amber
  • 10: Orange
  • 11: Cyan
  • 12: Teal
  • 13: Deep Orange
  • 14: Red
  • 15: Gray
  • 16: Brown
  • 17: Pink
  • 18: Purple
  • 19: Blue Gray
  • 20: Near Black
Default1
groupName
string

The group name this shortcut is to be grouped by

ExampleAccounting Applications
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 list. Received: Boolean
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.