Evaluate all flags
Evaluate all feature flags for the given context.
ETag Caching
This endpoint supports ETag-based caching to reduce bandwidth and improve performance for polling clients.
How it works
- First request: Call without
If-None-Matchheader. Response includes anETagheader. - Subsequent requests: Include the
If-None-Matchheader with the previousETagvalue. - If flags unchanged: Server returns
304 Not Modifiedwith no body. - If flags changed: Server returns
200 OKwith new flag values and a newETag.
Example flow
# First request
POST /ofrep/v1/evaluate/flags
X-API-Key: your-api-key
Response: 200 OK
ETag: "abc123"
{ "flags": [...] }
# Subsequent request with ETag
POST /ofrep/v1/evaluate/flags
X-API-Key: your-api-key
If-None-Match: "abc123"
Response: 304 Not Modified (no body)
When to use
Use ETag caching when polling for flag updates. For real-time updates, consider using the SSE endpoint at /api/v1/flags/events instead.
Request Body
application/jsonRequiredEvaluation request with context
contextRequiredEvaluationContextHeader Parameters
X-API-KeyRequiredstringAPI key for authentication
If-None-MatchstringETag from a previous response. If the flag configuration hasn't changed, the server returns 304 Not Modified.