Skip to content

API stability and the OpenAPI snapshots

The v1 API is a contract. Two checked-in OpenAPI documents pin it, and a smoke test fails the build when a route that is part of the contract changes shape.

File What it is Generated by
docs/api/openapi-v1.stable.json The core API: every route a build with modules/ deleted serves, with components. python -m backend.scripts.dump_openapi --profile core --full …
docs/api/openapi-v1.full.json The full API: the core routes plus the ones the modules registration mounts. python -m backend.scripts.dump_openapi --profile full --full …
frontend/src/tests/fixtures/openapi.json Paths and methods only, for the dashboard's URL-literal guard (frontend/src/tests/services/url-literals.test.ts). A full dump: the guard subtracts openapi.module-paths.json from it for a core run, so a core dump here would make it subtract them twice. python -m backend.scripts.dump_openapi --profile full …

make openapi regenerates all three. --profile core hides the modules package from the import system before the application is imported, so the core document can be produced from a full checkout; it is byte-identical to the document a tree with modules/ deleted produces (scripts/core_build.sh checks that tree the long way round). --profile full requires the modules registration to load and fails otherwise.

The rule

backend/tests/smoke/test_openapi_snapshot.py regenerates the live documents in a fresh interpreter and compares them with the snapshots:

  • A path/method in the snapshot that is stable must still exist, and its operation object — parameters, request body, responses, and every component schema those reference, transitively — must be identical. Any difference fails the smoke suite.
  • A path/method marked beta may change or disappear: the test warns instead.
  • A path/method that exists but is not in the snapshot yet is a warning too: run make openapi, commit the result, and decide whether it is beta.
  • openapi-v1.full.json must be a superset of openapi-v1.stable.json, and the module-only paths must be exactly the list in frontend/src/tests/fixtures/openapi.module-paths.json, so the three fixtures cannot drift apart. That fixture is maintained by hand.

Every route is stable by default. Stability is a promise about the shape of the route — its URL, parameters, request and response schemas — not about its behaviour.

Marking a route beta

Stability is declared on the route, in the OpenAPI document itself, with the x-stability extension, so the snapshot carries it and the test can read it without a side table:

@router.post(
    "/experiments/{experiment_id}/something-new",
    response_model=SomethingNewResponse,
    openapi_extra={"x-stability": "beta"},
)
def something_new(...):
    ...

openapi_extra is merged into the operation object by FastAPI, so the snapshot shows "x-stability": "beta" on that method. Only the value beta means anything; leave the key off a stable route. Promoting a route is deleting the line and regenerating the snapshots.

Use beta for a route whose request or response is still being shaped by real use — a new analysis endpoint, a first cut of a bulk operation — and take it off once a released SDK or the dashboard depends on it.

x-stability and analysis_status are different promises

x-stability is about the shape of a route. An analysis response's analysis_status field (ga or beta, with an analysis_notice exactly when it is beta) is about its numbers: beta there means part of the analysis is not yet computed as its fields describe, and the notice says which part and links the issue. The values come from one table, backend/app/core/analysis_status.py. A route whose numbers are beta is also marked x-stability: beta (the interaction-pair route, #219), because fixing the numbers will change its response. The CUPED route's numbers are ga (#217), and the route stays x-stability: beta while its response is still being shaped (mean metrics, #439); /interactions/scan stays stable, and its items keep their shape with the interaction, novelty and SUTVA sub-results null: the scan reports overlap only, and novelty and SUTVA are not offered. GET /api/v1/holdout/{holdout_id}/results is beta in both senses (#445): its numbers carry analysis_status: "beta" and the route is x-stability: beta. POST /api/v1/results/{id}/post-stratification is beta as well (#443), and is in neither API document (#963): it answers 501 for every existing experiment, 404 for an unknown one and 422 for a malformed body, rather than report numbers that do not come from an experiment's own assignments and events. GET /api/v1/results/{id}/balanced-groups is beta too (#448): it answers for an experiment that balances its split within groups, and its response may still change. GET /api/v1/results/{id}/segments/{segment_id} is beta too (#1933): it answers for one ID-list segment's members, and its response may still change. POST /api/v1/admin/app-users/erase is beta too (#2042): it erases one app user's data for a superuser, and its response may still change (Erase one app user's data). POST /api/v1/experiments/{experiment_id}/unarchive is beta too (#2278): it brings an archived experiment that has ended back to completed, and its response may still change (Unarchive Experiment).

Changing a stable route

Do not. Add a new route (mark it beta while it settles) or bump the API version. If a change to a stable route is unavoidable — a security fix that has to remove a field, say — regenerate the snapshots with make openapi, and say in the pull request which stable operations changed and why; the smoke test's failure message lists them by method and path, with the first differing keys.

Stable operations changed this way:

Operations Changed by What changed
POST /api/v1/feature-flags/, GET /api/v1/feature-flags/, GET/PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/feature-flags/{flag_id}/activate, POST /api/v1/feature-flags/{flag_id}/deactivate #94 The request schemas refuse unknown fields and explicit nulls, a new flag is off unless is_active: true is sent, and default_value accepts only false. Every one of these operations answers with one documented flag schema, FeatureFlagRead, which names targeting targeting_rules and no longer carries rules, variants, metrics or last_evaluated. See Creating Feature Flags.
POST /api/v1/safety/feature-flags/{feature_flag_id}/config, POST /api/v1/safety/feature-flags/{feature_flag_id}/rollback #629 The config request's rollback_percentage and the rollback's percentage query parameter accept 0–100; any other value answers 422. A value stored before the change still reads back unchanged, and the safety monitor clamps it to 0–100 when it rolls the flag back. See Safety Monitoring.
POST /api/v1/segments, PUT /api/v1/segments/{segment_id}, POST /api/v1/segments/{segment_id}/preview, POST /api/v1/segments/{segment_id}/evaluate, GET/DELETE /api/v1/segments/{segment_id}, GET /api/v1/segments/{segment_id}/experiments, POST /api/v1/segments/bulk-evaluate #440 Segment rules must be in the targeting rule format that flags and experiments use ({"logical_operator", "groups": [{"conditions": [...]}]}, operators such as equals), with at least one group and at most 20 groups, 50 conditions, 10 regex conditions and 1,000 list values; the old {"operator", "conditions"} format and anything else answer 422 on create, update and preview. Evaluate answers 409 for a segment stored in the old format, and bulk-evaluate answers false for it; stored segments are left as they are. {segment_id} is a UUID, and other text answers 422. See Upgrading: segment rules.
POST /api/v1/segments, GET /api/v1/segments, GET/PUT /api/v1/segments/{segment_id}, POST /api/v1/segments/{segment_id}/evaluate, POST /api/v1/segments/bulk-evaluate, POST /api/v1/segments/{segment_id}/preview #440 (id lists) A segment has a kind, rules (the default) or id_list, set on create and never changed. rules is optional on create: required for a rules segment and refused for an id list (422), so a create that leaves kind out still needs rules as before. Every segment in a response carries kind; an id list's rules is null, and GET /api/v1/segments/{segment_id} fills member_count for it. A PUT that sends kind, or rules for an id list, answers 422. Evaluate and bulk-evaluate answer an id list on user_context.user_id. Preview takes the same body and answers 422 when it has no rules. Segments stored before the upgrade are rules segments. The member routes POST /api/v1/segments/{segment_id}/members and /members/remove are new and beta. See Segments made from a list of user IDs.
DELETE /api/v1/segments/{segment_id}, PUT /api/v1/segments/{segment_id}, POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/clone #440 (segment targeting) Targeting rules accept in_segment and not_in_segment (attribute segment, the value a segment id), at most 10 segments per ruleset. Flag and experiment create and update answer 422 at ["body", "targeting_rules"] for a segment that is unknown, inactive or archived, or whose rules are not valid, and for a segment condition in a native default_rule; clone answers 409 when the rules it would copy name such a segment. Archiving a segment, or a PUT that sets its status to inactive or archived, answers 409 with {"detail": {"code": "segment_in_use", "message", "feature_flags", "experiments"}} while a flag that is not archived or a draft, active or paused experiment uses it. See Targeting Rules.
POST /api/v1/tracking/track, POST /api/v1/tracking/batch #217 experiment_key and feature_flag_key are both optional. An event with neither (missing, null or "") is stored with experiment_id, feature_flag_id and variant_id null, where it used to answer 422 (and one such entry failed a whole batch with 422). Such an event is history and counts in no experiment's results; tag outcome events. A key that is given and not found still answers 404, or is reported in the batch's errors; the detail names only the keys that were sent. The OpenAPI document does not change. See Track Event.
GET /api/v1/interactions/scan #853 When reading the active experiments or their assignments fails, the scan answers 500 with a fixed message and the request ID. It used to answer 200 as if nothing were running: total_active_experiments: 0, or the pairs whose assignments could not be read left out. A scan whose reads succeed answers as before. The OpenAPI document does not change.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/export/experiments, GET /api/v1/export/reports/experiments/{experiment_id} #880 When the sample-ratio check fails (srm is present and srm.warning is true), summary.recommendation is INCONCLUSIVE, whatever it would otherwise be, CONTINUE_TESTING included, and recommendation_reason names the mismatch and its p-value; the export's recommendation column says the same. has_winner, winning_variant_id, the Bayesian decision and the sequential results are unchanged. When srm is null (a bandit, fewer than two variants, no assignments, or a check that could not run) the recommendation is unchanged. The OpenAPI document does not change.
DELETE /api/v1/feature-flags/{flag_id} #855 Deleting a flag keeps the events tagged with it: they stay, with feature_flag_id null and every other field unchanged, an experiment tag included. They used to be deleted with the flag. Everything else the delete removes is unchanged, and the response is still 204. The OpenAPI document changes only in the operation's description.
GET /api/v1/holdout/all, POST /api/v1/holdout, PUT /api/v1/holdout/{holdout_id}, DELETE /api/v1/mutual-exclusion-groups/{group_id}, PUT /api/v1/mutual-exclusion-groups/{group_id} #904 These operations accept the roles their documentation states. Listing, creating and updating holdouts and archiving a group with DELETE need ADMIN or a superuser; a DEVELOPER now answers 403 on them. Changing a group's status with PUT (archiving or unarchiving) needs ADMIN too, as archiving does; a DEVELOPER may still change a group's name, description and traffic allocation, and may send its current status back. ADMIN and superusers are unchanged. The OpenAPI document changes only in the description of PUT /api/v1/mutual-exclusion-groups/{group_id}. See Mutual Exclusion Groups & Global Holdout.
GET /api/v1/results/{experiment_id}/sequential #854 The confidence sequence and can_stop use the Agresti-Caffo variance of the difference in rates instead of the plug-in one, so the interval keeps its coverage when the arms are split unequally. Some experiments that showed can_stop: true and recommended_action: "stop_for_effect" (mostly with one small, low-rate arm) now show false and "continue", a few at equal splits stop slightly later, and a very few, mostly with rates near 50%, stop slightly earlier; an arm in which every user has the same outcome now gets a finite interval instead of [-1, 1]. lambda_ratio is capped at the largest finite double (about 1.8e308), so an overwhelming difference reports a finite number and can stop. The response's fields are unchanged and analysis_status stays beta. The engine version becomes 1.4.0; the OpenAPI document changes only in the engine_version default of the responses that carry it (bandit, Bayesian, variance reduction). See Sequential Testing.
POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch #822 Experiment targeting treats a missing attribute as flags do. A new user whose context lacks an attribute is no longer refused outright (assigned: false, reason: "targeting"): they fail only the conditions on that attribute, and is_null on it passes. So a user who matches one OR branch is enrolled even when they lack an attribute used only in another branch, and a user without an attribute now matches a NOT group on it (a user with no country matches NOT (country equals US), but still not country not_equals US). AND still needs every condition to hold. Users already assigned keep their assignment. The OpenAPI document does not change. See Targeting Rules.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results #922 When the experiment has sequential testing on, sequential_testing carries the analysis GET /api/v1/results/{experiment_id}/sequential serves at the experiment's stored alpha (the primary metric, the control against the first treatment); it used to be null always. It stays null when sequential testing is off, and is null when the analysis could not be computed (the API logs a warning); the rest of the response is unaffected. It is cached with the results, so an answer cached before the upgrade keeps null until it expires (5 minutes for a running experiment, 24 hours otherwise) or POST /api/v1/results/{experiment_id}/invalidate-cache clears it. For the same reason a change to sequential_testing_enabled or sequential_testing_config, which can be made only while the experiment is a draft (#848), shows on these routes when the cached answer expires or is cleared, not immediately. The OpenAPI document does not change. See Sequential Testing.
GET /api/v1/results/{experiment_id}/sequential, GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results #929 The sequential analysis compares the control against the treatment created first (created_at, then id), on every call. It used to take the treatment the database returned first, which on an experiment with three or more variants could change between two calls with no change to the data, so the analysis could switch arms. Two-variant experiments are unchanged, and so are the numbers for a given pair of arms. The results routes' cache is not keyed on the arm, so an answer cached before the upgrade is served until it expires (5 minutes for a running experiment, 24 hours otherwise) or POST /api/v1/results/{experiment_id}/invalidate-cache clears it. The OpenAPI document does not change. See Sequential Testing.
GET /api/v1/experiments/, POST /api/v1/experiments/, GET/PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/start, POST /api/v1/experiments/{experiment_id}/pause, PUT /api/v1/experiments/{experiment_id}/schedule, POST /api/v1/experiments/{experiment_id}/complete, POST /api/v1/experiments/{experiment_id}/archive, POST /api/v1/experiments/{experiment_id}/clone #935 An experiment whose creator's account was removed still reads and lists, with owner_id: null; every one of these operations answers with the same ExperimentResponse, whose owner_id is now nullable and no longer required. An experiment whose creator still exists answers as before, with the creator's id. The dashboard shows such an experiment's owner as "No owner". The OpenAPI document changes only in ExperimentResponse: owner_id becomes nullable and leaves the schema's required list.
GET /api/v1/experiments/{experiment_id} #921 The response carries owner_name, the name of the user who created the experiment: their full name, else their username when it contains no @, else null. It is never their email, and it is null for an experiment with no owner (owner_id: null). It is looked up on every read and is not cached, so a change of name shows on the next read. Every other field is unchanged, and the list and the other experiment routes do not carry it. The dashboard shows it as the owner of an experiment someone else created. The OpenAPI document changes only in this operation's response schema, which becomes ExperimentDetailResponse (ExperimentResponse plus owner_name).
DELETE /api/v1/users/{user_id}, DELETE /api/v1/admin/users/{user_id} #946 Removing a user's account keeps the segments and rollout schedules it created, with no owner: the segments are still listed and read, and each rollout schedule still reads with all of its stages and owner_id: null. Its API keys are still removed with it, and the response is still 204. The OpenAPI document does not change.
GET /api/v1/integrations, POST /api/v1/integrations, GET/PUT /api/v1/integrations/{integration_type} #968 These operations no longer return the values of stored secrets: encrypted_config carries only base_url, email, project_key, instance_url, client_id, repo_owner and repo_name, and every other stored key is named in the new stored_secrets list. PUT merges encrypted_config key by key: a key sent with a value replaces it, a key sent as null removes it, and a key not sent is kept (it used to replace the whole object). The OpenAPI document changes in IntegrationConfigResponse (adds stored_secrets) and in the PUT description. See What a response shows.
POST/GET /api/v1/safety/feature-flags/{feature_flag_id}/config, GET /api/v1/safety/feature-flags/{feature_flag_id}/check #954 The config request refuses null for enabled, metrics and rollback_percentage with 422 ("type": "null_not_allowed" at ["body", <field>]) and writes nothing. A null used to answer 500, and a null metrics was stored first; the exception was a create that also sent metrics, where a null enabled or rollback_percentage was taken as its default and answered 200, and that create now answers 422 as well. A field left out still keeps its stored value, and on create takes its default: a create that left metrics out used to store a null and answer 500, and now stores {}. A configuration stored with a null metrics reads back with metrics: {}, and the check and the safety monitor treat it as no thresholds; the reads used to answer 500 and the monitor skipped the flag. The OpenAPI document changes only in FeatureFlagSafetyConfigUpdate: its three fields are no longer nullable, and its description. See Safety Monitoring.
POST /api/v1/experiments/{experiment_id}/start, POST /api/v1/experiments/{experiment_id}/complete #974 Starting a draft before its scheduled start_date sets its start_date to now; it used to keep the scheduled date, still ahead, and completing the experiment then answered 500. A scheduled end_date is kept, and a draft whose scheduled start has passed, a resume from paused and an experiment the scheduler starts keep their start_date as before. Completing an experiment whose start_date is still after now (one an earlier version started early) answers 200 and sets that start_date to one microsecond before the new end_date; it used to answer 500. The OpenAPI document changes only in the two operations' descriptions.
POST /api/v1/power/sample-size, POST /api/v1/power/mde, POST /api/v1/power/runtime #1003 n_variants accepts at most 100, and sample_size_per_variant, required_sample_size and daily_traffic at most 1,000,000,000,000 (10^12); a larger value answers 422 at ["body", <field>] with "type": "less_than_equal". Before, most of these fields answered 500 for a value too large to convert to a float (above about 1.8e308) and 200 for smaller ones; sample_size_per_variant on /mde answered 200 at any size, and a very large n_variants on /sample-size could answer a 422 about the effect size. Any of these values above the new bound now answers 422 at the field. A sample size whose calculation still leaves floating-point range (a mean or ratio metric with a very large or infinite baseline_std, or a baseline so small that the squared difference underflows) answers 422 with a fixed message; it used to answer 500. Every other request answers as before. The OpenAPI document changes only in the maximum of those seven request fields. See Statistical Power Analysis.
GET /api/v1/admin/users, GET /api/v1/audit-logs/, GET /api/v1/compliance/audit-events, GET /api/v1/experiments/, GET /api/v1/feature-flags/, GET /api/v1/feature-flags/{flag_id}/history, GET /api/v1/holdout/all, GET /api/v1/llm-experiments/, GET /api/v1/metrics/aggregated, GET /api/v1/metrics/errors, GET /api/v1/mutual-exclusion-groups, GET /api/v1/notifications/delivery-log, GET /api/v1/rollout-schedules/, GET /api/v1/segments, GET /api/v1/users/ #1001 skip and offset accept at most 9223372036854775807, the largest offset PostgreSQL takes, and page at most 9223372036854775808; a larger value answers 422 at ["query", <param>] with "type": "less_than_equal", where it answered 500. A page whose (page - 1) times the route's limit (page_size on GET /api/v1/llm-experiments/) is more than 9223372036854775807 answers 422 at ["query", "page"] with "type": "value_error" and the msg (page - 1) * limit must be at most 9223372036854775807 (or page_size), where it answered 500. On GET /api/v1/feature-flags/, skip and limit accept 0 to 9223372036854775807, and limit=0 still answers 200 with no items: a negative value answers 422 with "type": "greater_than_equal", and a larger one as above, where both answered 500. #1858 made those two refusals in the route; the bounds are now declared on the parameters instead, with the same answers. A value the database can take answers as before, with two exceptions. A caller of GET /api/v1/users/ who is not a superuser, whose list holds only their own account and never read skip, gets 422 for a skip past the bound, where they got 200. A caller the route itself refuses with 403 (a viewer on GET /api/v1/holdout/all, say) gets 422 for a value past the bound, as for any parameter out of its range; one whose page and size are each in range but not their product still gets the 403. The OpenAPI document changes: every skip, offset and page of these operations, and the feature flag list's limit, gains "format": "int64", and the feature flag list's skip and limit a minimum of 0 as well. The bound is not written as a maximum, because a release rewrites the snapshots through JavaScript, which prints an integer that large as a different number.
POST /api/v1/power/plan #1011 The advice is always the built-in planning advice and generated_by is always "template", whatever the API's environment; it no longer calls Claude when ANTHROPIC_API_KEY is set. The request and response are unchanged. The OpenAPI document changes only in the operation's summary and description, in the descriptions of PlanRequest, PlanResponse and its generated_by field, and in the description of the Power Calculator tag. See Statistical Power Analysis.
POST /api/v1/tracking/events #400 An experiment_id, feature_flag_id or variant_id that is a UUID naming no stored experiment, feature flag or variant answers 404, and nothing is stored; it used to answer 500 with "Could not store the event". The detail names each such field, never the id that was sent: {"detail": "No experiment has that experiment_id."}, with one sentence per field when more than one names nothing. Only existence is checked, as the database did: an event whose ids all name stored rows is stored and answered as before, whoever owns them. An id that is not a UUID still answers 422, before any lookup. The OpenAPI document changes only in this operation's description and its new 404 response. See Track Event by Ids.
POST /api/v1/ai/design, POST /api/v1/ai/interpret/{experiment_id} #1043 Each operation allows 10 requests a minute per client address, where it had the default of 300, and above that answers 429 Too Many Requests with Retry-After: 60; every experiment id draws on the interpretation's one count. With ANTHROPIC_API_KEY set, each call to Claude gives up when Claude has not answered in 30 seconds, and is tried at most twice (it used to give up only after 600 seconds and be tried three times); when it fails, the operation answers with its template-based suggestion or interpretation, as it already did when Claude was unavailable. Without the key only the limit is new. The request and response are the same, and so is the OpenAPI document. See The MCP Server and the AI Endpoints.
GET /api/v1/workspaces/ #1008 Each workspace in the list carries member_count, the number of its members, as GET /api/v1/workspaces/{workspace_id} already did; every other field is unchanged. The dashboard's Workspaces page shows it, where it used to show "0 members" for every workspace. The route is served by the full profile only. The OpenAPI document changes only in this operation's description and its response schema, which becomes a list of WorkspaceWithStatsResponse (WorkspaceResponse plus member_count). See Workspaces.
POST /api/v1/tracking/errors, POST /api/v1/tracking/errors/batch, GET /api/v1/safety/feature-flags/{feature_flag_id}/check 0.29.0 Error reports are stored and answered as before. Only those sent with an API key that carries sdk:ruleset, whose owner can change feature flags, count toward a flag's error rate and automatic rollback, as evaluations that fail on the server do. A report sent with any other key is stored with request_data.source "client", and the check's details carries uncounted_error_count, the number of such reports in its window; error_count and the error rate count the rest. Reports stored before the upgrade do not count. The OpenAPI document changes only in the two report operations' descriptions. See Which errors count.
GET/POST /api/v1/feature-flags/evaluate/{flag_key}, GET /api/v1/feature-flags/user/{user_id}, POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch #1178 A targeting context nested more than 10 levels deep or larger than 8,192 bytes answers 422, where it used to be accepted. Every JSON object and array is a level, the context itself the first, and the size is the context as compact JSON in UTF-8. Depth is checked first; the detail is Targeting context nested more than 10 levels deep or Targeting context larger than 8192 bytes, and nothing is evaluated, assigned or recorded for the request. On the two GET routes the context parameter is held to 8,192 bytes as sent, before it is parsed, and a parameter nested too deeply to parse answers the same 422. The batch checks every user's context before it assigns the first user: one over a limit refuses the whole request, its detail prefixed with the user's position (users[3]:), and nobody is assigned. A POST body nested too deeply to parse still answers 400. Every other request answers as before; the contexts the SDKs send are a few hundred bytes. The OpenAPI document does not change. See Targeting Context Limits.
POST /api/v1/segments/{segment_id}/evaluate, POST /api/v1/segments/bulk-evaluate #1183 A user_context nested more than 10 levels deep or larger than 8,192 bytes answers 422, where it used to be accepted. The limits and the detail are the flag evaluation routes': every JSON object and array is a level, the context itself the first, the size is the context as compact JSON in UTF-8, depth is checked first, and the detail is Targeting context nested more than 10 levels deep or Targeting context larger than 8192 bytes. No segment is read or evaluated for the request. Bulk-evaluate checks its one user_context once, whatever the number of segments. A body nested too deeply to parse still answers 400. Every other request answers as before, an id list's user_context.user_id included. The OpenAPI document does not change. See Targeting Context Limits.
GET /api/v1/metrics/summary #1206 error_rate counts only the errors the safety check counts: an error report stored with request_data.source "client" is left out, where every error_logs row in the period used to count, so the rate can be lower than before for the same data. The new uncounted_error_count is the number of such reports in the period. The period (start_date to end_date, by default the 30 days before now), the denominator (the aggregated flag evaluations) and the unit (a percentage) are unchanged, and still differ from the check's. The OpenAPI document changes only in MetricsSummary, which adds the required uncounted_error_count and describes error_rate, and in the operation's description. See Which errors count.
POST /api/v1/llm-experiments/{experiment_id}/judge, GET /api/v1/llm-experiments/{experiment_id}/results #1192 A judge call that fails, or a reply without a JSON score from 0 to 1, stores no score: the evaluation's auto_eval_score becomes null, replacing any earlier score, and its entry in the judge's response has "score": null and error "call_failed" or "no_score". It used to store 0.5 for a failed call or a missing score, and otherwise a number taken from the reply's text or clamped into 0 to 1. The results leave unscored evaluations out of the auto-eval statistics and count them in each variant's n_auto_eval_unscored and the experiment's total_auto_eval_unscored, evaluations never judged included. p_value and effect_size are null when neither variant's values vary; they used to be 1.0 and 0.0. Scores stored before the upgrade are unchanged; run the judge again to re-score them. The OpenAPI document changes only in VariantStats and LLMExperimentResults, which add the two required counts, and in the judge operation's description. See LLM-as-Judge Scoring.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, GET /api/v1/experiments/{experiment_id}/split-url/preview #1194 A split URL variant's traffic_allocation must be from 0 to 100, where only the sum was checked: -50 and 150 were accepted because they add up to 100. A value outside the range answers 422 at ["body", "split_url_config", "variants", <i>, "traffic_allocation"] on a create or an update, and nothing is written. A PUT that does not send split_url_config is unaffected and leaves a stored one as it was, but one that sends back a stored configuration with an allocation outside the range answers 422 until it is corrected. The preview of such a stored configuration answers 409 with the detail split_url_config is not valid; update it with PUT /api/v1/experiments/{id}, where it answered 200 with the stored allocations, as they were. Every other request answers as before. The OpenAPI document changes only in SplitUrlVariant, which gains minimum 0 and maximum 100 on traffic_allocation, and in the descriptions of SplitUrlConfig and VarianceReductionConfig: covariate_metric_id is described as optional, as it is, because without it each metric's own event before the user's assignment is the history. See Server-Side Split URL Testing API.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id} #828 Dashboard-shaped targeting_rules (logical_operator and groups) with more than 1,000 groups and conditions in all answer 422, where they used to be accepted. Each group and each condition counts as one, and the number is the one native rules already had for rules, groups and conditions. The refusal is at ["body", "targeting_rules"], its msg is Value error, targeting rules: at most 1000 groups and conditions are allowed, and nothing is written. A PUT that does not send targeting_rules is unaffected, but one that sends back stored rules over the limit answers 422 until they are reduced. Stored rules over the limit are still read and evaluated as before, and python -m backend.scripts.check_targeting_rules lists them. Experiment targeting rules are unchanged. The OpenAPI document does not change. See Creating Feature Flags.
GET /api/v1/results/{experiment_id}/sample-size #1257 With no mde sent, the plan is for the effect saved with the experiment, its primary metric's expected_effect, when that is above 0 and below 1; otherwise for 0.05 as before. The response carries mde_source: request, experiment or default. An unknown experiment answers 404 whatever the other parameters, where one with a baseline_conversion_rate that mde raised to 100% or more answered 422. The OpenAPI document changes in the mde parameter (it has no default), the new property and the descriptions. See The planned effect.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/clone #1257 A primary metric's expected_effect is read: it is the relative effect the sample-size plan is for (0.10 means 5% → 5.5%). Values are accepted and stored as before, and one that is not above 0 and below 1 is not used. An experiment stored before the change with an expected_effect on its primary metric now plans from it. The OpenAPI document changes only in the field's description.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/export/experiments, GET /api/v1/export/reports/experiments/{experiment_id} #1377 For a metric whose lower_is_better is true, a significant decrease is the improvement: the metric's winning_variant_id, the summary's has_winner, winning_variant_id and recommendation, and the Bayesian decision (which reads the primary metric) follow it. A significant increase used to win whatever the setting. relative_improvement_pct is still the raw signed change. Results for a metric whose lower_is_better is false or not set are unchanged apart from the new field and the engine version. Each metric result carries lower_is_better; the OpenAPI document gains it and changes the descriptions of winning_variant_id and relative_improvement_pct and the engine_version default. The engine version becomes 1.5.0, so the results routes do not serve an answer cached before the upgrade.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/export/variants, GET /api/v1/export/experiments, GET /api/v1/export/reports/experiments/{experiment_id} #439 A metric of type revenue is analysed as its mean value per assigned user, where it was analysed as a conversion: each user's event values are added up, a user with none counts as 0, and the variants are compared with Welch's t-test (to engine 1.12.0). For such a metric mean is that value per user (it was the share of users who sent the event), statistical_test_used is welch_t_test (to engine 1.12.0), each treatment carries absolute_difference and absolute_difference_ci, and the winner and the recommendation follow the means. conversions is still the number of users who sent the event. Every metric result carries analysis: mean for a revenue metric, proportion for every other type, which is analysed as before. The export's conversion_rate is empty when the primary metric is a revenue metric. The OpenAPI document changes in the new fields and the descriptions. See Data export.
GET /api/v1/bandit/{experiment_id}, POST /api/v1/bandit/{experiment_id}/update, PUT /api/v1/bandit/{experiment_id}/weights, GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/bayesian #1385 A bandit whose primary metric has lower_is_better set counts a user who did not convert as the success, so its weights (and the recommendation, which reads them), its regret_reduction_pct and the alpha and beta of its history rows now favour the variant with fewer conversions; they used to favour the one with more, whatever the setting. The status counts stay raw: each variant's successes and conversion_rate are still the users who converted and their share. A bandit whose primary metric is higher-is-better is unchanged, and so is everything else these operations return apart from the engine version. The engine version becomes 1.6.0, so the results routes do not serve an answer cached before the upgrade; the OpenAPI document changes only in the engine_version default of the responses that carry it (bandit, Bayesian, variance reduction). See Where the counts come from.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/export/variants, GET /api/v1/export/experiments, GET /api/v1/export/reports/experiments/{experiment_id}, GET/POST /api/v1/experiments/, GET/PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/start, POST /api/v1/experiments/{experiment_id}/pause, POST /api/v1/experiments/{experiment_id}/complete, POST /api/v1/experiments/{experiment_id}/archive, POST /api/v1/experiments/{experiment_id}/clone, PUT /api/v1/experiments/{experiment_id}/schedule, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/bandit/{experiment_id}, POST /api/v1/bandit/{experiment_id}/update, PUT /api/v1/bandit/{experiment_id}/weights #439 (count, duration and custom) A metric of type count, duration or custom is analysed as its mean per assigned user, as a revenue metric is: for count each user's value is the number of the metric's events they sent, whatever their value; for duration and custom it is the total of those events' value; a user with none counts as 0. Such a metric's analysis is mean, mean is that value per user (it was the share of users who sent the event), statistical_test_used is welch_t_test (to engine 1.12.0), each treatment carries absolute_difference and absolute_difference_ci, and the winner and the recommendation follow the means. Experiments already running or completed show the new numbers from the upgrade on, and their winner and recommendation can change. conversions is still the number of users who sent the event. The export's conversion_rate is empty when the primary metric is of one of these types. aggregation_method and event_value_path are still accepted, stored and returned, and are described as not read; no analysis has read them. The engine version becomes 1.7.0, so the results routes do not serve an answer cached before the upgrade. The OpenAPI document changes only in descriptions, the two examples and the engine_version default. See Data export.
POST /api/v1/feature-flags/, GET /api/v1/feature-flags/, GET/PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/feature-flags/{flag_id}/activate, POST /api/v1/feature-flags/{flag_id}/deactivate #1497 The request and response schemas gain value_type, on_value and off_value; every existing flag answers "boolean", true and false. value_type is set on create and refused (422, read_only) if an update changes it. A string, number or json flag's two values are checked against its type and limits and refused with 422 at their field. default_value is described as deprecated and still accepts only false; the 422 for true keeps its type and location, and its message now names off_value. A request that sends none of the new fields creates and updates a boolean flag exactly as before. See Serve a value.
GET/POST /api/v1/feature-flags/evaluate/{flag_key} #1497 The answer gains value (the flag's on_value when enabled is true, its off_value otherwise) and value_type; config is still null. The operations' description changes; the response schema, an object of any fields, does not.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/bandit/{experiment_id}, POST /api/v1/bandit/{experiment_id}/update, PUT /api/v1/bandit/{experiment_id}/weights #1496 Each treatment of a metric analysed as a proportion carries absolute_difference (the difference of the shares of users who converted, from the counts) and absolute_difference_ci (Newcombe's interval, from each variant's Wilson score interval), where they were null. Every treatment of every metric carries relative_improvement_pct_ci (the MOVER-R interval of the relative change: for a proportion over ratios of 0 and above, never below -100% and null only when an arm has no users or the control has no conversions; for a mean Fieller's, null when the control's mean plus or minus its margin reaches 0), incremental_impact and incremental_impact_ci (the difference and its interval times the treatment's sample_size, a plain number with no currency or unit). The control's are null. The intervals are at the response's confidence_level and are not adjusted for multiple comparisons. is_significant, the winner and the recommendation are decided as before, and a mean metric's absolute_difference and absolute_difference_ci do not change. For a mean with one treatment, or with no correction, is_significant was true exactly when absolute_difference_ci excluded 0 (engine 1.8.0 to 1.12.0); for a proportion, whose is_significant comes from Fisher's exact test, the two can disagree near the threshold. Every other field is unchanged, and so is the export. The engine version becomes 1.8.0, so the results routes do not serve an answer cached before the upgrade; the Bayesian and bandit operations change only in the OpenAPI engine_version default. The OpenAPI document gains the three properties and changes the descriptions of VariantResult, absolute_difference and absolute_difference_ci and the engine_version default.
GET /api/v1/export/reports/overview #244, #1907 experiments_with_winners counts the experiments in the period whose current results name a winner, as the export's winner_variant column does, where it counted saved reports through a column they do not have, swallowed the error and answered 0 for every request. The overview now runs an analysis for each experiment in the period, so the call costs as much as GET /api/v1/export/experiments for the same period, and an analysis error other than results that cannot be computed fails the call with 500 instead of reporting 0. The OpenAPI document does not change. Clients that read the field see a real number instead of 0.
GET /api/v1/metrics/summary #956 A start_date or end_date whose UTC offset is 16 hours or more either way (such as +16:00 or -19:52) answers 422 at ["query", <field>] with the msg Value error, the UTC offset must be less than 16 hours; it used to answer 500, because the database cannot store such an offset. An end_date within the first 30 days of year 1 sent without a start_date, whose default start would fall before year 1, answers 422 at ["query", "end_date"] with the msg Value error, end_date is too early for the default 30-day period; send start_date as well; it used to answer 500. Neither message repeats the value sent. Every other request answers as before, offsets up to 15:59 either way included. The OpenAPI document does not change.
POST /api/v1/rollout-schedules/, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT /api/v1/rollout-schedules/stages/{stage_id} #1462 A stage start_date sent with a zone (Z or an offset) is stored as that moment in UTC, whatever the database session's time zone; one sent with no zone is taken as UTC, as before. On a session that was not in UTC, such a date used to be stored and served back shifted by the session's offset, and so were the times the scheduler records for a stage (completed_date, and the start it measures a stage's duration from): time-based stages started and completed early on a session west of UTC, and late east of it. Deployments whose database sessions run in UTC, as the ones this repository ships do, see no change. Dates stored before the upgrade are not changed; send a pending stage's start_date again to correct it. The OpenAPI document does not change. See Time-Based Triggers.
POST /api/v1/rollout-schedules/, PUT /api/v1/rollout-schedules/{schedule_id}, POST /api/v1/rollout-schedules/{schedule_id}/activate, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT /api/v1/rollout-schedules/stages/{stage_id}, POST /api/v1/rollout-schedules/stages/{stage_id}/advance #1460, #1536 Every change keeps a schedule's stage targets from decreasing in stage_order and within its max_percentage, a flag has at most one active schedule, and stages start in order. Create checks the targets in stage_order order, where it checked them in list order, and still answers 422. Adding a stage, or changing a pending stage's target or order, that would make a target decrease or exceed max_percentage answers 409, and so does lowering max_percentage below a stage's target; these used to be accepted. Adding a stage, or moving a pending stage, at or before a stage that has started answers 409; this used to be accepted and shifted the started stages down. A stage that has completed or failed accepts no change, and a stage in progress accepts no change to target_percentage or stage_order: each answers 409 (stage_order on a stage in progress answered 400). An in-progress stage still accepts a new trigger_type, trigger_configuration, start_date, name and description. Activating a schedule, or resuming a paused one, while another schedule of the same flag is active answers 409. Advancing a pending stage answers 409 while another stage is in progress or an earlier one has not completed; advancing the manual stage in progress still completes it and starts the next. A refused request changes nothing. Schedules stored before the upgrade are not changed, and the scheduler runs them as before. The OpenAPI document does not change. See Gradual Rollouts.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/start, GET /api/v1/experiments/{experiment_id}/split-url/preview #1560 A split URL experiment's split_url_config is now checked against the experiment's variants and for usable URLs, where only the number of URL variants and their allocations were checked. A create or update answers 422 at ["body", "split_url_config", ...] and writes nothing when a URL variant name is used twice or is not one of the experiment's variants, when an experiment variant has no URL variant, when a URL variant's traffic_allocation is not the experiment variant's (within 0.01), when a url is not an absolute http or https URL of at most 2048 characters with an ASCII host without a % sign and without user information, a fragment, a backslash, whitespace or control characters, when its path has a . or .. segment (also written %2e) or a character a browser percent-encodes in a path (a non-ASCII character or one of " < > ^ { | } and the backquote), or when a variant other than the control has the control URL's host and path. The rules on names and URLs also hold for a configuration on an experiment of another type; the rules against the variants hold only for a split URL experiment. An update is checked on its result: a PUT that sends none of split_url_config, variants and experiment_type is unaffected, one that sends variants alone is checked against the stored configuration and answers 422 at ["body", "variants"], and one that sends back a stored configuration breaking these rules answers 422 until it is corrected. POST .../start answers 400 with a detail that says what to change when the experiment has no split_url_config, when its configuration is not valid, when another active split URL experiment has the same control URL host and path, or when the two would chain (a control URL that is the other's variant URL, or the reverse). The scheduler, starting a draft at its start_date, makes only the first two of these checks and leaves a draft that fails them as a draft. The preview of a stored configuration that breaks the rules on names and URLs answers 409 with the detail split_url_config is not valid; update it with PUT /api/v1/experiments/{id}, where it answered 200. Every other request answers as before, and stored configurations are not changed. The OpenAPI document changes only in descriptions: of SplitUrlConfig, of its fields and SplitUrlVariant's, and of the update and start operations. See Validation Rules.
GET /api/v1/feature-flags/ #955 The status filter accepts active, inactive and archived in any case; any other non-empty value answers 422 at ["query", "status"] naming the allowed values, where it answered 500. An empty status still means no filter. The OpenAPI document changes: the parameter's description lists the values.
GET /api/v1/llm-experiments/ #955 The status filter accepts DRAFT, ACTIVE, PAUSED and COMPLETED, and the task_type filter accepts chat_completion, text_generation, classification, summarization, code_generation and embedding, each in any case; any other non-empty value answers 422 at ["query", "status"] or ["query", "task_type"] naming the allowed values, where it answered 500. An empty value still means no filter. The OpenAPI document changes: each parameter's description lists the values.
GET /api/v1/mutual-exclusion-groups #955 The status filter accepts active and archived in any case; any other non-empty value answers 422 at ["query", "status"] naming the allowed values, where it answered 500. An empty status still means no filter. The OpenAPI document changes: the parameter's description lists the values.
GET /api/v1/notifications/delivery-log #955 The status filter accepts sent, failed and skipped in any case; any other non-empty value answers 422 at ["query", "status"] naming the allowed values, where it answered 500. An empty status still means no filter. The OpenAPI document changes: the parameter's description lists the values.
GET /api/v1/experiments/ #786 sort_by accepts a column of the experiment, in exact case: id, created_at, updated_at, name, key, description, hypothesis, status, experiment_type, owner_id, start_date, end_date, resume_at, targeting_rules, metrics, tags, experiment_metadata, optimization_type, sequential_testing_enabled, sequential_testing_method, sequential_testing_config, variance_reduction_config, correction_method, confidence_level, mutual_exclusion_group_id, bayesian_enabled, bayesian_config, bayesian_decision, split_url_config and workspace_id. Any other non-empty value answers 422 at ["query", "sort_by"] with "type": "enum" and a msg that lists those columns and does not repeat the value sent. Something of the model that is not a column, such as metadata, to_dict or a relationship (variants, owner), used to answer 500. Every column sorts as before in both directions, the JSON ones (tags, metrics and the rest) included, and an empty sort_by still applies no sort. The parameter is still a string: the OpenAPI document changes only in its description, which lists the columns.
GET /api/v1/experiments/ #786 A narrowing: a sort_by that names nothing of the model, such as foo, Name or Created_At, answered 200 and sorted nothing, and now answers 422 as in the row above. The case must match: Name is not name. No value that sorted before stops sorting.
POST /api/v1/rbac/roles, PUT /api/v1/rbac/roles/{role_name}, POST /api/v1/rbac/users/{user_id}/grant (full profile) #891 A custom role or a direct grant can hold only experiment and feature_flag with create, read, update, delete and list, and audit_log with read. A request that sends any other resource or action answers 422 with "type": "not_grantable", at ["body", "permissions"] on the two role operations (on PUT only when permissions is sent) and at ["body"] on the grant, and nothing is written; every resource and action used to be accepted. Roles and grants stored before the change read back unchanged, a PUT that sends only description still answers 200, and DELETE /api/v1/rbac/users/{user_id}/grant/{resource} still deletes a grant of any resource. The OpenAPI document does not change. See RBAC.
Every operation that checks permission on experiments or feature flags, or reads other users' audit entries (full profile) #891 A user is admitted by their built-in role, as before, or by an active custom role or unexpired direct grant of the permission the operation checks; such a user used to be answered 403. A role or grant gives only experiment and feature_flag create, read, update, delete and list, and audit_log read, and never administration. For the four built-in roles and the core profile nothing changes. See RBAC.
GET /api/v1/rbac/users/{user_id}/permissions, GET /api/v1/rbac/roles, GET /api/v1/rbac/roles/{role_name} (full profile) #891 The response shapes do not change; the values do. permissions lists only experiment and feature_flag (the actions the permission checks admit) and audit_log (["read"] when the user may read other users' entries), where it listed every resource the built-in role names and every pair a role or grant stored; custom_roles and user_count count only assignments that take effect, not those recorded before custom roles took effect. See RBAC.
POST /api/v1/tracking/assign/batch (beta), GET /api/v1/sdk/ruleset (beta), POST /api/v1/tracking/evaluations (beta), POST /api/v1/api-keys #891 An sdk:ruleset key works while its owner can change feature flags, which in the full profile a custom role or direct grant of feature_flag (update) also gives. Batch assignment also needs the owner to be able to change experiments, and otherwise answers 403 with This key's owner cannot change experiments, so the key cannot assign users in a batch, and nobody was assigned. Use a server-side key whose owner can change experiments. before anyone is assigned. The 403 for an owner who cannot change feature flags now reads This key's owner can no longer change feature flags, so the key is refused for server-side SDK use., and the key-creation 403 reads Only users who can change feature flags can create an API key with the sdk:ruleset scope; the ADMIN and DEVELOPER roles and superusers can. Create the key without that scope, or ask someone who can. For the four built-in roles who is admitted does not change.
DELETE /api/v1/feature-flags/{flag_id}, POST /api/v1/feature-flags/{flag_id}/toggle, GET /api/v1/feature-flags/{flag_id}/history, GET /api/v1/audit-logs/, GET /api/v1/audit-logs/stream, POST /api/v1/bandit/{experiment_id}/update, POST /api/v1/mutual-exclusion-groups, PUT /api/v1/mutual-exclusion-groups/{group_id}, POST /api/v1/mutual-exclusion-groups/{group_id}/experiments, DELETE /api/v1/mutual-exclusion-groups/{group_id}/experiments/{experiment_id}, POST /api/v1/segments, PUT /api/v1/segments/{segment_id}, DELETE /api/v1/segments/{segment_id} and, in the full profile, POST /api/v1/counters/{experiment_id}/increment, POST /api/v1/counters/bulk, POST /api/v1/rbac/roles/assign and GET /api/v1/rbac/users/{user_id}/permissions #891 The OpenAPI document changes in the descriptions of these operations: they name the custom role or direct grant that also admits a user (the two RBAC operations describe what they now do). The 403 of POST /api/v1/bandit/{experiment_id}/update now reads Triggering a bandit update needs permission to change experiments, which the DEVELOPER and ADMIN roles have.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/segments, PUT /api/v1/segments/{segment_id} #1204 Targeting rules that use a word their evaluator does not know answer 422 at ["body", "targeting_rules"] (segments: ["body", "rules"]), where they used to be accepted and the condition never held. The words are: on a flag, the operators json_path and percentage_bucket, which flag evaluation does not implement (experiments still accept both); a semantic_version comparison other than eq, gt, gte, lt and lte; an array_length comparison other than those and between; a geo_distance comparison other than lte, lt, gt, gte and eq; a distance unit other than km, kilometers, kilometre, kilometres, miles, mi, meters, metres and m, in any case; and, in the native shape, a time_window the engine cannot read, such as one given only as start and end. The msg names the place and the reason, for example Value error, groups[0].conditions[1].value: unknown distance unit; use km, mi or m, or leave it out for km, and nothing is written. A request that does not send the rules is unaffected, but one that sends back stored rules using such a word answers 422 until they are corrected. Stored rules are evaluated as before, and python -m backend.scripts.check_targeting_rules lists them. Clone still copies stored rules as they are. The OpenAPI document does not change. See Targeting Rules: Operator Reference.
POST /api/v1/segments/{segment_id}/preview #1204 The words of the row above are refused here too. The preview takes a segment's body and answers 422 at ["body", "rules"] with the msg a segment save gives, where it used to estimate the audience with that condition never holding. The OpenAPI document does not change.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id} #1527 A native time_window without start or end that the engine reads, given as days, as start_time and end_time, or as start_date and end_date, is accepted, where it answered 422 at ["body", "targeting_rules"] with a msg such as Value error, rules[0].rule.conditions[0]: not valid. A native window the engine cannot read, one given only as start and end included, answers 422 there with the reason unreadable time window; give days (0 to 6), start_time and end_time (HH:MM), or start_date and end_date (YYYY-MM-DD); a timezone must be a name such as Europe/Paris, and nothing is written; a value that is not an object still answers not valid. The dashboard shape and segments do not change. The OpenAPI document does not change. See Targeting Rules: Operator Reference.
GET/POST /api/v1/feature-flags/evaluate/{flag_key}, GET /api/v1/feature-flags/user/{user_id}, POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch, GET /api/v1/sdk/ruleset #1527 Stored native rules holding a time_window without start or end, which used to be ignored as a whole, are evaluated. Such a flag served its global rollout; now its rules apply, so a flag at 0% turns on for the users they select, and a window the engine cannot read answers enabled: false with reason: "error" for each user whose evaluation reaches it, so a flag at 100% can turn off. Such an experiment made no new user eligible; now its rules decide who is. GET /api/v1/sdk/ruleset serves such a flag for remote evaluation, where it served it for local evaluation with no rules; when the window is only in default_rule and the rules are otherwise local, it serves the flag locally with its rules and its default_rule, which now applies to every user no rule matches. python -m backend.scripts.check_targeting_rules --time-window-changes lists these flags and experiments. The OpenAPI document does not change.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id} #1461 Two metrics with the same name answer 422 at ["body", "metrics"] on create and on update, naming the two positions; create used to answer 400 Something went wrong while creating the experiment, and update answered 500. Names are compared exactly, so Revenue and revenue are different metrics, as before. metrics: [] on update answers 422 as create does, where it removed every metric; metrics absent or null still leaves the metrics unchanged. An experiment already left with no metrics stays so, and cannot be started. The OpenAPI document changes: metrics has a minimum of one item on update, and the descriptions of metrics on both requests and of the update operation say what is refused.
POST /api/v1/rollout-schedules/, PUT /api/v1/rollout-schedules/{schedule_id} #962, #1086, #1529, #1534 min_stage_duration accepts a whole number of hours from 0 to 8760, or null for no minimum (null on a PUT still clears it); anything else answers 422, where a negative value or one above 8760 was stored, and 2147483648 or more answered 500. A PUT that makes the end date not after the start date, or sends one date that falls on the wrong side of the stored one, answers 422 with End date must be after start date, where it answered 500. A date with no zone is read as UTC, so a start and an end that mix zoned and unzoned values no longer answer 500. A PUT that contains stages, with any value including null and [], answers 422 naming the stage routes, where it answered 200 without applying the stages; this is deliberately wider than "a non-empty list" so a client cannot believe a list was applied. Schedules already stored with a value outside 0 to 8760 are read back unchanged, and the scheduler treats a negative one as no minimum; a PUT that sends such a value back answers 422 until it is corrected. The OpenAPI document changes: min_stage_duration has a minimum and a maximum on both requests, and stages is marked deprecated on the update. See Rollout schedules.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/segments, PUT /api/v1/segments/{segment_id}, POST /api/v1/segments/{segment_id}/preview #1525, #1526 Targeting rules with a value the evaluator cannot use answer 422 at ["body", "targeting_rules"] (segments and the preview: ["body", "rules"]), where they used to be accepted and then never held, held where they said they did not, or abandoned the ruleset. The values are: a before or after value that cannot be read as an ISO 8601 date or a Unix timestamp a date can hold; an array_length value that cannot be read as a whole number, or between without whole-number min and max; a geo_distance radius that is missing, below 0 or not a number; a percentage_bucket value that cannot be read as a number (experiments); a native gt, gte, lt or lte value that cannot be read as a number; and, in the dashboard shape, a geo comparison other than lte in the object, or any fifth item of the list or the text, which was dropped when the rule was applied, so the rule meant within the radius. The msg names the place and the reason, for example Value error, rules[0].rule.conditions[1].value: not a date; use an ISO 8601 date such as 2030-01-31 or 2030-01-31T09:00:00Z, or a Unix timestamp, and nothing is written. A request that does not send the rules is unaffected, but one that sends back stored rules using such a value answers 422 until they are corrected. Stored rules are evaluated as before, and python -m backend.scripts.check_targeting_rules lists them. The OpenAPI document does not change. See Targeting Rules: Operator Reference.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/segments, PUT /api/v1/segments/{segment_id}, POST /api/v1/segments/{segment_id}/preview #1666, #1669, #1672, #1673 Targeting rules answer 422 at ["body", "targeting_rules"] (segments and the preview: ["body", "rules"]) for a native between whose bounds are not two numbers or two dates with the same time-zone form (flags and experiments), and, in the dashboard shape (flags, experiments, segments and the preview), for a time_window the engine cannot read and for a greater_than, greater_than_or_equal, less_than or less_than_or_equal value that is NaN or an integer too large for a floating-point number, where they used to be accepted and then never matched or answered error. A geo latitude, longitude or dashboard radius holding an integer too large for a floating-point number answers 422 with the same message a value that is not a number gets, where it answered 500. The msg names the place and the reason, and nothing is written. A request that sends back such stored rules answers 422 until they are corrected; stored rules are evaluated as before, and python -m backend.scripts.check_targeting_rules lists them. A between with no additional_value still answers not valid. The OpenAPI document does not change.
POST /api/v1/rollout-schedules/, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT /api/v1/rollout-schedules/stages/{stage_id} #1535 When a stage's trigger_configuration has a duration, it must be a number of hours from 0 to 8760, not a string, null, a boolean, NaN or a larger number; anything else answers 422 at trigger_configuration, where a string, null or a number above 8760 was accepted and the stage then never completed, a negative number or false was accepted and the stage completed at once, true was read as one hour, and NaN answered 500. A stage without duration keeps the 24-hour default, and the rest of trigger_configuration is not checked. Stages already stored with a bad duration are read back unchanged. See Trigger types.
GET /api/v1/experiments/{experiment_id}/split-url/preview #1615 For a visitor id never linked to another, the preview answers what POST /api/v1/tracking/split-url/assign gives it now, without recording anything: their stored assignment's variant if they have one, else the variant a new visitor with that id gets, by the bandit weights for a bandit experiment and otherwise by the hash of the id and the experiment's key that POST /api/v1/tracking/assign uses. It used to answer an MD5 hash of the id and the experiment's id, which matched the variant a visitor is assigned for only about half of the ids. It checks no eligibility rule. A stored configuration that does not match the experiment's variants answers 409 with the detail split_url_config is not valid; update it with PUT /api/v1/experiments/{id}, where it answered 200. The fields of the answer are unchanged. The OpenAPI document changes only in the operation's description, its response description and the description of user_id. For an id linked to another by POST /api/v1/tracking/alias (#449), the preview reads the id it is sent, its own stored assignment or its own hash, not its person's. See Split URL preview.
GET /api/v1/feature-flags/, GET /api/v1/experiments/, GET /api/v1/experiments/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results #1607 Each of these four read operations also accepts an API key that carries the mcp:read scope, in the X-API-Key header, where it took a sign-in only. The request then reads as the user who created the key, and the operation's role check is the one a sign-in gets. A valid key without mcp:read answers 403; an unknown, inactive, expired or deleted key, or one whose owner is deactivated, answers 401 Invalid API Key. A request with a bearer token is judged on the token alone, and one with neither credential still answers 401 Not authenticated. Keys already labelled mcp:read gain this access at upgrade; an ADMIN lists keys with GET /api/v1/api-keys?all=true. This is additive for existing clients, and the routes that create, change or delete flags or experiments, and the routes that manage users, still take a sign-in. The OpenAPI document changes: each operation's security adds the MCPReadAPIKey scheme, and that scheme's description names mcp:read. See Scopes.
POST /api/v1/tracking/track, POST /api/v1/tracking/batch, POST /api/v1/tracking/events #1543 Each event takes an optional event_id: text of at most 255 characters, compared exactly. Missing, null and "" mean none, and an event without one is stored as before. An event sent again with the same event_id, user, experiment, flag and event name is not stored again: /track and /events answer 200 with "duplicate": true and the stored event's id, and /batch counts it in success_count and in the new duplicate_count. The answers of /track and /events gain duplicate and event_id, and the answer of /batch gains duplicate_count. An event_id these routes ignored before is now refused with 422 when it is not a string (a number, say), is over 255 characters, or holds NUL or a lone surrogate; in /batch one such entry refuses the whole request, and nothing in it is stored. The OpenAPI document changes only in these three operations' request and response schemas. See How events count.
GET /api/v1/metrics/errors, GET /api/v1/metrics/aggregated #1625 A stored row is returned with its metadata (the stored meta_data), where any answer holding a row answered 500. An empty answer is unchanged. The OpenAPI document changes: the two response schemas lose a metadata keyword that described an alias the code never had; no field, type or requirement changes.
GET /api/v1/metrics/errors #956 A start_date or end_date whose UTC offset is 16 hours or more either way (such as +16:00 or -19:52) answers 422 at ["query", <field>] with the msg Value error, the UTC offset must be less than 16 hours; it used to answer 500, because the database cannot store such an offset. The message does not repeat the value sent. Every other request answers as before, offsets up to 15:59 either way included. The OpenAPI document does not change.
POST /api/v1/rollout-schedules/, GET /api/v1/rollout-schedules/, GET/PUT /api/v1/rollout-schedules/{schedule_id}, POST /api/v1/rollout-schedules/{schedule_id}/activate, POST /api/v1/rollout-schedules/{schedule_id}/pause, POST /api/v1/rollout-schedules/{schedule_id}/cancel, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT /api/v1/rollout-schedules/stages/{stage_id}, POST /api/v1/rollout-schedules/stages/{stage_id}/advance #1528 A stage in a response carries started_at, the time it started (UTC; null for a stage that has not started, for one that finished before the upgrade, and for one the previous release started during the upgrade, while it runs and after). The scheduler measures a time-based stage's duration and the schedule's min_stage_duration from it, so editing a stage in progress, a rename included, no longer restarts its clock; changing its trigger_configuration.duration moves its completion time. started_at is read-only: a request that sends it is ignored. The OpenAPI document changes: the stage in each response gains started_at. See Time-Based Triggers.
GET /api/v1/experiments/analysis/sample-size #820 The operation takes correction_method: none (the default), bonferroni or benjamini_hochberg, the values of an experiment's correction_method. With bonferroni or benjamini_hochberg, each of the variant_count - 1 comparisons with the control is planned at significance_level / (variant_count - 1), as GET /api/v1/results/{experiment_id}/sample-size plans it, so with three or more variants samples_per_variant, total_samples and estimated_duration_days are larger; Benjamini-Hochberg is planned at Bonferroni's level. The answer carries correction_method as sent, comparisons and alpha (the significance each comparison is planned at), and significance_level is still the level sent. A request without correction_method answers as before. Any other correction_method, the empty string included, answers 422 at ["query", "correction_method"] with "type": "string_pattern_mismatch"; the parameter used to be ignored. variant_count accepts at most 100 and daily_traffic at most 1,000,000,000,000 (10^12, the power routes' bound, #1003); a larger value answers 422 at ["query", <field>] with "type": "less_than_equal", where any value used to be accepted, and one too large to convert to a float answered 500 when daily_traffic and traffic_allocation were both sent. When both are sent and the days needed cannot be calculated, because the users per variant per day come to 0 or the day count is not finite (a traffic_allocation of 5e-324 or 1e-310 with a daily_traffic of 1, say), the answer is 422 with the detail "These values are too large or too small to calculate with. Use values nearer those of a real experiment."; it used to be 500. The dashboard's new-experiment estimate sends the experiment's correction, and refuses more than 100 variants or more than 1,000,000,000,000 daily users before asking. The OpenAPI document changes in the new parameter, the maximum of variant_count and of daily_traffic, the descriptions of variant_count and significance_level, and the operation's description; the response schema is unchanged. See Sample Size Guidance.
POST /api/v1/power/sample-size, POST /api/v1/power/mde #1034 With metric_type mean or ratio, baseline_rate is the metric's baseline mean in its own units and accepts any finite number above 0; it used to answer 422 unless the mean was below 1 and the mean raised by minimum_detectable_effect stayed below 1, so a mean such as an average order value of 45 could not be planned. A mean accepted before gets the same answer, except that a size that comes out as 0 (a baseline_std so small that its square underflows, such as 1e-200) now answers 422 with the fixed out-of-range message, where it answered 200 with per_variant: 0; two finite means that answered 422 with Python's own text ("cannot convert float NaN to integer", "required_sample_size must be > 0") now answer the same fixed message. A proportion (the default) keeps its bounds, but a baseline_rate of 1 or more now answers 422 at ["body"] with "type": "value_error" and a message that names metric_type, where it answered "type": "less_than" at ["body", "baseline_rate"]; an infinite or NaN baseline_rate answers 422 at ["body", "baseline_rate"] with "type": "finite_number". /mde is unchanged: it plans proportions only and ignores a metric_type sent to it, as its description now says. The OpenAPI document changes only in the sample-size request's baseline_rate (no exclusiveMaximum; its description) and in the description of /mde. See Planning a mean.
POST /api/v1/tracking/track, POST /api/v1/tracking/batch, POST /api/v1/tracking/events #1684, #1685 An event timestamp at the very edge of the date range whose UTC offset moves it past 0001-01-01 or 9999-12-31 once converted to UTC (9999-12-31T23:59:59-01:00, 0001-01-01T00:00:00+01:00) is refused: /track and /events answer 422, and /batch reports the entry in errors; they answered 500 ("Could not store the event"), and /batch reported "Could not store this event". Event metadata (properties on /events) nested more than 64 levels deep, every JSON object and array a level and the object itself the first, is refused the same way, where it was stored and answered 200 on /batch and, from about 255 levels, answered 500 on /track and /events after the event was stored. In /batch one such entry is reported in errors and the others are stored. Nothing is stored for a refused event. The same edges with an offset that stays in range, and metadata at 64 levels or fewer, are stored as before. The OpenAPI document does not change. See Track Event.
GET /api/v1/mcp/manifest #1607 The tool list is the Controlvar MCP server's: list_feature_flags, get_feature_flag, evaluate_feature_flag, list_experiments, get_experiment and get_experiment_results. It used to list five tools that no server offered: create_experiment, get_results, toggle_feature_flag, suggest_experiment and interpret_results. The response schema does not change, and name is still controlvar. The OpenAPI document changes only in this operation's description and the MCP tag's. See The MCP Server and the AI Endpoints.
GET /api/v1/scheduler/{name}/history #1485 limit accepts 1 to 1,000; 0, a negative value or a value above 1,000 answers 422 and the history is not read. The OpenAPI document changes: limit has a minimum of 1 and a maximum of 1,000, and the operation's description names the bounds.
Every operation with a JSON request body (application/json in the snapshots); for the value range, POST /api/v1/tracking/track, POST /api/v1/tracking/batch, POST /api/v1/tracking/events #1630 A number in a JSON request body that is NaN, Infinity, -Infinity or too large for a double (such as 1e400) answers 422 with "type": "finite_number" at its place in the body, and nothing is written; it used to be accepted, and in some fields answered 500. It is answered before authentication, as a body that is not JSON already was. The form-encoded POST /api/v1/auth/token and POST /api/v1/auth/sso/saml/{config_id}/acs (full profile) are unchanged. An event value must be a finite number from -1e12 to 1e12, both included: /track answers 422 (Invalid event: value not valid), /events answers 422 at ["body", "value"], and /batch reports the entry in errors and stores the others. A non-finite number anywhere in a /batch body refuses the whole request and stores none of its events, while a value outside -1e12 to 1e12 fails only its own entry. Where a field already refused such a number (a flag's on_value and off_value, a rollout stage's duration, a power calculation's baseline_std), the 422 now carries finite_number at the number's place; the status does not change. Track Event gives a query that lists the events already stored with a value outside the range. The OpenAPI document does not change.
POST /api/v1/experiments/{experiment_id}/clone (full profile) #1781 A clone of a split URL experiment carries the source's split_url_config, where it carried null and its start answered 400. Its start makes the usual split URL checks, so it cannot start while an active split URL experiment has the same control URL. Other experiments clone as before. The OpenAPI document does not change.
POST /api/v1/experiments/{experiment_id}/metadata #961 A body holding NUL (U+0000) or an unpaired surrogate anywhere, in a key or a value, nested or not, answers 422 at ["body"] with the msg Value error, metadata must not contain NUL or unpaired surrogate characters; nothing is stored and no audit entry is made. It used to answer 500, because the database cannot store such text. The message does not repeat the value sent. Authentication still answers 401 first, and the 422 now comes before the 403 and 404 the operation answers for a role without UPDATE and for an unknown experiment. Every other body answers as before. The OpenAPI document does not change.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/safety/feature-flags/{feature_flag_id}/config, POST /api/v1/api-keys #2180 Text holding NUL (U+0000) or an unpaired surrogate anywhere, in a key or a value, nested or not, answers 422 at its field with the msg Value error, name must not contain NUL or unpaired surrogate characters (or the field's own name); nothing is saved and no audit entry is made. The fields are an experiment's name, description, hypothesis, targeting_rules and tags; a variant's name, description and configuration and a metric's name, description, event_name, aggregation_method and event_value_path, each answered at its place in the list, such as ["body", "metrics", 0, "event_name"]; an experiment's variance_reduction_config.covariate_metric_id and split_url_config's cookie_name and canonical_url, each at its own field, such as ["body", "split_url_config", "cookie_name"]; a flag safety configuration's metrics, for the character in a metric's name or in its thresholds; and an API key's name, description and scopes. Most of these answered 500, because the database cannot store such text; on an experiment create, tags, targeting_rules, a variant's configuration and those three settings answered 400, except an unpaired surrogate in a key of a variant's configuration, which answered 500 in a nested key and in a top-level key was saved as three replacement characters. A split URL variant's url and visual_config's editor_url now refuse an unpaired surrogate as they refused NUL, with 422 at the field and the fixed message each already gave; in the query, which was not checked, it answered 400 on a create and 500 on an update. In a split URL variant's path or host it was already refused, with the path's or the host's message; it now gets the message about a # fragment, a backslash, a space or a control character, with the same type and loc. Where another check refused such text first, as for an unpaired surrogate in a name, event_name, aggregation_method or event_value_path, in an experiment's description or hypothesis or in an API key's description, or for the character in a condition's attribute or operator, it answered that check's 422 and now answers this one. An experiment's key answers its own 422 as before. The message does not repeat the value sent. Authentication still answers 401 first, and a safety configuration by a caller who is not a superuser still answers 403 first; the 422 now comes before the 403 for a role that may not create or change experiments or create a key with the sdk:ruleset scope, and the 404 for an unknown experiment or flag, as every other body 422 on these operations does. A valid surrogate pair, such as an emoji, is saved as before, and every other body answers as before. The OpenAPI document does not change.
POST /api/v1/holdout, PUT /api/v1/holdout/{holdout_id}, POST /api/v1/mutual-exclusion-groups, PUT /api/v1/mutual-exclusion-groups/{group_id}, POST /api/v1/users/, PUT /api/v1/users/{user_id}, PUT /api/v1/notifications/preferences, POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/rollout-schedules/, PUT /api/v1/rollout-schedules/{schedule_id}, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT /api/v1/rollout-schedules/stages/{stage_id}; POST /api/v1/workspaces/, PUT /api/v1/workspaces/{workspace_id}, POST /api/v1/rbac/roles, PUT /api/v1/rbac/roles/{role_name} (full profile) #2181 Text holding NUL (U+0000) or an unpaired surrogate anywhere, in a key or a value, nested or not, answers 422 at its field with the msg Value error, name must not contain NUL or unpaired surrogate characters (or the field's own name); nothing is saved and no audit entry is made. The fields are a holdout's and a mutual exclusion group's name and description; a user's username and full_name; the notification settings' slack_channel and email_override; a flag's name and description; a rollout schedule's name, description and config_data, and a stage's name, description and trigger_configuration, a stage in a schedule create answered at its place in the list, such as ["body", "stages", 0, "name"]; a workspace's name and description; and a custom role's description. A NUL answered 500 for a holdout, a group, a user, the notification settings and a workspace, and 400 with the database driver's sentence for a flag's, a schedule's or a stage's name or description and for a role's description on an update, 409 on a create. A schedule's config_data and a stage's trigger_configuration answered 500 for either character, a workspace's name and description 500 for an unpaired surrogate too, and a schedule's or a stage's description 400 for it. Where another check refused an unpaired surrogate first, in each of the other fields, it answered that check's 422 and now answers this one. A user's email, a workspace's slug and a role's name answer their own 422 as before. The message does not repeat the value sent. Authentication still answers 401 first, and a flag create by a role that may not create a flag still answers 403 first; the 422 now comes before the 403 for a role the operation refuses, and the 404 for an unknown holdout, group, user, flag, schedule, stage, workspace or role, as every other body 422 on these operations does. A valid surrogate pair, such as an emoji, is saved as before, and every other body answers as before. The OpenAPI document does not change.
POST /api/v1/safety/settings #2209 NUL (U+0000) or an unpaired surrogate in a metric's name or its comparison_type in default_metrics answers 422 at ["body", "default_metrics"] with the msg Value error, default_metrics must not contain NUL or unpaired surrogate characters; nothing is saved and no audit entry is made. It used to answer 500, because the database cannot store such text. The message does not repeat the value sent. Authentication still answers 401 first, and a caller who is not a superuser still answers 403 first. A valid surrogate pair, such as an emoji, is saved as before, and every other body answers as before. The OpenAPI document does not change.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, PUT /api/v1/feature-flags/{flag_id}/environments/{environment} (beta) #2163 A targeting_rules or tags holding NUL (U+0000) or an unpaired surrogate anywhere, in a key or a value, nested or not, answers 422 at ["body", "targeting_rules"] or ["body", "tags"] with the msg Value error, targeting_rules must not contain NUL or unpaired surrogate characters (or tags); nothing is saved and no audit entry is made. Where another check refused such a body first, as for the character in a condition's attribute, operator or semantic version, it answered that check's 422 and now answers this one; otherwise it answered 500, because the database cannot store such text. The message does not repeat the value sent. Authentication still answers 401 first, and a create by a role that may not create a flag still answers 403 first; on both PUTs the 422 now comes before the 403 for a role that may not change the flag and the 404 for an unknown flag. A valid surrogate pair, such as an emoji, is saved as before, and every other body answers as before. The OpenAPI document does not change.
POST /api/v1/segments, PUT /api/v1/segments/{segment_id} #2175 A name, description or rules holding NUL (U+0000) or an unpaired surrogate anywhere (in the rules, in a key or a value, nested or not) answers 422 at ["body", "name"], ["body", "description"] or ["body", "rules"], one error for each such field, with the msg Value error, name must not contain NUL or unpaired surrogate characters (or description, rules); nothing is saved and no audit entry is made. Where another check refused such a body first, as for a surrogate in a name, in a create's description or in a pattern, or for the character in a condition's attribute or operator, a logical operator, a semantic version or an unknown key, it answered that check's 422 and now answers this one; otherwise an update's name or description answered 404, and the rest 500, because the database cannot store such text. The message does not repeat the value sent. Authentication still answers 401 first; the 422 now comes before the 403 for a role that may not create or change segments and the 404 for an unknown segment, as every other body 422 on these operations does. A valid surrogate pair, such as an emoji, is saved as before, and every other body answers as before. POST /api/v1/segments/{segment_id}/preview takes the same body but saves nothing, and answers such a body as before. The OpenAPI document does not change.
POST /api/v1/auth/sso/configs, PUT /api/v1/auth/sso/configs/{config_id} (full profile) #1100 Creating a SAML configuration, or an update that sets sso_url or provider_type, whose sso_url is not https answers 400 with SAML single sign-on URL must use https; check this SSO configuration's sso_url, where it answered 201 or 200; nothing is saved. An update that sends neither sso_url nor provider_type is not checked, so a configuration stored earlier can still be changed. The test environment is exempt, as it is for Okta. The OpenAPI document does not change.
GET /api/v1/ai/sample-size, POST /api/v1/utils/utils/sample-size #958 GET /api/v1/ai/sample-size answers 422 with fixed text, checked in this order: a baseline_rate, confidence or power that is NaN or outside 0 to 1 gets <param> must be a number from 0 to 1, with the parameter's name; an mde of 0 gets This baseline raised by this effect changes too little to estimate a sample size. Raise the baseline rate or the effect.; a treatment rate (baseline_rate + mde) above 1 gets This baseline raised by this effect reaches 100% or more. Lower the baseline rate or the effect.; and a treatment rate below 0, or a size or a day count that is not a finite number above 0, gets These values are too large or too small to calculate with. Use values nearer those of a real experiment. Most of these answered 500; these answered 200 with a size that is not one, and now answer 422: a treatment rate outside 0 to 1 (sizes such as -10, 7 and 0), a baseline_rate or confidence outside 0 to 1, and inputs whose size came to 0. POST /api/v1/utils/utils/sample-size answers 422 with the same out-of-range text, where it answered 500, when the users per variant per day come to 0, the day count is not finite, or daily_traffic or variant_count is too large for a floating-point number. Every other input answers as before, a baseline_rate of 0 or 1, a confidence of 0 and a treatment rate of exactly 0 or 1 included. The message does not repeat the value sent. Since #1742, a number parameter of either operation (baseline_rate, mde, confidence, power; the body's four rates and traffic_allocation) that is NaN, Infinity, -Infinity or too large for a double is refused before these checks, with 422 and "type": "finite_number" at that parameter; the integer parameters keep their own answers. The OpenAPI document does not change.
GET/PUT/DELETE /api/v1/users/{user_id}, POST /api/v1/llm-experiments/{experiment_id}/evaluate #959 A {user_id} that is not a UUID, such as abc, answers 400 Invalid user ID format on PUT and DELETE for every caller and on a superuser's GET, where an id without a - answered 500; a caller who is not a superuser still gets 403 first on a GET of another account. me is such an id on PUT and DELETE, so DELETE /api/v1/users/me answers 400; GET /api/v1/users/me is its own operation and is unchanged. A UUID written without its dashes still names its account. An evaluation_id that is not a UUID answers 400 Invalid evaluation_id format, where it answered 500; the permission check still comes first. The OpenAPI document does not change.
POST /api/v1/rbac/users/{user_id}/grant (full profile) #1002 A grant for a user id that names no account answers 404 User not found, the answer of GET /api/v1/rbac/users/{user_id}/permissions, where it answered 500; nothing is written and no audit entry is made. The user is looked up after the admin check, so a caller who is not an admin still gets 403 first. The OpenAPI document does not change.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id} #1571 The OpenAPI document changes: on_value and off_value in FeatureFlagCreate and FeatureFlagUpdate are typed as a string, number, boolean, object or array (an anyOf of the five), so it no longer allows null, which the API has refused with 422 ("type": "null_not_allowed") since #1497. The API's answers do not change.
GET /api/v1/results/{experiment_id} (with breakdown), GET /api/v1/experiments/{experiment_id}/segmented-results/{segment_by} #1776 Each assigned user is in one segment, the value the user was first assigned with, or else the first value tracked for them, and their conversions count there, so per variant the segments' sample_size and conversions add up to the experiment's. A user used to be counted in every segment their events named, and a conversion without the key went under unknown (/results) or nowhere (segmented-results). segmented-results lists unknown. A breakdown lists the 20 values with the most users and counts the rest under other. A value longer than 255 characters is counted under other. Each segment's p-value is Fisher's exact test against the control, the test the headline uses for a conversion rate. Existing breakdowns change, and adjusted_alpha with them. A breakdown that cannot be computed answers 500 as a whole and is not cached; the headline stays available without breakdown=. It used to answer 200 with the segments done so far. A dimension containing a NUL character answers 400. Engine version 1.9.0, so /results serves no answer cached before the upgrade; a segmented-results answer can be served for up to an hour after it when CACHE_ENABLED is on. The OpenAPI document changes in two descriptions and the engine_version default. See Where the segments come from.
POST /api/v1/auth/logout #708 With the Cognito provider the operation answers 204 where it answered 404: it checks the bearer token as every request does, then asks Cognito to sign the user out everywhere (GlobalSignOut), after which the token is refused. With no token, or one Cognito does not accept, it answers 401. If Cognito fails to sign the user out, it still answers 204 and logs the failure. With the local provider nothing changes: 204 with or without a token, and nothing is revoked. The OpenAPI document changes: the operation's description, a 401 response, and security, the bearer token it now reads.
GET /api/v1/feature-flags/, POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, GET /api/v1/mcp/manifest #1808 The list takes an optional stale parameter: true answers only the flags that look ready to remove, false the others, and a request without it answers as before; a value that is not a boolean answers 422 at ["query", "stale"]. With stale sent, total counts the flags that match it, and skip and limit page them in the list's order. The items become FeatureFlagListItem, which is FeatureFlagRead with stale and stale_reasons (not_evaluated, on_for_everyone, off_for_everyone), and the answer gains stale_days and evaluations_seen; no existing field changes. Create and update accept stale and stale_reasons and ignore them, as they do the read-only fields, so a list item can still be sent back unchanged. The definition of stale is beta: its conditions and threshold may change; the fields will not. The OpenAPI document changes in the list operation's parameters, description and response (FeatureFlagListItem, FeatureFlagListResponse), and in FeatureFlagCreate and FeatureFlagUpdate, which gain the two read-only fields. The manifest's list_feature_flags entry gains the same stale parameter and a longer description; the manifest's response schema does not change. See Stale Flags.
POST /api/v1/experiments/, GET /api/v1/experiments/, GET/PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/start, POST /api/v1/experiments/{experiment_id}/clone, POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch (beta) #448 The experiment schemas gain balance_within (beta): set on create or on a draft, it balances each new user's variant within the group of their context value (Balance the split within groups). Every response carries it, null when the experiment balances nothing; a clone copies it. It answers 422 at ["body", "balance_within"] for a bandit, a split URL experiment, or a split whose shares are not all multiples of 5; changing it after draft answers 400, and /start answers 400 for an experiment stored past those checks. An experiment that does not set it answers and assigns as before. The assign operations' descriptions say that a balanced experiment's new user's variant also depends on the users of their group assigned before them.
POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/clone, DELETE /api/v1/segments/{segment_id}, PUT /api/v1/segments/{segment_id}, GET /api/v1/segments/{segment_id}/experiments, POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch (beta) #448 (saved segments) balance_within takes {"segments": [...]}, 1 to 10 saved segment ids, where it answered 422: each new user is balanced within the first listed segment they belong to, or other (Balance within saved segments). Create and a draft's PUT answer 422 at ["body", "balance_within"] for an attribute and segments together, or neither, and at ["body", "balance_within", "segments"] for more than 10 ids, an id listed twice, or a segment that does not exist, is archived or inactive, or whose rules are not valid; clone answers 409 when a segment it would balance within cannot be used. Archiving a segment, or a PUT that sets its status to inactive or archived, answers 409 segment_in_use while a draft, active or paused experiment balances within it, and its message says what holds the segment (targeting rules, balancing, or both). GET /api/v1/segments/{segment_id}/experiments lists an experiment that balances within the segment too, whatever its status, as it lists one whose rules use it. The OpenAPI document changes in the descriptions of balance_within and its segments, of DELETE /api/v1/segments/{segment_id}, PUT /api/v1/segments/{segment_id} and GET /api/v1/segments/{segment_id}/experiments, and each segment id is 1 to 36 characters.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/bandit/{experiment_id} #448 (results) Engine version 1.10.0, for the new beta GET /api/v1/results/{experiment_id}/balanced-groups; the numbers these operations return do not change. /results serves no answer cached before the upgrade. The OpenAPI document changes only in the engine_version defaults.
PUT /api/v1/experiments/{experiment_id} #848 Once an experiment has left draft (it is active, paused, completed or archived), a request that includes variance_reduction_config, sequential_testing_enabled, sequential_testing_config, bayesian_enabled or bayesian_config answers 400 and changes nothing, for every role, a superuser included; a superuser's detail is Cannot update <field> for experiments in <status> status (#580's), as correction_method and confidence_level already did (#580). The refusal is on presence: the stored value sent back is refused, and so is null for the four that accept it; sequential_testing_enabled: null still answers 422 at every status. Before, a superuser's request changing one of the five on such an experiment answered 200; anyone else already got Cannot update experiments in <status> status, and still does. A draft takes them as before. To use other settings for an experiment that has left draft, clone it with POST /api/v1/experiments/{experiment_id}/clone: the copy is a new experiment, a draft, and takes them. The OpenAPI document changes only in descriptions: of the five fields in ExperimentUpdate, and of the update operation. See Updating an experiment.
POST /api/v1/segments/{segment_id}/preview #830 The preview estimates from the attributes users sent as context to POST /api/v1/tracking/assign, read from the exposures of the last 30 days, newest first, one per user. It used to read a store that assign never wrote, so it almost always answered {"estimated_percentage": 0.0, "sample_size": 0, "matched": 0}. The answer adds source, window_days, sampled_since, ended_by, users_without_context and reason, and estimated_percentage becomes nullable: with no user with attributes it is null with reason: "no_exposures_with_context", where it used to be 0.0, and with 1 to 29 users it is null with reason: "too_few_users". A read that takes more than 5 seconds in all, however many fetches from the database it makes, answers 503. The request is unchanged. The dashboard's segment page shows the new answer. The OpenAPI document changes in AudiencePreviewResponse (the six fields, and estimated_percentage nullable), in the operation's description and in its new 503 response. See Audience Segments.
POST /api/v1/rbac/users/{user_id}/grant (full profile) #1789 A body whose user_id names a different user than the path used to be accepted, and the grant was made for the path's user; it now answers 400 user_id in the body ('<body>') does not match the one in the path ('<path>'); nothing is written and no audit entry is made. A user_id that is not a UUID is refused the same way; the path's id in capitals or without its dashes is the same user. The admin check still comes first, so a caller who is not an admin gets 403, and the 400 comes before the 404 for a path id that names no account. A body that matches is unchanged. The OpenAPI document changes only in this operation's description.
POST /api/v1/holdout, PUT /api/v1/holdout/{holdout_id}, POST /api/v1/mutual-exclusion-groups, PUT /api/v1/mutual-exclusion-groups/{group_id}, POST /api/v1/api-keys #957 A body value of the wrong type answers 422 at ["body", <field>] with pydantic's own type and msg, and nothing is written; it used to answer 500. That is holdout_percentage or traffic_allocation sent as an object or an array, or as null on a create (on an update null still means "not changed"), and scopes sent as false, true or a number ("type": "list_type"). scopes sent as an object is still read by its keys, as before: {} is no scopes. No message repeats the value sent. The OpenAPI document does not change.
POST /api/v1/holdout, PUT /api/v1/holdout/{holdout_id}, POST /api/v1/mutual-exclusion-groups, PUT /api/v1/mutual-exclusion-groups/{group_id} #957 holdout_percentage and traffic_allocation are checked for their type before their range. A string holding a number is read as that number, as for any other number field: "10" for holdout_percentage and "0.5" for traffic_allocation are accepted (201 on a create, 200 on an update) where they answered 500, and a string holding a number out of range ("50" for holdout_percentage, "2" for traffic_allocation) or no number ("abc") answers 422 where it answered 500. A number out of range, a holdout_percentage outside 1 to 20 (false included, read as 0) or a traffic_allocation outside 0 to 1, still answers 422, but the item is pydantic's own: "type": "greater_than_equal" or "less_than_equal", a msg such as Input should be less than or equal to 20, and the bound in ctx; it was "type": "value_error" with Value error, holdout_percentage must be between 1 and 20 or Value error, traffic_allocation must be between 0.0 and 1.0. true is still read as 1, and false as 0 for traffic_allocation. The OpenAPI document does not change.
PUT /api/v1/rollout-schedules/{schedule_id}, PUT /api/v1/rollout-schedules/stages/{stage_id} #1537 null for a schedule's name, max_percentage or status, or for a stage's name, stage_order, target_percentage or trigger_type, answers 422 at that field with a msg that names it, and nothing is written; it used to answer 500. null is still accepted for a field it clears, such as a schedule's min_stage_duration (#1086) or description, and a field left out keeps its value. The OpenAPI document does not change: the seven fields are still listed as nullable. See Rollout schedules.
POST /api/v1/tracking/track, POST /api/v1/tracking/batch, POST /api/v1/tracking/events #1085 Event metadata (properties on /events) larger than 16,384 bytes as compact JSON in UTF-8 is refused, where it was stored up to the 5 MiB body limit: /track answers 422 (Invalid event: properties not valid), /events answers 422 at ["body", "properties"] (or "metadata"), and /batch reports the entry in errors and stores the others. Depth (64 levels) is checked first. Nothing is stored for a refused event, and events already stored are not changed. Metadata of 16,384 bytes or fewer is stored as before. The OpenAPI document does not change. See Track Event.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/bandit/{experiment_id}, GET /api/v1/export/experiments, GET /api/v1/export/reports/overview, GET /api/v1/export/reports/experiments/{experiment_id} engine 1.11.0 A treatment significantly better than a control with no conversions is the metric's winning_variant_id, and on the primary metric the summary's has_winner, winning_variant_id and recommendation name it (SHIP_VARIANT, or CONTINUE_TESTING before the minimum sample). It used to be named nowhere, at any p-value, and the summary said "No statistically significant difference". Which side of the control a treatment is on is the sign of absolute_difference; relative_improvement_pct is still null against a control with no conversions. When every treatment is significantly worse than a control whose rate or mean is 0 (for a proportion only a lower-is-better metric can be), the recommendation is KEEP_CONTROL where it was CONTINUE_TESTING. The export's winner_variant and recommendation and the overview's experiments_with_winners follow. Every other result is unchanged. The engine version becomes 1.11.0, so /results serves no answer cached before the upgrade; the Bayesian and bandit operations change only in the OpenAPI engine_version default, the one change to the OpenAPI document.
GET /api/v1/experiments/, POST /api/v1/experiments/, GET/PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/start, POST /api/v1/experiments/{experiment_id}/pause, PUT /api/v1/experiments/{experiment_id}/schedule, POST /api/v1/experiments/{experiment_id}/complete, POST /api/v1/experiments/{experiment_id}/archive, POST /api/v1/experiments/{experiment_id}/clone #1545 Additive. Every one of these operations answers with an experiment that carries visual_config and design_etag, and variants that carry visual_changes: all three are null on an experiment that is not visual, which is every experiment stored before. POST /api/v1/experiments/ and PUT /api/v1/experiments/{experiment_id} accept visual_config and, on a variant, visual_changes; a request that sends neither is answered as before, and a PUT variant sent without visual_changes keeps the stored ones. POST /api/v1/experiments/ accepts metrics: [] when it sends visual_config: the schema's minItems on metrics is gone, and without visual_config an empty list answers the same 422 too_short as before. POST /api/v1/experiments/{experiment_id}/start takes an optional body, {"design_etag": ...}: no body, an empty body, null and {} start an experiment as before, and an unknown key is ignored. Only a visual draft needs the etag: without one it answers 400, and with another 409, and nothing is started. PUT /api/v1/experiments/{experiment_id}/schedule answers 400 to a start date on a visual draft. The OpenAPI document changes in these schemas and in the start operation's optional request body.
Every operation with a number field ("type": "number") in its request body or query #1742 A number field in a request body given "NaN", "Infinity", "-Infinity" or a number too large for a double such as "1e400" as a string, or a number query parameter given one of them, now answers 422 with "type": "finite_number" at that field, on signed-in routes and on the anonymous power calculator alike. These accepted one or more of them before: POST /api/v1/power/plan (runtime_days) and GET /api/v1/power/curve (mde), which answered 200; PUT /api/v1/bandit/{experiment_id}/weights (weights); POST /api/v1/experiments/ and PUT /api/v1/experiments/{experiment_id} (metrics[].expected_effect); POST /api/v1/llm-experiments/{experiment_id}/evaluate (business_metric_value); PUT /api/v1/llm-experiments/{experiment_id}/variants/{variant_id} (temperature, traffic_split); POST /api/v1/results/{experiment_id}/fdr-correction (p_values); POST /api/v1/safety/settings (default_metrics) and POST /api/v1/safety/feature-flags/{feature_flag_id}/config (metrics), in warning_threshold and critical_threshold; and POST /api/v1/ai/interpret/{experiment_id} (p_value, relative_improvement_pct). Where a field already refused such a value with a 422 (a range check, or the fixed text of GET /api/v1/ai/sample-size, GET /api/v1/experiments/analysis/sample-size, POST /api/v1/utils/utils/sample-size and the baseline_std of POST /api/v1/power/sample-size), the status is unchanged and the 422 now carries finite_number at the field. A field that takes only a JSON number, a warehouse run's confidence_level or a metric source's cap_value, keeps answering float_type to any string, these included. A tracking event's value keeps its own refusals, and a bare NaN or Infinity in a JSON body was already refused (#1630). The OpenAPI document does not change. See Number Fields.
GET /api/v1/results/{experiment_id} (with breakdown), GET /api/v1/results/{experiment_id}/balanced-groups (beta) engine 1.12.0 A breakdown's has_heterogeneous_effects is true less often: only when a test that the first treatment's difference from the control, in percentage points, is the same in every tested segment rejects at 1 minus the confidence level the results were computed at. It used to be true also when the lift varied widely between segments or changed sign, and when a chi-squared test of the converting users alone gave p < 0.05. hte_warning has new text, for a breakdown by device: "The first treatment's difference from the control varies between 'device' segments by more than chance usually produces. Treat this as a lead to confirm with a follow-up experiment, not as a result." No other operation serves the breakdown. Every other result is unchanged; an operation that reports engine_version reports 1.12.0. The engine version becomes 1.12.0, so /results serves no answer cached before the upgrade, and /balanced-groups is computed on every request. The OpenAPI document changes only in the engine_version defaults and the description of has_heterogeneous_effects, in both snapshots. See HTE Detection.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/export/variants, GET /api/v1/export/experiments, GET /api/v1/export/reports/overview, GET /api/v1/export/reports/experiments/{experiment_id}, GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/bandit/{experiment_id}, POST /api/v1/bandit/{experiment_id}/update, PUT /api/v1/bandit/{experiment_id}/weights #2041 (engine 1.13.0) A revenue, count, duration or custom metric's p_value comes from a permutation test of Welch's t statistic over each assigned user's value, twice the smaller tail, where it was Welch's t-test's, and its statistical_test_used is permutation_t_test, a new value. adjusted_p_value, is_significant, the metric's winning_variant_id and, on the primary metric, the summary's winner and recommendation follow it, so running and completed experiments can change their recommendation at the upgrade: in 2,000 A/A experiments with 600 users in the control and 5,400 in the treatment SHIP_VARIANT fell from 150 to 48, and with 5,400 and 600 KEEP_CONTROL fell from 159 to 49. A mean's is_significant no longer follows absolute_difference_ci, which is still Welch's, as is every other interval and estimate. The smallest p-value is 2 over the permutations plus one, 0.001 with one treatment, so a strong effect's recommendation_reason reads p=0.0010. A warehouse analysis of a mean keeps Welch's t-test, and analysis snapshots keep the engine version they were computed with. The engine version becomes 1.13.0, so /results serves no answer cached before the upgrade; the Bayesian and bandit operations change only in the OpenAPI engine_version default. The OpenAPI document changes in the engine_version defaults, the new StatisticalTest value and the descriptions of StatisticalTest, p_value, is_significant, statistical_test_used, absolute_difference_ci and MetricResult.analysis, in both snapshots. See Technical guide.
GET /api/v1/results/{experiment_id}, GET /api/v1/experiments/{experiment_id}/results, GET /api/v1/results/{experiment_id}/segments/{segment_id} (beta), GET /api/v1/results/{experiment_id}/bayesian, GET /api/v1/results/{experiment_id}/cuped (beta), GET /api/v1/results/{experiment_id}/balanced-groups (beta), GET /api/v1/bandit/{experiment_id}, POST /api/v1/bandit/{experiment_id}/update, PUT /api/v1/bandit/{experiment_id}/weights #1934 (engine 1.14.0) Additive. Each metric of /results, of its alias and of a saved segment's results carries conversion_window_hours, and each of its variants open_window_users. Both are null for a metric with no conversion window. A metric with a window counts only the events within that many hours of each user's assignment, in every result that reads it, and open_window_users is how many of the variant's assigned users had less than the full window. Without a window every answer is the one before, less the two keys and with engine_version 1.14.0, so the Bayesian, CUPED, balanced-groups and bandit operations change only in their engine_version, and /results serves no answer cached before the upgrade. The OpenAPI document changes in MetricResult and VariantResult, which gain the two properties, and in the four engine_version defaults, in both snapshots.
POST /api/v1/experiments/, GET /api/v1/experiments/, GET/PUT /api/v1/experiments/{experiment_id}, POST /api/v1/experiments/{experiment_id}/clone #1934 Additive. Each metric gains conversion_window_hours (beta): set on create or on a draft's PUT, a whole number of hours from 1 to 8760, it makes the metric count each user's events only within that many hours of their assignment (Conversion window). Every response carries it, null for a metric with no window, and a clone copies it. Anything else answers 422 at ["body", "metrics", i, "conversion_window_hours"] with Pydantic's own message: 0, -1 and 8761 with greater_than_equal or less_than_equal, and 1.5, true and a string such as "24" with int_type. Changing it after draft answers 400, as any change to metrics does. A PUT that sends metrics replaces them, so a metric sent without it no longer has one. A metric created without it has no window and is counted as before. The OpenAPI document changes in MetricBase and MetricResponse, which gain the property, in both snapshots.
POST /api/v1/auth/login, POST /api/v1/auth/token #1812 For an account with two-step sign-in on, the right password answers 200 with {"mfa_required": true, "mfa_token", "enrol": false, "expires_in": 300} and no access_token; the access token comes from POST /api/v1/auth/mfa/verify. For an account whose role LOCAL_AUTH_2FA_REQUIRED_ROLES names and that has not set it up, it answers {"mfa_required": true, "mfa_token", "enrol": true, "expires_in": 600} and no access_token; the access token comes from POST /api/v1/auth/mfa/enroll/confirm. Every other account gets the answer it got before. The OpenAPI document changes: each 200 answer is an anyOf that adds MfaRequiredResponse, and the descriptions say so. See Two-step sign-in.
GET /api/v1/admin/users, GET/PUT /api/v1/admin/users/{user_id}, GET /api/v1/users/, GET /api/v1/users/me, GET/PUT /api/v1/users/{user_id} #1812 Each user carries totp_enabled, whether the account has two-step sign-in on. The OpenAPI document changes: UserResponse gains the required totp_enabled.
POST /api/v1/feature-flags/, PUT/DELETE /api/v1/feature-flags/{flag_id}, POST /api/v1/feature-flags/{flag_id}/activate, POST /api/v1/feature-flags/{flag_id}/deactivate, POST /api/v1/feature-flags/{flag_id}/unarchive, POST /api/v1/feature-flags/{flag_id}/toggle, POST /api/v1/feature-flags/{flag_id}/enable, POST /api/v1/feature-flags/{flag_id}/disable, POST /api/v1/feature-flags/bulk-toggle #1042 A change is saved together with its audit-log entry, and for create, update and delete with its compliance event. When an entry cannot be written, nothing is saved and the operation answers 500 with the request ID; it used to keep the change and answer 2xx with no entry. Bulk toggle saves all of its changes or none: when they cannot be saved it answers 500, where it used to answer 200 and report flags as changed that were not saved. A change whose entries are written answers as before. The OpenAPI document changes only in the descriptions of toggle, enable, disable, delete and bulk toggle, and of the Compliance tag. See When an entry can be missing.
POST /api/v1/users/me/password #501 A change signs out every session of the account: every access token issued before it, the one that sent the request included, answers 401 from then on, and a sign-in that has not finished starts again. For an account that signs in with its password alone the operation answers 200 with what POST /api/v1/auth/login answers (access_token, token_type, expires_in and user), where it answered an empty 204; for an account with two-step sign-in on, or required for its role, it still answers 204. The answer with a token is recorded as a user_login audit entry. The OpenAPI document changes: the operation's description, and its 200 response, now the LoginResponse schema, beside a 204 response.
POST /api/v1/rollout-schedules/, PUT/DELETE /api/v1/rollout-schedules/{schedule_id}, POST /api/v1/rollout-schedules/{schedule_id}/activate, POST /api/v1/rollout-schedules/{schedule_id}/pause, POST /api/v1/rollout-schedules/{schedule_id}/cancel, POST /api/v1/rollout-schedules/{schedule_id}/stages, PUT/DELETE /api/v1/rollout-schedules/stages/{stage_id}, POST /api/v1/rollout-schedules/stages/{stage_id}/advance #1042 A schedule or stage change is saved together with its audit-log entry on the schedule's flag. When the entry cannot be written, nothing is saved and the operation answers 500 with its existing message; it used to keep the change and answer 2xx with no entry. A change whose entry is written answers as before. The OpenAPI document does not change. See When an entry can be missing.
POST /api/v1/tracking/alias (beta) #449 A new beta operation: it links an anonymous id to the known user id of the same person, and needs a server-side key (the sdk:ruleset scope, with an owner who can change feature flags) called from a backend. It answers 200 with the two ids and created (false when the link already existed), 409 when a rule refuses the link, and 422 for two equal ids, for exactly anonymous or anon in either field, and for an id missing, empty, over 255 characters or not storable. Its shape may still change. The OpenAPI documents gain the operation and its AliasRequest and AliasResponse schemas. See Link an Anonymous Id to a Known User Id.
POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch (beta), POST /api/v1/tracking/track, POST /api/v1/tracking/batch, POST /api/v1/tracking/events, GET /api/v1/tracking/assignments/{user_id}, POST /api/v1/tracking/visual (beta), POST /api/v1/tracking/split-url/assign (beta, full profile) #449 An id linked to another by POST /api/v1/tracking/alias is answered as its person: in each experiment the assignment stored first among the person's ids answers for every one of them, and an id with none of its own gets no second one. An event that names an experiment is stored under the id holding that assignment, tagged with its variant while the experiment runs, and its event_id is still kept per id as sent. The assignments list holds the person's assignments, one per experiment, each with user_id the id in the path. Every answer names the id that was sent, and an id never linked is answered and stored as before. The OpenAPI documents of these operations do not change. See How events count.
GET /api/v1/auth/me, POST /api/v1/auth/login, POST /api/v1/auth/token, POST /api/v1/auth/mfa/verify, POST /api/v1/auth/mfa/enroll/confirm, POST /api/v1/users/me/password #2067 The signed-in account's profile (what GET /api/v1/auth/me answers with local sign-in, and user in a sign-in answer) carries email and username as null for an account stored without one, with both keys always there. GET /api/v1/auth/me answered 500 for an account with no email address, no username or neither. The four sign-in operations, where they issue the access token, answered 500 for an account with no username. POST /api/v1/users/me/password answered 204 for an account with no email address or no username: one with no username that signs in with its password alone now gets 200 with a new access token, as POST /api/v1/auth/login answers, and one with no email address still gets 204. The profile of an account that has both is unchanged. The OpenAPI document changes only in UserMe: email and username become string or null, and stay required. The beta POST /api/v1/auth/sso/exchange (full profile) carries the same profile.
POST /api/v1/tracking/assign, POST /api/v1/tracking/assign/batch (beta), POST /api/v1/tracking/alias (beta), POST /api/v1/tracking/track, POST /api/v1/tracking/events, POST /api/v1/tracking/batch, GET /api/v1/tracking/assignments/{user_id}, POST /api/v1/tracking/visual (beta), POST /api/v1/tracking/visual/preview (beta), GET /api/v1/tracking/split-url/routes (beta, full profile), POST /api/v1/tracking/split-url/assign (beta, full profile) #2011 An API key belongs to one flag environment, and these operations run in production only. A key of staging or development answers 403 with the detail This API key belongs to the staging environment. Experiments and event tracking run in production only; use a production key. (or development), and nothing is written. Only POST /api/v1/api-keys with such an environment creates such a key: every key made without one is a production key, and a production key is answered as before. The OpenAPI documents of these operations do not change.
GET /api/v1/environments (beta), GET /api/v1/environments/{environment}/feature-flag-settings (beta), GET /api/v1/feature-flags/{flag_id}/environments (beta), GET/PUT /api/v1/feature-flags/{flag_id}/environments/{environment} (beta), POST /api/v1/feature-flags/{flag_id}/environments/{target}/promote (beta) #2011 New beta operations: a flag's settings in production, staging and development, and copying them from one into another. Production's are the flag's own, so a change to production through them is the one PUT /api/v1/feature-flags/{flag_id} makes. Their shapes may still change. The OpenAPI documents gain the operations and their schemas. See Flag environments.
POST /api/v1/feature-flags/bulk-toggle, GET /api/v1/feature-flags/, DELETE/PUT /api/v1/segments/{segment_id}, GET /api/v1/segments/{segment_id}/experiments #2011 These operations read a flag's staging and development settings, which only the beta operations above create. Archiving a flag turns it off there too. A flag that is on there is not stale. A segment those rules use is in use: the 409 and the list name the flag with environments, every environment whose rules use it. A flag with no such settings is answered as before. The OpenAPI document does not change.
POST /api/v1/api-keys, GET /api/v1/api-keys #2011 The create takes an optional environment, production (the default), staging or development, and answers the one it stored; the list names each key's. Any other value, null included, answers 422 at ["body", "environment"] with Input should be 'production', 'staging' or 'development'. mcp:read on a staging or development key answers 422 at ["body", "scopes"] with Value error, mcp:read needs a production key: the routes it opens read production only. Create the key for production, or without mcp:read. Neither refusal writes anything. No operation changes a key's environment. Who may create a key, and a key with sdk:ruleset, does not change. A create without environment makes a production key and is answered as before plus the field. 0.48.0 ignores environment: it makes a production key whatever it is sent and answers without the field, so check the one in the answer. The api_key_create and api_key_revoke audit entries record it. The OpenAPI document changes: APIKeyCreate gains the optional environment, and APIKeyCreated and APIKeyRead the required environment, in both snapshots.
GET /api/v1/metrics/summary, POST /api/v1/tracking/errors, POST /api/v1/tracking/errors/batch, GET /api/v1/safety/feature-flags/{feature_flag_id}/check #2011 An error with a staging or development key is stored and is in neither error_rate nor uncounted_error_count, nor in the safety check's two counts. A production key's is counted as before. The OpenAPI document changes in the first two operations' descriptions and those of MetricsSummary.error_rate and MetricsSummary.uncounted_error_count. See Which errors count.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/experiments/, PUT /api/v1/experiments/{experiment_id}, PUT /api/v1/feature-flags/{flag_id}/environments/{environment} (beta), POST /api/v1/feature-flags/{flag_id}/environments/{target}/promote (beta) #1836 A native semantic_version value that is a version followed by a newline answers 422 at ["body", "targeting_rules"], with Value error, <path>.value: not a version; use a version such as 1.2.3 or 1.2.3-beta.1, with no line break at the end. It used to be accepted, and the condition never held (under NOT it held for every user; a default_rule's conditions are not read). A request that resends such stored rules is refused too, and a promotion from environment settings that hold them is refused until they are fixed. Stored rules are evaluated as before, and python -m backend.scripts.check_targeting_rules lists them. The dashboard shape strips the value and is accepted as before. The OpenAPI document does not change.
POST /api/v1/feature-flags/, PUT /api/v1/feature-flags/{flag_id}, PUT /api/v1/feature-flags/{flag_id}/environments/{environment} (beta), POST /api/v1/feature-flags/{flag_id}/environments/{target}/promote (beta) #2179 A native rule's id or the default_rule's id longer than 255 characters answers 422 at ["body", "targeting_rules"], with Value error, rules[0].id: must be at most 255 characters (or default_rule.id), and nothing is saved. It used to be saved, and then, with a production key, every evaluation that reached that rule and GET /api/v1/feature-flags/user/{user_id} for each user it matched answered 500, because the id a production evaluation records holds at most 255 characters. An id of 255 characters is saved and evaluated as before; the dashboard shape's id is still 1 to 100 characters, and experiment rules are unaffected. A request that resends such stored rules is refused too, and a promotion from environment settings that hold them is refused until they are fixed. A flag stored with such an id before this release keeps answering 500 to those evaluations until its id is shortened: python -m backend.scripts.check_targeting_rules lists it, and a PUT that sends the rules with an id of at most 255 characters fixes it. The OpenAPI document does not change.
POST /api/v1/feature-flags/, GET /api/v1/feature-flags/, GET/PUT /api/v1/feature-flags/{flag_id}, POST /api/v1/feature-flags/{flag_id}/activate, POST /api/v1/feature-flags/{flag_id}/deactivate #2012 The request and response schemas gain split: what share of the users a string, number or json flag is on for gets each of 3 to 10 values, by whole-number weights that add up to 100. null, every existing flag's, means none, and a boolean flag's is always null. A targeting rule of such a flag may carry a value of its own. Anything else answers 422: a split at ["body", "split"] or at its entry (["body", "split", 2, "weight"]), a rule's value at ["body", "targeting_rules"]. A release older than 0.49.0 refuses both (422) and serves the on value.
GET/PUT /api/v1/feature-flags/{flag_id}/environments/{environment} (beta), GET /api/v1/feature-flags/{flag_id}/environments (beta), GET /api/v1/environments/{environment}/feature-flag-settings (beta), POST /api/v1/feature-flags/{flag_id}/environments/{target}/promote (beta) #2012 An environment's settings gain split, which the PUT sets, checked as on a flag update, and promotion copies with the other three.
GET/POST /api/v1/feature-flags/evaluate/{flag_key}, GET /api/v1/sdk/ruleset #2012 For a flag with a split or a rule's own value, value is the matched rule's own value, otherwise the split's for the user; enabled, reason and the answer's keys are as before. The ruleset lists such an active flag as "evaluation": "remote". The response schemas do not change.
GET/POST /api/v1/feature-flags/evaluate/{flag_key}, GET /api/v1/feature-flags/user/{user_id} #2176 A user_id longer than 255 characters answers 422 at ["query", "user_id"], ["body", "user_id"] or ["path", "user_id"] with the msg String should have at most 255 characters, whatever the key's environment, and nothing is evaluated or recorded. With a production key it answered 500, because the evaluation could not be recorded, except from /user when no flag was on, which answered 200 {}; with a staging or development key it answered 200. Characters are counted, not bytes: 255 é are answered as before. A user_id holding NUL (U+0000) answers 422 on both evaluate routes with the msg Value error, user_id must not contain NUL or unpaired surrogate characters, which does not repeat the value; it answered 500 with a production key and 200 with a staging or development key. Authentication still answers 401 first, and the 422 comes before the 404 for an unknown flag. An id of 1 to 255 characters is answered and recorded as before. The OpenAPI document changes only in the three parameters' maxLength of 255.
GET /api/v1/results/{experiment_id}/daily, GET /api/v1/experiments/{experiment_id}/daily-results #2205 Without metric_id, /daily answers for the metric GET /api/v1/results/{experiment_id} lists first: the primary, or the first by name when none is marked primary. It used to answer for the first metric the database returned, which need not be the primary, so the Daily Trends chart on the results page could show a different metric from the page's summary. /daily-results lists each day's metrics in that same order, with the same entries. With metric_id, both answer as before. The OpenAPI document does not change.
GET /api/v1/export/experiments, GET /api/v1/export/variants, GET /api/v1/export/feature-flags #2245 /experiments and /variants list the experiments by created_at, then id, and /feature-flags lists the flags the same way. The rows used to come in the order the database read them, which an update to a row or a new query plan could change, so two exports of the same data could list them in a different order. The OpenAPI document does not change.
GET /api/v1/experiments/{experiment_id}/daily-results, GET /api/v1/experiments/{experiment_id}/segmented-results/{segment_by} #2246 With CACHE_ENABLED on, each answer is cached for an hour under a key that names the statistics engine version, so after an upgrade to another engine version no answer the earlier engine computed is served, nor one cached under the earlier keys, which named no version. One used to be served for up to an hour. The OpenAPI document does not change.
GET /api/v1/metrics/summary, GET /api/v1/metrics/aggregated, GET /api/v1/metrics/errors, POST /api/v1/metrics/aggregate 0.49.0 These operations require an active account: an inactive one answers 400 Inactive user on all four. With local sign-in it already did; with Cognito sign-in, an inactive account linked to its Cognito user was answered as an active one. Only a superuser may start an aggregation: POST /api/v1/metrics/aggregate answers 403 Not enough permissions to every other account, ADMIN included, where it answered every role. The three reads still answer every active account, whatever its role. The OpenAPI document does not change.

Deprecated operations

A deprecated operation keeps its URL, shape and behaviour. It carries "deprecated": true in the snapshots (deprecated=True on the route decorator), its summary ends in "(deprecated)", and its description says why it is deprecated. Marking a stable operation deprecated, or rewording its description, changes its operation object, so it is a change to a stable route under the rule above: regenerate with make openapi and name the operation in the pull request. Removing a deprecated operation later is a breaking change. The API sends no Deprecation or Sunset response header; the OpenAPI document and this page are where a deprecation is declared.

Removed operations

A removed operation answers 404 and is absent from both snapshots. Removing one is a breaking change.

Operation Deprecated by Removed in Use instead
GET /api/v1/edge/bootstrap #226 the release after 0.17.0 (#737) GET /api/v1/sdk/ruleset (beta; an API key with the sdk:ruleset scope) for server-side local evaluation, or GET /api/v1/feature-flags/evaluate/{flag_key} for one flag; for experiments, POST /api/v1/tracking/assign
GET /api/v1/openfeature/flags #241 the release after 0.17.0 (#737) GET /api/v1/feature-flags/evaluate/{flag_key}, which both OpenFeature providers call; GET /api/v1/sdk/ruleset for server-side local evaluation
POST /api/v1/wizard/drafts, GET /api/v1/wizard/drafts, GET /api/v1/wizard/drafts/{draft_id}, PUT /api/v1/wizard/drafts/{draft_id}/step, POST /api/v1/wizard/drafts/{draft_id}/submit, POST /api/v1/wizard/validate #530 the release after 0.47.0 (#537) POST /api/v1/experiments/, which the dashboard's guided setup sends, to create the experiment as a draft; GET /api/v1/experiments/analysis/sample-size for the sample-size estimate

Beta numbers on a stable route

One analysis carries analysis_status: "beta" while staying x-stability: stable: the sequential analysis. GET /api/v1/results/{id}/sequential serves it, and GET /api/v1/results/{id} and GET /api/v1/experiments/{id}/results embed the same block as sequential_testing (#922). Its shape is settled (dashboards read it) and the fixes to its numbers (#231, #854) change values, not fields, so the two fields were added to it optionally. A fix that changes its numbers gets a row in the table of changed stable operations above naming all three operations, and bumps ENGINE_VERSION (backend/app/core/stats_engine.py): the results routes cache their answer under a key that includes it, so without the bump the embedded copy is served with the old numbers for up to 24 hours.

Profiles

The core snapshot is the public promise: it must not change with the set of installed modules. That is why the statistics (Bayesian, CUPED, sequential testing) are core and not a module — a results response whose shape depended on an optional module could not have one stable document (see the manifest, modules-manifest.txt, "DELIBERATELY NOT IN THIS MANIFEST"). The three routes that exist in both profiles but answer 501 in the core profile without the module body (/compliance/reports/{standard}, /compliance/export, /experiments/{id}/split-url/preview) are in the core snapshot, because their URL and shape are.