Skip to content

OpenFeature OFREP reference

Oriel implements the OpenFeature Remote Evaluation Protocol at /ofrep/v1. These endpoints use OFREP response bodies rather than Oriel’s /api/v1 envelope.

OFREP authenticates with a project- and environment-pinned feature-flag SDK key. Pass the key as a bearer token:

Authorization: Bearer orl_...

Browser sessions and general API tokens do not authorize OFREP evaluation.

Method Path Purpose
POST /ofrep/v1/evaluate/flags/{key} Evaluate one flag.
POST /ofrep/v1/evaluate/flags Evaluate every non-archived flag available to the SDK key.

The bulk endpoint supports ETag and If-None-Match. When the ruleset has not changed, it returns 304 Not Modified.

The request body is an OpenFeature evaluation context. targetingKey is the unit key used for targeting and bucketing. Other fields are exposed as targeting attributes.

{ "context": { "targetingKey": "user-123", "tier": "pro" } }

A successful single evaluation returns OpenFeature ResolutionDetails:

{
"key": "checkout",
"value": true,
"reason": "TARGETING_MATCH",
"variant": "on",
"metadata": { "flagVersion": 7 }
}
Oriel reason OpenFeature reason
TARGET_MATCH, RULE_MATCH TARGETING_MATCH
FALLTHROUGH DEFAULT
OFF, PREREQUISITE_FAILED DISABLED
Tracked rollout bucket SPLIT
ERROR ERROR
Oriel error OpenFeature errorCode HTTP
Flag not found FLAG_NOT_FOUND 404
Malformed flag PARSE_ERROR 400
Targeting key missing TARGETING_KEY_MISSING 400
Other evaluation error GENERAL 400

Per-flag errors in a bulk response are embedded beside successful flag results.