Flagship·续9
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses">Link to this property</a>
<details>
<summary>
logical_operator: "AND"or "OR"
</summary>
One of the following:
"AND"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%200">Link to this property</a>
"OR"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses">Link to this property</a>
<details>
<summary>
logical_operator: "AND"or "OR"
</summary>
One of the following:
"AND"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%200">Link to this property</a>
"OR"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses">Link to this property</a>
<details>
<summary>
logical_operator: "AND"or "OR"
</summary>
One of the following:
"AND"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%200">Link to this property</a>
"OR"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20clauses">Link to this property</a>
<details>
<summary>
logical_operator: "AND"or "OR"
</summary>
One of the following:
"AND"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%200">Link to this property</a>
"OR"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator%20%3E%20(member)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20logical_operator">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions">Link to this property</a>
priority: number
Evaluation order: the API evaluates rules with lower numbers first. Must be unique across the flag’s rules.
minimum1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20priority">Link to this property</a>
serve_variation: string
Variation the API serves when this rule matches. Must be a key in <code>variations</code>.
minLength1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20serve_variation">Link to this property</a>
<details>
<summary>
rollout: optional object {percentage, attribute }
</summary>
percentage: number
Percentage of matching traffic (0–100, up to 2 decimal places) served this variation. For multi-way splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
maximum100
minimum0
multipleOf0.01
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20rollout%20%3E%20(property)%20percentage">Link to this property</a>
attribute: optional string
Context attribute used for sticky bucketing. Defaults to <code>targetingKey</code>. If absent at evaluation time, bucketing is random per request.
maxLength64
minLength1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20rollout%20%3E%20(property)%20attribute">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20rollout">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20rules">Link to this property</a>
<details>
<summary>
type: "boolean"or "string"or "number"or "json"
Server-inferred value type shared by all of the flag’s variations.
</summary>
One of the following:
"boolean"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>
"string"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>
"number"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>
"json"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20type%20%3E%20(member)%203">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20type">Link to this property</a>
<details>
<summary>
variations: map[stringor numberor booleanor 2 more]
Map of variation name to value. All values share the same type (boolean, string, number, or JSON object/array), and each serialized value stays within 10KB.
</summary>
One of the following:
string
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>
number
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
boolean
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>
map[unknown]
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations%20%3E%20(items)%20%3E%20(variant)%203">Link to this property</a>
array of unknown
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations%20%3E%20(items)%20%3E%20(variant)%204">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20variations">Link to this property</a>
description: optional string
Optional operator-facing description. It does not affect flag evaluation.
maxLength512
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>
<details>
<summary>
metadata: optional map[booleanor stringor number]
Key-value metadata associated with the flag. Returned only when the flag has metadata.
</summary>
One of the following:
boolean
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20metadata%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>
string
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20metadata%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>
number
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20metadata%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>
</details>
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20metadata">Link to this property</a>
updated_at: optional string
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>
updated_by: optional string
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_get_response%20%3E%20(schema)%20%3E%20(property)%20updated_by">Link to this property</a>
</details>
<details>
<summary>
FlagCreateResponse object {default_variation, enabled, key, 7 more }
</summary>
default_variation: string
Variation the API serves when the flag is off, or when it’s on but no rule matches the context. Must be a key in <code>variations</code>.
minLength1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20default_variation">Link to this property</a>
enabled: boolean
When false, the flag bypasses all rules and always serves <code>default_variation</code>.
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>
key: string
Unique identifier for the flag within an app. Used in all evaluation and SDK calls.
maxLength64
minLength1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>
<details>
<summary>
rules: array of object {conditions, priority, serve_variation, rollout }
Targeting rules evaluated in ascending <code>priority</code>; the first matching rule wins. An empty array means the flag always serves <code>default_variation</code>.
</summary>
<details>
<summary>
conditions: array of object {attribute, operator, value } or object {clauses, logical_operator }
Conditions the context must satisfy for this rule to match. An empty array matches all contexts.
</summary>
One of the following:
<details>
<summary>
FlagshipBaseCondition object {attribute, operator, value }
</summary>
attribute: string
maxLength64
minLength1
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20attribute">Link to this property</a>
<details>
<summary>
operator: "equals"or "not_equals"or "greater_than"or 10 more
</summary>
One of the following:
"equals"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20operator%20%3E%20(member)%200">Link to this property</a>
"not_equals"
<a href="#(resource)%20flagship.apps.flags%20%3E%20(model)%20flag_create_response%20%3E%20(schema)%20%3E%20(property)%20rules%20%3E%20(items)%20%3E%20(property)%20conditions%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20operator%20%3E%20(member)%201">Link to this property</a>
