Skip to main content
POST
/
api
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
evaluate
/
{*}
Evaluate environment decision
curl --request POST \
  --url https://api.example.com/api/projects/{projectId}/environments/{environmentId}/evaluate/{*} \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Token: <api-key>' \
  --data '
{
  "context": {
    "cart": {
      "total": 1500
    },
    "customer": {
      "country": "US",
      "tier": "gold"
    }
  },
  "trace": false
}
'
{
  "result": "<unknown>",
  "performance": "<string>",
  "trace": {}
}

Authorizations

X-Access-Token
string
header
required

Project access token is obtained within project settings

Path Parameters

projectId
string
required

ProjectId or projectKey

environmentId
string
required

EnvironmentId or environmentKey

*
string
required

Decision document key

Body

application/json
context
object

Evaluation context

Example:
{
"cart": { "total": 1500 },
"customer": { "country": "US", "tier": "gold" }
}
trace
boolean
default:false

Include decision trace in response

Response

Successful environment decision evaluation result

Successful environment decision evaluation result

result
any

The computed result from the decision evaluation

performance
string

Total execution time of the decision

trace
object

Detailed trace of each node execution when trace is enabled