Skip to content

Download the project's configuration as a project document

GET
/projects/{project}/export
curl --request GET \
--url 'https://example.com/api/v1/projects/example/export?format=json' \
--header 'Authorization: Bearer <token>'

Writes the project’s whole configuration as a project document, in JSON (the default, and the canonical encoding) or YAML (derived from it field for field): its environments in their order, unit types, declared attributes, segments, flags with their configuration in every environment, and experiments. A list whose order means something keeps it (a configuration’s rules, a flag’s variations, an experiment’s weights, tags); every other list and map is by key, overrides by unit type then unit identifier and prerequisites by flag, so that two exports of an unchanged project are the same bytes. Rule identifiers and rollout salts are in it, which keep every unit in its bucket in a copy; owners are email addresses, written only for an owner who holds a grant in the project and empty for any other, and an override’s note is in it and its author is not.

Members, grants, tokens, SDK keys, webhook subscriptions, change requests, audit entries, events, the standard attributes and the discovered attributes are never in it.

The ETag is an opaque tag of the project’s history, quoted: a later change to the project, whatever it touches, moves it. Reading the project is all it takes, so nothing is audited.

project
required
string

The project’s key.

format
string
default: json
Allowed values: json yaml

The document’s encoding, JSON unless yaml is asked for.

The project document, as an attachment named {project key}-{UTC time, yyyymmddThhmmssZ}.{json|yaml}.

A project’s whole configuration, versioned apart from this API: it has its own schema_version, a server imports every version it ever exported, and within a version a document changes only additively (a new optional field or section). A field it does not define is refused naming its JSON Pointer. Identity is the key: no entity identifier travels, except rule ids and rollout salts.

object
schema_version
required
integer
Allowed values: 1
project
required
object
key
required
string
name
required
string
description
string
environments
required

In their sort order, which the array’s order is.

Array<object>
object
key
required
string
name
required
string
protected
required
boolean
unit_types
required

By key.

Array<object>
object
key
required
string
name
required
string
description
string
attributes
required

By key. The standard attributes are never listed.

Array<object>
object
key
required
string
type
required
string
Allowed values: string number boolean semver date list
name
required
string
description
string
segments
required

By key.

Array<object>
object
key
required
string
name
required
string
description
string
private
required
boolean
conditions
required
Array<object>

One comparison inside a rule or a segment. An attribute condition names an attribute, 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.

object
kind
required
string
attribute
string
op
string
value

A string, number, boolean or list, as the operator needs.

nullable
segment
string
flag
string
variation
string
flags
required

By key.

Array<object>
object
key
required
string
type
required

boolean, string, number or json; never changes.

string
name
required
string
description
string
owner

The email address of the flag’s owner.

string
tags
Array<string>
lifetime
required

temporary or permanent.

string
expected_removal_at

When a temporary flag is expected to be removed; null for a permanent one.

string format: date-time
nullable
automatic_exposure
boolean
archived
boolean
variations
required

In the order the flag lists them, the first being the default of a flag that is not boolean.

Array<object>
object
key
required
string
value
required

JSON of the flag’s type.

name
string
description
string
configurations
required

The flag’s configuration in each environment, keyed by environment key.

object
key
additional properties
object
on
required
boolean
off_variation
required
string
fallthrough
required
string
prerequisites

By flag.

Array<object>
object
flag
required
string
variation
required
string
overrides

By unit type, then unit ID.

Array<object>
object
unit_type
required
string
unit_id
required
string
variation
required
string
note

Why the unit has a fixed variation. Who set it does not travel.

string
rules
required

In the order they are checked.

Array<object>
object
id

Kept across instances so that an SDK’s rule id stays stable; minted on import when absent.

string format: uuid
description
string
conditions
required
Array<object>

One comparison inside a rule or a segment. An attribute condition names an attribute, 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.

object
kind
required
string
attribute
string
op
string
value

A string, number, boolean or list, as the operator needs.

nullable
segment
string
flag
string
variation
string
serve
required

What a matching rule serves. variation serves variation; rollout serves variation to percentage (basis points, 0 to 10,000) of the units of unit_type, bucketed by salt; experiment serves the experiment experiment of the flag.

object
kind
required

variation, rollout or experiment.

string
variation
string
experiment
string
unit_type
string
percentage
integer
salt

A rollout’s salt, 16 lower-case letters and digits; it decides which units fall in the share, so it travels. Minted on import when absent.

string
experiments
required

By key, whatever their status.

Array<object>
object
key
required
string
name
required
string
hypothesis
string
owner

The email address of the experiment’s owner.

string
tags
Array<string>
flag
required

The key of the flag whose variations are compared.

string
unit_type
required
string
variations
required

In the order that fixes the cumulative bucket ranges.

Array<object>
object
variation
required
string
weight
required

The share of the allocated traffic, in basis points.

integer
traffic_allocation
required

The share of units included, in basis points.

integer
inclusion_salt
string
variation_salt
string
status
required

draft, running, stopped or archived.

string
expected_end_at
string format: date
nullable
started_at
string format: date-time
nullable
stopped_at
string format: date-time
nullable
archived_at
string format: date-time
nullable
decision
object
outcome
required

winner or removed.

string
winner_variation
string
note
string

Example

{
"schema_version": 1,
"attributes": [
{
"type": "string"
}
]
}
ETag
string

An opaque tag of the project’s history, quoted.

Content-Disposition
string

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": {}
}
]
}