Flags: una decisión
Un feature flag es una decisión evaluada sobre el estado de usuario. La segmentación es un conjunto de condiciones sobre ese estado, comprobadas en el momento en que se pide el flag.
At a glance
- Host
https://api.prodantix.com- Read
GET /v1/flags,GET /v1/flags/snapshot- Write
upsertFlag,archiveFlagover GraphQL- Live updates
flagChangeon the project room- Auth
- Project key to read, access token to write
- Segmentación en tiempo real sobre el estado de usuario en vivo
- Se decide en el momento en que preguntas, no se lee de una lista almacenada
- Despliegues y experimentos medidos sobre la misma fuente de verdad
Cómo funciona
A flag is evaluated against the user state currently on file for a distinct id. Rules are ordered; the first match wins, and a flag with no matching rule falls back to its default. Evaluation is server-side by default, so a rule change takes effect without a client release.
Dónde acceder
| Surface | Operation |
|---|---|
| REST | GET /v1/flags · GET /v1/flags/snapshot |
| GraphQL | flags query · upsertFlag, archiveFlag mutations |
| Realtime | flagChange on a project room |
| MCP | prodantix.flags.list · .upsert · .archive |
Ejemplo
curl "https://api.prodantix.com/v1/flags?distinct_id=u_8f3a" \
-H "Authorization: Bearer $PRODANTIX_KEY"const flags = await prodantix.flags.all({ distinctId: 'u_8f3a' });
if (flags['new-checkout']) {
// ...
}final flags = await prodantix.flags.all(distinctId: 'u_8f3a');
if (flags['new-checkout'] == true) {
// ...
}flags = prodantix.flags.all(distinct_id="u_8f3a")
if flags.get("new-checkout"):
...Evaluating locally
For latency-sensitive paths, fetch the whole ruleset once and evaluate in-process. Snapshot responses carry Cache-Control: public, max-age=30, stale-while-revalidate=300.
JSON
{
"flags": [
{
"key": "new-checkout",
"enabled": true,
"rules": [
{ "property": "plan", "operator": "in", "values": ["pro", "scale"] }
]
}
]
}