# README
Playground API
The editor API is used to evaluate your flags for testing purposes.
It has been built to test your configuration in the Flag editor.
Flag Test API
This API is testing an evaluation context with a flag configuration.
All the information are expected in JSON.
Example of request
{
"context": {
"key": "aae1cb41-c3cb-4753-a117-031ddc958e81",
"custom": {
"name": "John Doe",
"email": "[email protected]"
}
},
"flagName": "my-flag-name",
"flag": {
"variations": {
"Default": false,
"A": false,
"B": true
},
"targeting": [
{
"query": "key eq \"aae1cb41-c3cb-4753-a117-031ddc958e81\"",
"percentage": {
"A": 0,
"B": 100
}
}
],
"defaultRule": {
"variation": "Default"
}
}
}
Example of response
{
"trackEvents": false,
"variationType": "B",
"failed": false,
"version": "",
"reason": "TARGETING_MATCH",
"errorCode": "",
"value": true,
"cacheable": true
}
# Functions
EvaluateHandler is the function called when calling the endpoint /v1/feature/evaluate.
HealthHandler endpoint to validate that the service is up and running.
# Structs
ContextWrapper is a struct to migrate the API request to an actual evaluation context.