Get flag changelog
client.flagship.apps.flags.changelog.list(stringappId, stringflagKey, ChangelogListParams { account_id, cursor, limit } params, RequestOptionsoptions?): CursorPaginationAfter<ChangelogListResponse>
GET/accounts/{account_id}/flagship/apps/{app_id}/flags/{flag_key}/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.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get flag changelog
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const changelogListResponse of client.flagship.apps.flags.changelog.list(
'app_id',
'flag_key',
{ account_id: 'account_id' },
)) {
console.log(changelogListResponse);
}{
"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
}