Skip to content

Overview

EXPERIMENTAL

flagd supports the OpenFeature Remote Evaluation Protocol for flag evaluations. The service starts on port 8016 by default and this can be changed using startup flag --ofrep-port (or -r shothand flag).

Usage

Given flagd is running with flag configuration for myBoolFlag, you can evaluate the flag with OFREP API with following curl request,

curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags/myBoolFlag'

To evaluate all flags currently configured at flagd, use OFREP bulk evaluation request,

curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags'

HTTP Caching

The bulk evaluation endpoint supports HTTP caching via ETags (MD5-based). Clients can use the If-None-Match header with a previously received ETag to validate cached responses. When the response hasn't changed, the server returns 304 Not Modified without a body, reducing bandwidth.

curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags' \
  -H 'If-None-Match: "a1b2c3d4e5f6..."'

See the cheat sheet for more OFREP examples including context-sensitive evaluation and selectors.