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.
Authentication
Section titled “Authentication”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.
Endpoints
Section titled “Endpoints”| 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.
Evaluation context
Section titled “Evaluation context”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" } }Single evaluation response
Section titled “Single evaluation response”A successful single evaluation returns OpenFeature ResolutionDetails:
{ "key": "checkout", "value": true, "reason": "TARGETING_MATCH", "variant": "on", "metadata": { "flagVersion": 7 }}Reason mapping
Section titled “Reason mapping”| Oriel reason | OpenFeature reason |
|---|---|
TARGET_MATCH, RULE_MATCH |
TARGETING_MATCH |
FALLTHROUGH |
DEFAULT |
OFF, PREREQUISITE_FAILED |
DISABLED |
| Tracked rollout bucket | SPLIT |
ERROR |
ERROR |
Error mapping
Section titled “Error mapping”| 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.