curl --request POST \
--url http://localhost:8080/ofrep/v1/evaluate/flags/<flagKey> \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Flipt-Namespace: <namespaceKey>' \
--data '{
"context": {
"targetingKey": "targetingKey1"
}
}'
{
"type": "VARIANT_EVALUATION_RESPONSE_TYPE",
"booleanResponse": {
"enabled": true,
"reason": "UNKNOWN_EVALUATION_REASON",
"requestId": "<string>",
"requestDurationMillis": 123,
"timestamp": "2023-11-07T05:31:56Z",
"flagKey": "<string>",
"segmentKeys": [
"<string>"
]
},
"variantResponse": {
"match": true,
"segmentKeys": [
"<string>"
],
"reason": "UNKNOWN_EVALUATION_REASON",
"variantKey": "<string>",
"variantAttachment": "<string>",
"requestId": "<string>",
"requestDurationMillis": 123,
"timestamp": "2023-11-07T05:31:56Z",
"flagKey": "<string>"
},
"errorResponse": {
"flagKey": "<string>",
"namespaceKey": "<string>",
"reason": "UNKNOWN_ERROR_EVALUATION_REASON"
}
}OpenFeature Evaluation [OFREP]
Flag Evaluation
Evaluate a single flag via OFREP.
POST
/
ofrep
/
v1
/
evaluate
/
flags
/
{key}
curl --request POST \
--url http://localhost:8080/ofrep/v1/evaluate/flags/<flagKey> \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Flipt-Namespace: <namespaceKey>' \
--data '{
"context": {
"targetingKey": "targetingKey1"
}
}'
{
"type": "VARIANT_EVALUATION_RESPONSE_TYPE",
"booleanResponse": {
"enabled": true,
"reason": "UNKNOWN_EVALUATION_REASON",
"requestId": "<string>",
"requestDurationMillis": 123,
"timestamp": "2023-11-07T05:31:56Z",
"flagKey": "<string>",
"segmentKeys": [
"<string>"
]
},
"variantResponse": {
"match": true,
"segmentKeys": [
"<string>"
],
"reason": "UNKNOWN_EVALUATION_REASON",
"variantKey": "<string>",
"variantAttachment": "<string>",
"requestId": "<string>",
"requestDurationMillis": 123,
"timestamp": "2023-11-07T05:31:56Z",
"flagKey": "<string>"
},
"errorResponse": {
"flagKey": "<string>",
"namespaceKey": "<string>",
"reason": "UNKNOWN_ERROR_EVALUATION_REASON"
}
}curl --request POST \
--url http://localhost:8080/ofrep/v1/evaluate/flags/<flagKey> \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Flipt-Namespace: <namespaceKey>' \
--data '{
"context": {
"targetingKey": "targetingKey1"
}
}'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
200 - application/json
OK
Was this page helpful?