Skip to content

The project's change requests

GET
/projects/{project}/change-requests
curl --request GET \
--url 'https://example.com/api/v1/projects/example/change-requests?kind=flag_configuration&state=draft&limit=50' \
--header 'Authorization: Bearer <token>'

The project’s change requests, newest first, narrowed by every filter given. Page with cursor set to the next_cursor of the previous page.

project
required
string

The project’s key.

flag
string

Only those naming the flag with this key.

environment
string

Only those naming the environment with this key.

segment
string

Only those naming the segment with this key.

experiment
string

Only those proposing a transition of the experiment with this key.

kind

What a change request proposes: flag_configuration, a flag’s configuration in one environment; definition, a flag’s variations and automatic exposure, or a segment’s conditions and private switch, in every environment; experiment, an experiment’s start, stop with a decision or traffic allocation growth, in every environment holding its rule. A client reads proposed by the kind and the entity named.

string
Allowed values: flag_configuration definition experiment
state

draft (its author prepares it), open (offered for review), approved, rejected, applied, cancelled, superseded (what it was based on moved). The last four are final.

string
Allowed values: draft open approved rejected applied cancelled superseded
author
string format: uuid

Only those authored by the member or the project token with this identifier.

awaiting_my_decision
boolean

When true, only the open change requests the caller may approve or reject: those of others, for a member holding change_request.approve. None for anyone else, a project token included.

scheduled
boolean

When true, only those with an apply time; when false, only those without one.

cursor
string

The next_cursor of the previous page.

limit
integer
default: 50 >= 1 <= 200

How many entries a page holds at most.

One page of change requests.

Media typeapplication/json
object
items
required
Array<object>
object
id
required
string format: uuid
kind
required

What a change request proposes: flag_configuration, a flag’s configuration in one environment; definition, a flag’s variations and automatic exposure, or a segment’s conditions and private switch, in every environment; experiment, an experiment’s start, stop with a decision or traffic allocation growth, in every environment holding its rule. A client reads proposed by the kind and the entity named.

string
Allowed values: flag_configuration definition experiment
flag

The key of the flag proposed for; for an experiment change request, the experiment’s flag.

string
environment

The key of the environment of a flag_configuration change request.

string
segment

The key of the segment of a segment’s definition.

string
experiment

The key of the experiment of an experiment change request.

string
state
required

draft (its author prepares it), open (offered for review), approved, rejected, applied, cancelled, superseded (what it was based on moved). The last four are final.

string
Allowed values: draft open approved rejected applied cancelled superseded
title
required
string
description
required
string
base_version
required

The version of the configuration, the flag, the segment or the experiment the change request is based on.

integer format: int64
revert_to
required

For a revert, the version of the configuration it returns to, from which the server fills proposed; null for any other change request.

integer format: int64
nullable
proposed
required

What the change request proposes, by its kind and the entity it names: a ProposedConfiguration for flag_configuration, a ProposedFlagDefinition for a flag’s definition, a ProposedSegmentDefinition for a segment’s, a ProposedExperimentTransition for experiment.

One of:

A flag configuration as a change request proposes it: what it serves and the notes and descriptions that stay on the server, without who wrote it or when.

object
on
required
boolean
off_variation
required
string
fallthrough
required
string
prerequisites
required
Array<object>
object
flag
required

The key of another flag of the project, not archived.

string
variation
required

One of that flag’s variations.

string
overrides
required
Array<object>
object
unit_type
required
string
unit_id
required
string
variation
required
string
note
required
string
nullable
rules
required
Array<object>
object
id
required

Given by the server to a new rule and kept across writes.

string format: uuid
description
required
string
conditions
required

Every one must hold for the rule to match.

Array<object>

One comparison inside a rule or a segment. An attribute condition names an attribute or unit type, an operator (op) and a value (none for exists, not_exists and is_empty); in_segment and not_in_segment name a segment; prerequisite names a flag and one of its variations. A segment holds attribute conditions only.

object
kind
required

attribute, in_segment, not_in_segment or prerequisite.

string
attribute
string
op
string
value

A string, number, boolean or list, as the operator and the attribute’s type need; null is no value.

nullable
segment
string
flag
string
variation
string
serve
required

What a matching rule serves. variation serves variation; rollout serves variation to percentage of the units of unit_type, in basis points (0 to 10,000), the others continuing to the next rule. A rollout’s salt is given by the server and changes only through regenerating it, so a write omits it or sends it unchanged. experiment serves the experiment experiment of the flag, which assigns units to variations by its own weights; a rule serves a draft or running experiment of its flag (unknown_experiment, experiment_of_another_flag and experiment_not_servable otherwise), and several rules may serve the same one; a rule that served the experiment already keeps serving it whatever its status, so stopping or archiving it never blocks an edit of the other rules. While the experiment is a draft, stopped or archived its rules are left out of the ruleset SDKs receive; while it runs they carry its unit type, salts, traffic allocation and weights.

object
kind
required

variation, rollout or experiment.

string
variation
string
experiment

The key of the experiment served, for kind experiment.

string
unit_type
string
percentage
integer
<= 10000
salt
string
diff
required

The RFC 6902 patch from the entity as the change request is based on it to proposed. For an experiment change request, from the experiment (status, traffic_allocation, decision) and the rules serving it in each environment holding one (rules, by environment key) to what the transition leaves of them, so a stop shows each rule it rewrites or removes.

Array<object>

One operation of an RFC 6902 JSON Patch; value is absent from a remove.

object
op
required
string
Allowed values: add remove replace
path
required

A JSON Pointer into proposed.

string
value

The value added or replaced, of any JSON type, null included.

nullable
author
required

The member or the project token that proposed the change request.

object
kind
required
string
Allowed values: member token
id
required
string format: uuid
name
required

The member’s display name or the token’s name, as it is now.

string
approval
required

Who approved the change request, when and why; null unless it was approved.

object
member
required
object
id
required
string format: uuid
name
required

The member’s display name, as it is now.

string
at
required
string format: date-time
comment
required

What the member said, empty when an approval said nothing.

string
rejection
required

Who rejected the change request, when and why; null unless it was rejected.

object
member
required
object
id
required
string format: uuid
name
required

The member’s display name, as it is now.

string
at
required
string format: date-time
comment
required

What the member said, empty when an approval said nothing.

string
applied_at
required

When the change request was applied; null until it is.

string format: date-time
nullable
applied_by
required

Who applied the change request; null until it is applied.

object
kind
required
string
Allowed values: member token system
id
required

The member’s or the token’s identifier; null for the system.

string format: uuid
nullable
name
required

The member’s display name or the token’s name, as it is now; empty for the system.

string
superseded_by
required

The audit entry of the write that superseded the change request by changing what it was based on: a direct write, an override, the kill switch, a copy, a revert, another change request’s application, archiving or deleting its flag, deleting its environment, a write to a segment a rule of proposed names; for a definition, any write to its flag or segment, and a write to the configuration of its flag or of a flag naming its segment, in any environment; for an experiment, any write to the experiment, its deletion included, and a write to its flag’s configuration in an environment that held its rule when the change request was based on it. Null unless a write superseded it; a change request found superseded only when it was opened, approved or applied names none, as when another environment has started holding the experiment’s rule since.

string format: uuid
nullable
apply_at
required

When the system applies the change request once approved, in UTC; null when it is applied by hand.

string format: date-time
nullable
schedule_failure
required

Why the last scheduled application failed; null when none did.

object
at
required

When the last attempt failed.

string format: date-time
code
required

The code of the refusal, as a manual application would answer it, or internal.

string
message
required
string
attempts
required

The attempts that failed in a row.

integer
>= 1
stopped
required

Whether the system stopped trying, after FLAGNETIC_SCHEDULE_MAX_FAILURES attempts (5 by default). Cancel the change request and copy it to propose it again.

boolean
created_at
required
string format: date-time
updated_at
required
string format: date-time
version
required

Counts the entity’s accepted changes, from 1; send it back in If-Match to change the entity.

integer format: int64
>= 1
next_cursor
required

Pass as cursor for the next page; null on the last.

string
nullable

Example

{
"items": [
{
"kind": "flag_configuration",
"state": "draft",
"proposed": {
"action": "start",
"decision": {
"outcome": "winner"
}
},
"diff": [
{
"op": "add"
}
],
"author": {
"kind": "member"
},
"applied_by": {
"kind": "member"
}
}
]
}

invalid_request: a parameter that is malformed or out of its range, such as a cursor this API did not return.

Media typeapplication/problem+json

A problem document (RFC 9457). Code-specific values are further members.

object
type
required
string
title
required
string
status
required
integer
code
required

Stable snake_case name of the problem, which clients branch on.

string
detail

An English explanation for humans; never what a client branches on.

string
request_id
required
string
retry_after

Seconds to wait before retrying, for a rate limit.

integer
permission

The permission the caller lacks, for forbidden, or the role’s permission the caller lacks, for role_not_allowed.

string
current_version

The version the entity has now, for version_mismatch.

integer format: int64
references

What still names what the write would remove or hide, for in_use.

Array<object>
object
kind
required

What names it, such as flag, segment or experiment.

string
key
required
string
environment
required

The key of the environment it is named in; null when it is named in every environment.

string
nullable
provider

The slug of the auth provider to sign in through instead, for sso_required.

string
used_by

What keeps an auth provider from being deleted, disabled or edited, for provider_in_use, such as identities, enforced domains or only way in (the only enabled provider while local login is disabled).

Array<string>
failure

Why a system the server asked did not answer as needed, for provider_unreachable; for sink_not_ready the failure class of the target’s check, such as connect or status.

string
failure_status

The HTTP status the target answered, for sink_not_ready, when it answered.

integer
failure_code

The target’s own error code, for sink_not_ready, when it speaks one, such as a ClickHouse exception or an S3 error code.

string
errors
Array<object>
object
pointer
required

JSON Pointer into the request body.

string
code
required
string
detail
required
string
params

The values of the rule broken, such as the bounds of a length, for a client to explain the violation in its own language.

object
key
additional properties
any

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"retry_after": 1,
"permission": "example",
"current_version": 1,
"references": [
{
"kind": "example",
"key": "example",
"environment": "example"
}
],
"provider": "example",
"used_by": [
"example"
],
"failure": "example",
"failure_status": 1,
"failure_code": "example",
"errors": [
{
"pointer": "example",
"code": "example",
"detail": "example",
"params": {}
}
]
}

No credential, or one that is not accepted: unauthenticated without a credential (a session cookie the server did not issue counts as none); invalid_token, token_revoked or token_expired for an API token, with a WWW-Authenticate header naming the code; session_expired for a session that has ended, whose cookie is cleared; invalid_credentials for a sign-in.

Media typeapplication/problem+json

A problem document (RFC 9457). Code-specific values are further members.

object
type
required
string
title
required
string
status
required
integer
code
required

Stable snake_case name of the problem, which clients branch on.

string
detail

An English explanation for humans; never what a client branches on.

string
request_id
required
string
retry_after

Seconds to wait before retrying, for a rate limit.

integer
permission

The permission the caller lacks, for forbidden, or the role’s permission the caller lacks, for role_not_allowed.

string
current_version

The version the entity has now, for version_mismatch.

integer format: int64
references

What still names what the write would remove or hide, for in_use.

Array<object>
object
kind
required

What names it, such as flag, segment or experiment.

string
key
required
string
environment
required

The key of the environment it is named in; null when it is named in every environment.

string
nullable
provider

The slug of the auth provider to sign in through instead, for sso_required.

string
used_by

What keeps an auth provider from being deleted, disabled or edited, for provider_in_use, such as identities, enforced domains or only way in (the only enabled provider while local login is disabled).

Array<string>
failure

Why a system the server asked did not answer as needed, for provider_unreachable; for sink_not_ready the failure class of the target’s check, such as connect or status.

string
failure_status

The HTTP status the target answered, for sink_not_ready, when it answered.

integer
failure_code

The target’s own error code, for sink_not_ready, when it speaks one, such as a ClickHouse exception or an S3 error code.

string
errors
Array<object>
object
pointer
required

JSON Pointer into the request body.

string
code
required
string
detail
required
string
params

The values of the rule broken, such as the bounds of a length, for a client to explain the violation in its own language.

object
key
additional properties
any

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"retry_after": 1,
"permission": "example",
"current_version": 1,
"references": [
{
"kind": "example",
"key": "example",
"environment": "example"
}
],
"provider": "example",
"used_by": [
"example"
],
"failure": "example",
"failure_status": 1,
"failure_code": "example",
"errors": [
{
"pointer": "example",
"code": "example",
"detail": "example",
"params": {}
}
]
}
WWW-Authenticate
string

The caller may not perform the operation: forbidden (with the missing permission), session_required, insufficient_scope, cross_origin for a request signed in by the session cookie, a read included, that the browser says comes from another origin, or, for a write, change_request_required when it would change what a protected environment’s SDKs receive; detail names those environments.

Media typeapplication/problem+json

A problem document (RFC 9457). Code-specific values are further members.

object
type
required
string
title
required
string
status
required
integer
code
required

Stable snake_case name of the problem, which clients branch on.

string
detail

An English explanation for humans; never what a client branches on.

string
request_id
required
string
retry_after

Seconds to wait before retrying, for a rate limit.

integer
permission

The permission the caller lacks, for forbidden, or the role’s permission the caller lacks, for role_not_allowed.

string
current_version

The version the entity has now, for version_mismatch.

integer format: int64
references

What still names what the write would remove or hide, for in_use.

Array<object>
object
kind
required

What names it, such as flag, segment or experiment.

string
key
required
string
environment
required

The key of the environment it is named in; null when it is named in every environment.

string
nullable
provider

The slug of the auth provider to sign in through instead, for sso_required.

string
used_by

What keeps an auth provider from being deleted, disabled or edited, for provider_in_use, such as identities, enforced domains or only way in (the only enabled provider while local login is disabled).

Array<string>
failure

Why a system the server asked did not answer as needed, for provider_unreachable; for sink_not_ready the failure class of the target’s check, such as connect or status.

string
failure_status

The HTTP status the target answered, for sink_not_ready, when it answered.

integer
failure_code

The target’s own error code, for sink_not_ready, when it speaks one, such as a ClickHouse exception or an S3 error code.

string
errors
Array<object>
object
pointer
required

JSON Pointer into the request body.

string
code
required
string
detail
required
string
params

The values of the rule broken, such as the bounds of a length, for a client to explain the violation in its own language.

object
key
additional properties
any

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"retry_after": 1,
"permission": "example",
"current_version": 1,
"references": [
{
"kind": "example",
"key": "example",
"environment": "example"
}
],
"provider": "example",
"used_by": [
"example"
],
"failure": "example",
"failure_status": 1,
"failure_code": "example",
"errors": [
{
"pointer": "example",
"code": "example",
"detail": "example",
"params": {}
}
]
}

not_found: no such project, or nothing under that identifier in it. An unknown project is answered before any permission is judged.

Media typeapplication/problem+json

A problem document (RFC 9457). Code-specific values are further members.

object
type
required
string
title
required
string
status
required
integer
code
required

Stable snake_case name of the problem, which clients branch on.

string
detail

An English explanation for humans; never what a client branches on.

string
request_id
required
string
retry_after

Seconds to wait before retrying, for a rate limit.

integer
permission

The permission the caller lacks, for forbidden, or the role’s permission the caller lacks, for role_not_allowed.

string
current_version

The version the entity has now, for version_mismatch.

integer format: int64
references

What still names what the write would remove or hide, for in_use.

Array<object>
object
kind
required

What names it, such as flag, segment or experiment.

string
key
required
string
environment
required

The key of the environment it is named in; null when it is named in every environment.

string
nullable
provider

The slug of the auth provider to sign in through instead, for sso_required.

string
used_by

What keeps an auth provider from being deleted, disabled or edited, for provider_in_use, such as identities, enforced domains or only way in (the only enabled provider while local login is disabled).

Array<string>
failure

Why a system the server asked did not answer as needed, for provider_unreachable; for sink_not_ready the failure class of the target’s check, such as connect or status.

string
failure_status

The HTTP status the target answered, for sink_not_ready, when it answered.

integer
failure_code

The target’s own error code, for sink_not_ready, when it speaks one, such as a ClickHouse exception or an S3 error code.

string
errors
Array<object>
object
pointer
required

JSON Pointer into the request body.

string
code
required
string
detail
required
string
params

The values of the rule broken, such as the bounds of a length, for a client to explain the violation in its own language.

object
key
additional properties
any

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"retry_after": 1,
"permission": "example",
"current_version": 1,
"references": [
{
"kind": "example",
"key": "example",
"environment": "example"
}
],
"provider": "example",
"used_by": [
"example"
],
"failure": "example",
"failure_status": 1,
"failure_code": "example",
"errors": [
{
"pointer": "example",
"code": "example",
"detail": "example",
"params": {}
}
]
}