policy.feature-flag.query ​
Read a feature flag's state, or list an app's flags
Read feature-flag state for an app (GOV-7).
Inputs: actor, organization_uuid, identity_app_uuid (required); flag_key, flag_type ("module"|"workflow", default "module"), plan_tier optional.
- With flag_key: returns found + enabled for that single flag.
- Without flag_key: returns items [{flag_type, flag_key, plan_tier, enabled}] + total. Read-only. A missing flag reports found=False, enabled=False (the decision layer interprets "off/missing" as flag_off — fail-closed lives there, not here).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-policy |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
actor | string | Yes | — | — |
organization_uuid | uuid | Yes | — | — |
identity_app_uuid | uuid | Yes | — | — |
flag_key | string | No | — | — |
flag_type | string | No | — | — |
plan_tier | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
found | boolean | No | — | — |
enabled | boolean | No | — | — |
flag_type | string | No | — | — |
flag_key | string | No | — | — |
plan_tier | string | No | — | — |
items | list | No | — | — |
total | integer | No | — | — |
identity_app_uuid | uuid | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | string | No | — | — |
failed_step | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
reason | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "policy.feature-flag.query",
"initial_data": {
"actor": "value",
"organization_uuid": "value",
"identity_app_uuid": "value"
}
}