# flags-api ## Pages - [Feature Flags API](https://docs.ezghcloud.com/flags-api/index.md) — Manage EZGH Feature Flags: flags and their variations, per-environment targeting with version history, environments, segments and SDK keys. Every path is under an organization and a project; lists of flags, segments and config versions are paged with limit, cursor and nextCursor. Evaluation is on the data plane, https://flags.ezghcloud.com, through OpenFeature (OFREP), not this API. - [Archive a flag](https://docs.ezghcloud.com/flags-api/ArchiveFlag/index.md) — Removes it from every environment's snapshot, so SDKs answer their default value. Its configs and history are kept. - [Create an environment](https://docs.ezghcloud.com/flags-api/CreateEnvironment/index.md) — The environment gets an off config for every flag. 409 when the project has an environment with this key. - [Create a flag](https://docs.ezghcloud.com/flags-api/CreateFlag/index.md) — The flag gets an off config in every environment, serving its first variation (false for a boolean flag). 409 when the project has a flag with this key. - [Create an SDK key](https://docs.ezghcloud.com/flags-api/CreateSdkKey/index.md) — The answer holds the key, once. A replay (the same Idempotency-Key) answers the metadata with key null: a lost key is revoked and replaced. - [Create a segment](https://docs.ezghcloud.com/flags-api/CreateSegment/index.md) — 409 when the project has a segment with this key. - [Delete an environment](https://docs.ezghcloud.com/flags-api/DeleteEnvironment/index.md) — Revokes its SDK keys and deletes its configs and history. - [Delete an archived flag](https://docs.ezghcloud.com/flags-api/DeleteFlag/index.md) — With its configs and history. Only an archived flag can be deleted (409 otherwise). - [Delete a segment](https://docs.ezghcloud.com/flags-api/DeleteSegment/index.md) — 409 segment_in_use when an environment's config of any flag references it. - [Export an environment's compiled flags](https://docs.ezghcloud.com/flags-api/ExportEnvironment/index.md) — The environment's current server snapshot in flagd's flag-definition format: for ezgh flags export, a provider's bootstrap file, offline tests, or running flagd yourself. 503 snapshot_pending, with Retry-After: 1, until the environment's first compile (moments after its creation). - [Get an environment](https://docs.ezghcloud.com/flags-api/GetEnvironment/index.md) - [Get a flag](https://docs.ezghcloud.com/flags-api/GetFlag/index.md) - [Get a flag's targeting in an environment](https://docs.ezghcloud.com/flags-api/GetFlagConfig/index.md) — Checked on the environment with the flag's key as the path (…:fen_<12>/). - [Get one version of a config](https://docs.ezghcloud.com/flags-api/GetFlagConfigVersion/index.md) - [Get an SDK key's metadata](https://docs.ezghcloud.com/flags-api/GetSdkKey/index.md) - [Get a segment](https://docs.ezghcloud.com/flags-api/GetSegment/index.md) - [List a project's environments, in their order](https://docs.ezghcloud.com/flags-api/ListEnvironments/index.md) — Every environment of the project, in one answer: a project has at most a few dozen, so the list isn't paged and nextCursor is always null. - [List a config's versions, newest first](https://docs.ezghcloud.com/flags-api/ListFlagConfigVersions/index.md) - [List a project's flags, newest first](https://docs.ezghcloud.com/flags-api/ListFlags/index.md) - [List an environment's SDK keys](https://docs.ezghcloud.com/flags-api/ListSdkKeys/index.md) — Their metadata, revoked keys included, newest first; never a key itself. Every key of the environment, in one answer: the list isn't paged and nextCursor is always null. - [List a project's segments, newest first](https://docs.ezghcloud.com/flags-api/ListSegments/index.md) - [Restore a config version](https://docs.ezghcloud.com/flags-api/RestoreFlagConfigVersion/index.md) — Writes a new version with the old version's content. 409 when that content names a variation or segment that no longer exists. - [Revoke an SDK key](https://docs.ezghcloud.com/flags-api/RevokeSdkKey/index.md) — The data plane refuses it within a second, and ends its open streams. Revoking a revoked key changes nothing. - [Unarchive a flag](https://docs.ezghcloud.com/flags-api/UnarchiveFlag/index.md) - [Change an environment](https://docs.ezghcloud.com/flags-api/UpdateEnvironment/index.md) — Every field is optional, and only the ones given change. - [Change a flag's name, description, tags, variations or client-side availability](https://docs.ezghcloud.com/flags-api/UpdateFlag/index.md) — Every field is optional, and only the ones given change. A boolean flag's variations can't change. 409 variation_in_use when a removed variation is served by an environment's config. - [Replace a flag's targeting in an environment](https://docs.ezghcloud.com/flags-api/UpdateFlagConfig/index.md) — A whole-config write; the console always sends If-Match with the config's ETag. 400 for an unknown variation or segment, or when a comment is required and missing; 400 snapshot_too_large when the environment's compiled snapshot would exceed 8 MB. - [Change a segment](https://docs.ezghcloud.com/flags-api/UpdateSegment/index.md) — Every field is optional, and only the ones given change. 400 snapshot_too_large when an environment's compiled snapshot would exceed 8 MB. - [Actor](https://docs.ezghcloud.com/flags-api/schemas/Actor/index.md) - [Clause](https://docs.ezghcloud.com/flags-api/schemas/Clause/index.md) - [Config](https://docs.ezghcloud.com/flags-api/schemas/Config/index.md) - [ConfigBody](https://docs.ezghcloud.com/flags-api/schemas/ConfigBody/index.md) — A flag's targeting in one environment, as the history keeps it. - [ConfigRestore](https://docs.ezghcloud.com/flags-api/schemas/ConfigRestore/index.md) - [ConfigUpdate](https://docs.ezghcloud.com/flags-api/schemas/ConfigUpdate/index.md) - [ConfigVersion](https://docs.ezghcloud.com/flags-api/schemas/ConfigVersion/index.md) - [ConfigVersionList](https://docs.ezghcloud.com/flags-api/schemas/ConfigVersionList/index.md) - [Environment](https://docs.ezghcloud.com/flags-api/schemas/Environment/index.md) - [EnvironmentCreate](https://docs.ezghcloud.com/flags-api/schemas/EnvironmentCreate/index.md) - [EnvironmentList](https://docs.ezghcloud.com/flags-api/schemas/EnvironmentList/index.md) - [EnvironmentUpdate](https://docs.ezghcloud.com/flags-api/schemas/EnvironmentUpdate/index.md) - [Error](https://docs.ezghcloud.com/flags-api/schemas/Error/index.md) — Every non-2xx answer. Clients branch on code, never on message. - [Flag](https://docs.ezghcloud.com/flags-api/schemas/Flag/index.md) - [FlagCreate](https://docs.ezghcloud.com/flags-api/schemas/FlagCreate/index.md) - [FlagEnvironment](https://docs.ezghcloud.com/flags-api/schemas/FlagEnvironment/index.md) — A flag's state in one environment. access is answered by GET of one flag, not by the list. - [FlagList](https://docs.ezghcloud.com/flags-api/schemas/FlagList/index.md) - [FlagType](https://docs.ezghcloud.com/flags-api/schemas/FlagType/index.md) - [FlagUpdate](https://docs.ezghcloud.com/flags-api/schemas/FlagUpdate/index.md) - [Key](https://docs.ezghcloud.com/flags-api/schemas/Key/index.md) — Lowercase letters, digits, _ and -, starting with a letter or digit; at most 64 characters. Immutable. - [Operator](https://docs.ezghcloud.com/flags-api/schemas/Operator/index.md) - [QuotaExceeded](https://docs.ezghcloud.com/flags-api/schemas/QuotaExceeded/index.md) — quota_exceeded: the quota that refused the request. Never with Retry-After. - [Rollout](https://docs.ezghcloud.com/flags-api/schemas/Rollout/index.md) - [Rule](https://docs.ezghcloud.com/flags-api/schemas/Rule/index.md) - [SdkKey](https://docs.ezghcloud.com/flags-api/schemas/SdkKey/index.md) - [SdkKeyCreate](https://docs.ezghcloud.com/flags-api/schemas/SdkKeyCreate/index.md) - [SdkKeyCreated](https://docs.ezghcloud.com/flags-api/schemas/SdkKeyCreated/index.md) - [SdkKeyKind](https://docs.ezghcloud.com/flags-api/schemas/SdkKeyKind/index.md) — server: secret, for backends; client: publishable, for web frontends (clientSide flags only). - [SdkKeyList](https://docs.ezghcloud.com/flags-api/schemas/SdkKeyList/index.md) - [Segment](https://docs.ezghcloud.com/flags-api/schemas/Segment/index.md) - [SegmentCreate](https://docs.ezghcloud.com/flags-api/schemas/SegmentCreate/index.md) - [SegmentList](https://docs.ezghcloud.com/flags-api/schemas/SegmentList/index.md) - [SegmentRule](https://docs.ezghcloud.com/flags-api/schemas/SegmentRule/index.md) - [SegmentUpdate](https://docs.ezghcloud.com/flags-api/schemas/SegmentUpdate/index.md) - [Serve](https://docs.ezghcloud.com/flags-api/schemas/Serve/index.md) — Exactly one of variation and rollout. - [Snapshot](https://docs.ezghcloud.com/flags-api/schemas/Snapshot/index.md) — A flagd flag-definition document (https://flagd.dev/schema/v0/flags.json): $schema, metadata, $evaluators and flags. - [Target](https://docs.ezghcloud.com/flags-api/schemas/Target/index.md) - [Variation](https://docs.ezghcloud.com/flags-api/schemas/Variation/index.md) - [VariationInput](https://docs.ezghcloud.com/flags-api/schemas/VariationInput/index.md) - [Weight](https://docs.ezghcloud.com/flags-api/schemas/Weight/index.md)