FlagFix
API referenceReferenceRuntime Flags

Évaluer un flag (SERVER_SDK)

POST
/api/v1/runtime/evaluate

Header Parameters

X-FlagFix-Sdk-Key*string

Clé d'environnement complète {prefix}.{secret}. Le serveur en dérive projectId, environmentId et keyType. CLIENT_SDK et SERVER_SDK acceptés selon l'opération.

Request Body

application/json
  1. body
key*string
Length1 <= length
targetingKey?string|null
context?|null

Response Body

Résultat d'évaluation (inclut reason / variant)

application/json
  1. response
flag*
matchedSegments?array<string>
Example Request
curl -X POST 'http://localhost:18080/api/v1/runtime/evaluate' \  -H 'X-FlagFix-Sdk-Key: ff_development_client-sdk.abc123…' \  -H 'Content-Type: application/json' \  -d '{  "key": "new_checkout",  "targetingKey": "user_123",  "context": {    "plan": "pro",    "country": "SN"  }}'
Example Response
{  "flag": {    "key": "string",    "enabled": true,    "value": null,    "reason": "string",    "variant": "string",    "configurationVersion": 0  },  "matchedSegments": [    "string"  ]}

Was this page useful?