API ReferenceFlag Evaluation API

Evaluate single flag

Evaluate a single feature flag for the given context

POST
/ofrep/v1/evaluate/flags/{key}

Path Parameters

key*string

Flag key to evaluate

Header Parameters

X-API-Key*string

API key for authentication

X-Flipswitch-SDK?string
X-Flipswitch-Runtime?string
X-Flipswitch-OS?string
X-Flipswitch-Features?string

Request Body

application/json

Evaluation request with context

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/ofrep/v1/evaluate/flags/string" \  -H "X-API-Key: string" \  -H "Content-Type: application/json" \  -d '{    "context": {      "targetingKey": "string"    }  }'
{  "key": "string",  "value": null,  "reason": "string",  "variant": "string",  "metadata": {    "property1": null,    "property2": null  }}
{  "key": "string",  "errorCode": "string",  "errorDetails": "string"}
Empty
Empty
{  "key": "string",  "errorCode": "string",  "errorDetails": "string"}
{  "errorCode": "string",  "errorDetails": "string"}