Skip to content

Retrieve a single decision

Request

For compatibility with CDN, any web headers (Referrer, User-Agent) will be accepted and passed onto the rule engine

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Query
sdkFeatureSlugstringrequired

Feature SDK slug

Example:sdkFeatureSlug=featureX
sessionstringrequired

Zephr Session ID, required for trials.

Example:session=xxx-xxx-xxx
foreign_id.xxxstringrequired

Foreign ID used to identify the user. The foreign system is parsed as the remainder of the parameter key name following 'foreign_id.'

Example:foreign_id.xxx=xxx-xxx-xxx
ipstringrequired

Client IP address, defaults to request IP.

Example:ip=x.x.x.x
userAgentstringrequired

Client user agent

Example:userAgent=Mozilla/5.0 (Macintosh; Intel Mac OS X 11)...
pathstringrequired

Request path, required for trials.

Example:path=/x.html
content_idstringrequired

Content ID, used to perform requests to a 3rd party API for additional content information used in making a decision.

Example:content_id=xxx-xxx-xxx
jwtstringrequired

A Json web token, may include identity or product holding claims.

Example:jwt=xxx-xxx-xxx
rawbooleanrequired

Should output raw value

Default:false
cURL
curl -i -X GET \
  'https://demo-site/zephr/decision-engine?sdkFeatureSlug=featureX&session=xxx-xxx-xxx&foreign_id.xxx=xxx-xxx-xxx&ip=x.x.x.x&userAgent=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2011)...&path=%2Fx.html&content_id=xxx-xxx-xxx&jwt=xxx-xxx-xxx&raw=false' \
  -b blaize_session=YOUR_API_KEY_HERE

Responses

Raw parameter response

Headers
any
Body*/*
sdkFeatureSlugstringrequired

The slug of the SDK feature which has been evaluated.

Example:"sdk-feature-1"
outputTypestring

Feature output type. Present if there were no errors.

Enum:"ENUM""STRING""NUMBER""JSON""TRANSFORMATION""COMPONENT"
outputValuestring

Feature output value. Present if there were no errors.

  • For the 'JSON_COMPONENT' output type, the response will be stringified JSON.
  • For the 'TRANSFORMATION' output type, the response will contain a stringified JSON array of transformations to be applied, including ENABLE_CONTENT, CUSTOM_COMPONENT, TEMPLATE_COMPONENT and FORM.
Example:"YES"
errorstring

The error message explaining why this decision failed to resolve. Present only if there was an error.

Example:"500: Internal error ..."
Response
{
  "sdkFeatureSlug": "sdk-feature-1",
  "outputType": "ENUM",
  "outputValue": "YES",
  "error": "500: Internal error ..."
}