postEvaluate a decision

Evaluates the supplied decision version synchronously without deployment routing. Versions 1 and above select saved versions; 0 selects the working copy. The REST request has no environment parameter and does not resolve environment configuration variables. Evaluation runs the decision logic and can call external integrations; it is not a side-effect-free dry run. Check status even on HTTP 201: node failures can return FAILED with result.error. Hard engine failures can instead return a non-2xx error. The response includes the available redacted per-node trace. Send an Idempotency-Key header to retry safely: a repeated key returns the stored evaluation without running the decision again.

Required service-token scope: evaluation:write. End-user access is checked against workspace policies. Send a Bearer token and the X-Workspace-Id header.

curl --request POST \
  --url https://api.test.neobits.ai/logic/v1/decisions/019991b1-0000-7000-8000-000000000003/evaluations \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'Idempotency-Key: 7f9c2ba4-e88f-4f2e-9b1d-1f3c6a0e5d21' \
  --header 'X-Workspace-Id: 019991b1-0000-7000-8000-000000000001' \
  --header 'Content-Type: application/json' \
  --data '{"version":1,"fact":{"age":25}}'

Request

Headers

  • Authorization•string

    Bearer token authentication using OAuth 2.0 client credentials flow.

  • X-Workspace-Id•string<uuid>

    Active workspace UUID. The authenticated principal must have access to this workspace.

  • Idempotency-Key•string

    Client-chosen key, such as a UUID, that makes a retry safe. A repeated key returns the stored 201 response without running the request again. Reusing a key with a different request returns 409. A non-2xx response does not store the key.

Params (path)

  • decisionId•string<uuid>

    Decision whose version will be evaluated.

Body

  • version•integer

    Decision version: 1 and above select saved versions; 0 selects the editable working copy.

  • fact•object

    Input facts expected by your decision. The example assumes a decision accepting age and returning eligible; replace it with your own input.

    Response

    Headers

    • Content-Type•string

      The content type of the response.

    Body

    • id•string<uuid>

      Persisted evaluation identifier; nullable in the shared evaluation contract.

    • status•string

      The synchronous REST call returns COMPLETED or FAILED. PENDING is part of the shared evaluation model.

    • result•

      Decision-specific output. When status is FAILED, contains an error property describing the failure.

    • performance•string

      Engine-reported duration, or null when unavailable.

    • trace•object

      Engine trace keyed by node ID. Contains per-node diagnostic data; sensitive configuration values are redacted. Null when unavailable.