--- title: "Simulate a given expression for an Entitlement Script." slug: "simulate-a-given-expression-for-an-entitlement-script-1" updated: 2026-03-02T22:30:52Z published: 2026-03-02T22:35:52Z canonical: "support.appgate.com/simulate-a-given-expression-for-an-entitlement-script-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.appgate.com/llms.txt > Use this file to discover all available pages before exploring further. # Simulate a given expression for an Entitlement Script. Post/entitlement-scripts/test Simulate a given expression for an Entitlement Script. SecurityHTTPType bearer Body parameters The evaluation details. Expand Allobject expressionstring Required The javascript expression to evaluate. Examplereturn claims.user.username === 'admin'; userClaimsobject Example{ "username": "admin", "groups": [ "CN=test,OU=unit,DC=company,DC=com", "CN=finance,OU=unit,DC=company,DC=com" ] } deviceClaimsobject Example{ "os": { "name": "Microsoft Windows 10 Pro", "platform": "x64", "type": "desktop" }, "isUserAdmin": true, "language": "en-us" } systemClaimsobject Example{ "connectTime": "2018-11-16T13:25:15.672Z", "tunIPv4": "15.0.0.24", "clientSrcIP": "192.168.111.184" } timestring (date-time) typestring Required The type of the Entitlement Script. Valid values[ "host", "portOrType", "appShortcut" ] Responses200 Evaluation result. object result Array What the evaluation returned as a list. AnyOfstringstringExample10.0.0.1 AppShortcutobject (AppShortcut)namestring Name for the App Shortcut which will be visible on the Client UI. ExampleAccounting Software descriptionstring Description for the App Shortcut which will be visible on the Client UI. ExampleThis app will get you to the Accounting Software. urlstring 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 colorCodeinteger 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 groupNamestring The group name this shortcut is to be grouped by ExampleAccounting Applications outputstring The output logs from the evaluation. Generated by "console.log" and "print" functions. ExampleDebug log errorstring The error text. Available if the evaluation has an error. ExampleExpression does not return list. Received: Boolean executionMsnumber How long it took to evaluate the expression. Example201.0 400 JSON error. Check the JSON format. object Generic HTTP error. idstring Machine readable error code. messagestring Human readable error details. 401 Token error. Login again. object Generic HTTP error. idstring Machine readable error code. messagestring Human readable error details. 403 Insufficient permissions to access this resource. object Generic HTTP error. idstring Machine readable error code. messagestring Human readable error details. 406 Invalid 'Accept' header. object Generic HTTP error. idstring Machine readable error code. messagestring Human readable error details. 422 Request validation error. Check "errors" array for details. Expand Allobject Http 422 error for object validation. idstring Machine readable error code. messagestring Human readable error details. errors Array of object List of fields with validation errors. object fieldstring Name of the field that failed validation. Examplename messagestring Failure reason. Examplemay not be null 500 Unexpected server side error. object Generic HTTP error. idstring Machine readable error code. messagestring Human readable error details.