Skip to main content

OpenFeature Remote Evaluation Protocol (OFREP) (0.2.0)

Download OpenAPI specification:Download

URL: https://github.com/open-feature/protocol License: Apache-2.0

The OpenFeature Remote Evaluation Protocol (OFREP) is an API specification for feature flagging that enables vendor-agnostic communication between applications and flag management systems.

OFREP defines a standard API layer between OpenFeature providers and flag management systems, allowing any flag management system to implement the protocol and be compatible with community-maintained providers.

For more information, see the OFREP documentation.

OFREP Core

Required: Core APIs to implement to support OFREP.
This is the minimum set of APIs required for a flag management system to be OFREP compatible.

Evaluate A Single Feature Flag

Evaluates a single feature flag by its key. This endpoint is used by server-side providers for dynamic context evaluation, where each evaluation request includes the evaluation context.

The endpoint returns the evaluated flag value along with metadata including the evaluation reason, variant, and any flag-specific metadata. The flag value can be one of several types: boolean, string, integer, float, object, or a code default (indicating the provider should use the code default value).

Use Case: Server-side applications where evaluation context may change between requests and real-time targeting decisions are required.

Authorizations:
ApiKeyAuthBearerAuth
path Parameters
key
required
string
Example: discount-banner

The unique identifier (key) of the feature flag

Request Body schema: application/json
required

Evaluation request containing the context for flag evaluation

required
object (context)

Evaluation context containing information used to evaluate feature flags. The context includes a targetingKey (required) along with additional properties such as user attributes, session data, or request metadata that can be used for targeting rules.

targetingKey
required
string
property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "context": {
    }
}

Response samples

Content type
application/json
{
  • "key": "discount-banner",
  • "value": true,
  • "reason": "TARGETING_MATCH",
  • "variant": "enabled"
}

Bulk Evaluate All Feature Flags

Evaluates all feature flags in a single request using a static context. This endpoint is used by client-side providers for static context evaluation, where all flags are evaluated once and then cached locally for subsequent use.

The endpoint returns an array of all flag evaluations, where each flag can be either a successful evaluation or an evaluation failure. The response includes an ETag header for cache validation, allowing clients to use the If-None-Match header to avoid unnecessary re-evaluation when flags haven't changed.

Authorizations:
ApiKeyAuthBearerAuth
header Parameters
If-None-Match
string
Example: "abc123xyz"

Optional ETag value from a previous bulk evaluation response. If provided and the ETag matches the current flag set, the server will return a 304 Not Modified response, indicating that flags haven't changed since the last evaluation.

Request Body schema: application/json
required
required
object (context)

Evaluation context containing information used to evaluate feature flags. The context includes a targetingKey (required) along with additional properties such as user attributes, session data, or request metadata that can be used for targeting rules.

targetingKey
required
string
property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "context": {
    }
}

Response samples

Content type
application/json
{
  • "flags": [
    ],
  • "metadata": {
    }
}