Get flag changelog
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; update entries include a field-level diff. Capped at 200 entries per flag.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
Flagship ReadPath ParametersExpand Collapse
Query ParametersExpand Collapse
ReturnsExpand Collapse
result: array of object { after, event, flag_key } or object { after, event, flag_key } or object { after, diff, event, flag_key }
object { after, event, flag_key }
after: object { default_variation, enabled, key, 6 more }
Variation served when no rule matches or the flag is disabled. Must be a key in variations.
Unique identifier for the flag within an app. Used in all evaluation and SDK calls.
rules: array of object { conditions, priority, serve_variation, rollout } Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
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.
Conditions the context must satisfy for this rule to match. An empty array matches all contexts.
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
Evaluation order; lower numbers are evaluated first. Must be unique across the flag’s rules.
Variation served when this rule matches. Must be a key in variations.
variations: map[string or number or boolean or 2 more]Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
object { after, event, flag_key }
after: object { default_variation, enabled, key, 6 more }
Variation served when no rule matches or the flag is disabled. Must be a key in variations.
Unique identifier for the flag within an app. Used in all evaluation and SDK calls.
rules: array of object { conditions, priority, serve_variation, rollout } Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
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.
Conditions the context must satisfy for this rule to match. An empty array matches all contexts.
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
Evaluation order; lower numbers are evaluated first. Must be unique across the flag’s rules.
Variation served when this rule matches. Must be a key in variations.
variations: map[string or number or boolean or 2 more]Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
object { after, diff, event, flag_key }
after: object { default_variation, enabled, key, 6 more }
Variation served when no rule matches or the flag is disabled. Must be a key in variations.
Unique identifier for the flag within an app. Used in all evaluation and SDK calls.
rules: array of object { conditions, priority, serve_variation, rollout } Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
Targeting rules evaluated in ascending priority; the first matching rule wins. An empty array means the flag always serves default_variation.
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.
Conditions the context must satisfy for this rule to match. An empty array matches all contexts.
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
object { clauses, logical_operator }
clauses: array of object { attribute, operator, value } or object { clauses, logical_operator }
object { attribute, operator, value }
Evaluation order; lower numbers are evaluated first. Must be unique across the flag’s rules.
Variation served when this rule matches. Must be a key in variations.
variations: map[string or number or boolean or 2 more]Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
Map of variation name to value. All values must be the same type (boolean, string, number, or JSON object/array). Each serialized value must be 10KB or smaller.
Get flag changelog
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/flagship/apps/$APP_ID/flags/$FLAG_KEY/changelog \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "message"
}
],
"result": [
{
"after": {
"default_variation": "x",
"enabled": true,
"key": "x",
"rules": [
{
"conditions": [
{
"attribute": "x",
"operator": "equals",
"value": {}
}
],
"priority": 1,
"serve_variation": "x",
"rollout": {
"percentage": 0,
"attribute": "x"
}
}
],
"variations": {
"foo": "string"
},
"description": "description",
"type": "boolean",
"updated_at": "updated_at",
"updated_by": "updated_by"
},
"event": "create",
"flag_key": "flag_key"
}
],
"result_info": {
"count": 0,
"cursor": "cursor"
},
"success": true
}Returns Examples
{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "message"
}
],
"result": [
{
"after": {
"default_variation": "x",
"enabled": true,
"key": "x",
"rules": [
{
"conditions": [
{
"attribute": "x",
"operator": "equals",
"value": {}
}
],
"priority": 1,
"serve_variation": "x",
"rollout": {
"percentage": 0,
"attribute": "x"
}
}
],
"variations": {
"foo": "string"
},
"description": "description",
"type": "boolean",
"updated_at": "updated_at",
"updated_by": "updated_by"
},
"event": "create",
"flag_key": "flag_key"
}
],
"result_info": {
"count": 0,
"cursor": "cursor"
},
"success": true
}