Package ai.shipeasy.admin.api
Class ExperimentsApi
java.lang.Object
ai.shipeasy.admin.api.ExperimentsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateExperiment(CreateExperimentRequest createExperimentRequest, String xProjectId) Create an experiment Creates a new experiment in `draft` status.okhttp3.CallcreateExperimentAsync(CreateExperimentRequest createExperimentRequest, String xProjectId, ApiCallback<CreateExperimentResponse> _callback) Create an experiment (asynchronously) Creates a new experiment in `draft` status.okhttp3.CallcreateExperimentCall(CreateExperimentRequest createExperimentRequest, String xProjectId, ApiCallback _callback) Build call for createExperimentcreateExperimentWithHttpInfo(CreateExperimentRequest createExperimentRequest, String xProjectId) Create an experiment Creates a new experiment in `draft` status.deleteExperiment(String id, String xProjectId) Delete an experiment Archives the experiment (soft-delete via status transition).okhttp3.CalldeleteExperimentAsync(String id, String xProjectId, ApiCallback<DeleteExperimentResponse> _callback) Delete an experiment (asynchronously) Archives the experiment (soft-delete via status transition).okhttp3.CalldeleteExperimentCall(String id, String xProjectId, ApiCallback _callback) Build call for deleteExperimentdeleteExperimentWithHttpInfo(String id, String xProjectId) Delete an experiment Archives the experiment (soft-delete via status transition).getExperiment(String id, String xProjectId) Get one experiment Returns the full experiment row including groups, params, allocation, and lifecycle timestamps.okhttp3.CallgetExperimentAsync(String id, String xProjectId, ApiCallback<GetExperimentResponse> _callback) Get one experiment (asynchronously) Returns the full experiment row including groups, params, allocation, and lifecycle timestamps.okhttp3.CallgetExperimentCall(String id, String xProjectId, ApiCallback _callback) Build call for getExperimentgetExperimentResults(String id, String xProjectId) Get analysis results Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs.okhttp3.CallgetExperimentResultsAsync(String id, String xProjectId, ApiCallback<GetExperimentResultsResponse> _callback) Get analysis results (asynchronously) Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs.okhttp3.CallgetExperimentResultsCall(String id, String xProjectId, ApiCallback _callback) Build call for getExperimentResultsgetExperimentResultsWithHttpInfo(String id, String xProjectId) Get analysis results Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs.getExperimentTimeseries(String id, String xProjectId, String metric) Get analysis timeseries Same row shape as `/results`, but returns every daily slice rather than the latest.okhttp3.CallgetExperimentTimeseriesAsync(String id, String xProjectId, String metric, ApiCallback<GetExperimentTimeseriesResponse> _callback) Get analysis timeseries (asynchronously) Same row shape as `/results`, but returns every daily slice rather than the latest.okhttp3.CallgetExperimentTimeseriesCall(String id, String xProjectId, String metric, ApiCallback _callback) Build call for getExperimentTimeseriesgetExperimentTimeseriesWithHttpInfo(String id, String xProjectId, String metric) Get analysis timeseries Same row shape as `/results`, but returns every daily slice rather than the latest.getExperimentWithHttpInfo(String id, String xProjectId) Get one experiment Returns the full experiment row including groups, params, allocation, and lifecycle timestamps.intList experiments Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`.okhttp3.CalllistExperimentsAsync(String xProjectId, Integer limit, String cursor, String status, String q, ApiCallback<ListExperimentsResponse> _callback) List experiments (asynchronously) Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`.okhttp3.CalllistExperimentsCall(String xProjectId, Integer limit, String cursor, String status, String q, ApiCallback _callback) Build call for listExperimentslistExperimentsWithHttpInfo(String xProjectId, Integer limit, String cursor, String status, String q) List experiments Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`.reanalyzeExperiment(String id, String xProjectId) Re-queue analysis Requeues the daily analysis pass for this experiment outside the normal cron cadence.okhttp3.CallreanalyzeExperimentAsync(String id, String xProjectId, ApiCallback<ReanalyzeExperimentResponse> _callback) Re-queue analysis (asynchronously) Requeues the daily analysis pass for this experiment outside the normal cron cadence.okhttp3.CallreanalyzeExperimentCall(String id, String xProjectId, ApiCallback _callback) Build call for reanalyzeExperimentreanalyzeExperimentWithHttpInfo(String id, String xProjectId) Re-queue analysis Requeues the daily analysis pass for this experiment outside the normal cron cadence.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) setExperimentMetrics(String id, SetExperimentMetricsRequest setExperimentMetricsRequest, String xProjectId) Attach metrics Replaces the experiment's metric attachments wholesale.okhttp3.CallsetExperimentMetricsAsync(String id, SetExperimentMetricsRequest setExperimentMetricsRequest, String xProjectId, ApiCallback<SetExperimentMetricsResponse> _callback) Attach metrics (asynchronously) Replaces the experiment's metric attachments wholesale.okhttp3.CallsetExperimentMetricsCall(String id, SetExperimentMetricsRequest setExperimentMetricsRequest, String xProjectId, ApiCallback _callback) Build call for setExperimentMetricssetExperimentMetricsWithHttpInfo(String id, SetExperimentMetricsRequest setExperimentMetricsRequest, String xProjectId) Attach metrics Replaces the experiment's metric attachments wholesale.setExperimentStatus(String id, SetExperimentStatusRequest setExperimentStatusRequest, String xProjectId) Transition experiment status Drives the experiment lifecycle.okhttp3.CallsetExperimentStatusAsync(String id, SetExperimentStatusRequest setExperimentStatusRequest, String xProjectId, ApiCallback<SetExperimentStatusResponse> _callback) Transition experiment status (asynchronously) Drives the experiment lifecycle.okhttp3.CallsetExperimentStatusCall(String id, SetExperimentStatusRequest setExperimentStatusRequest, String xProjectId, ApiCallback _callback) Build call for setExperimentStatussetExperimentStatusWithHttpInfo(String id, SetExperimentStatusRequest setExperimentStatusRequest, String xProjectId) Transition experiment status Drives the experiment lifecycle.voidsetHostIndex(int hostIndex) updateExperiment(String id, UpdateExperimentRequest updateExperimentRequest, String xProjectId) Update an experiment Partial update.okhttp3.CallupdateExperimentAsync(String id, UpdateExperimentRequest updateExperimentRequest, String xProjectId, ApiCallback<UpdateExperimentResponse> _callback) Update an experiment (asynchronously) Partial update.okhttp3.CallupdateExperimentCall(String id, UpdateExperimentRequest updateExperimentRequest, String xProjectId, ApiCallback _callback) Build call for updateExperimentupdateExperimentWithHttpInfo(String id, UpdateExperimentRequest updateExperimentRequest, String xProjectId) Update an experiment Partial update.
-
Constructor Details
-
ExperimentsApi
public ExperimentsApi() -
ExperimentsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createExperimentCall
public okhttp3.Call createExperimentCall(@Nonnull CreateExperimentRequest createExperimentRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for createExperiment- Parameters:
createExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createExperiment
public CreateExperimentResponse createExperiment(@Nonnull CreateExperimentRequest createExperimentRequest, @Nullable String xProjectId) throws ApiException Create an experiment Creates a new experiment in `draft` status. `name`, `universe`, and `groups` are required; everything else has sensible defaults. Returns `409` if `name` already exists, `422` if the named universe doesn't exist, `403` if a plan-gated option is set (`sequential_testing`, custom `significance_threshold`) on a plan that doesn't include it. **Use cases** - **Minimal 50/50** — `name` + `universe` + two equal-weight groups. - **Targeted rollout** — supply `targeting_gate` to restrict the eligible audience and `allocation_pct` to enrol a slice of it. - **Multivariant** — three or more groups with weights summing to 10000. - **Sequential testing** — `sequential_testing: true` for Premium plans.- Parameters:
createExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- CreateExperimentResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExperimentWithHttpInfo
public ApiResponse<CreateExperimentResponse> createExperimentWithHttpInfo(@Nonnull CreateExperimentRequest createExperimentRequest, @Nullable String xProjectId) throws ApiException Create an experiment Creates a new experiment in `draft` status. `name`, `universe`, and `groups` are required; everything else has sensible defaults. Returns `409` if `name` already exists, `422` if the named universe doesn't exist, `403` if a plan-gated option is set (`sequential_testing`, custom `significance_threshold`) on a plan that doesn't include it. **Use cases** - **Minimal 50/50** — `name` + `universe` + two equal-weight groups. - **Targeted rollout** — supply `targeting_gate` to restrict the eligible audience and `allocation_pct` to enrol a slice of it. - **Multivariant** — three or more groups with weights summing to 10000. - **Sequential testing** — `sequential_testing: true` for Premium plans.- Parameters:
createExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<CreateExperimentResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExperimentAsync
public okhttp3.Call createExperimentAsync(@Nonnull CreateExperimentRequest createExperimentRequest, @Nullable String xProjectId, ApiCallback<CreateExperimentResponse> _callback) throws ApiException Create an experiment (asynchronously) Creates a new experiment in `draft` status. `name`, `universe`, and `groups` are required; everything else has sensible defaults. Returns `409` if `name` already exists, `422` if the named universe doesn't exist, `403` if a plan-gated option is set (`sequential_testing`, custom `significance_threshold`) on a plan that doesn't include it. **Use cases** - **Minimal 50/50** — `name` + `universe` + two equal-weight groups. - **Targeted rollout** — supply `targeting_gate` to restrict the eligible audience and `allocation_pct` to enrol a slice of it. - **Multivariant** — three or more groups with weights summing to 10000. - **Sequential testing** — `sequential_testing: true` for Premium plans.- Parameters:
createExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
deleteExperimentCall
public okhttp3.Call deleteExperimentCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for deleteExperiment- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteExperiment
public DeleteExperimentResponse deleteExperiment(@Nonnull String id, @Nullable String xProjectId) throws ApiException Delete an experiment Archives the experiment (soft-delete via status transition). Returns `409` if the experiment is still `running` — stop it first. **Use case:** Tear down an experiment after the analysis is signed off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- DeleteExperimentResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteExperimentWithHttpInfo
public ApiResponse<DeleteExperimentResponse> deleteExperimentWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Delete an experiment Archives the experiment (soft-delete via status transition). Returns `409` if the experiment is still `running` — stop it first. **Use case:** Tear down an experiment after the analysis is signed off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<DeleteExperimentResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteExperimentAsync
public okhttp3.Call deleteExperimentAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteExperimentResponse> _callback) throws ApiException Delete an experiment (asynchronously) Archives the experiment (soft-delete via status transition). Returns `409` if the experiment is still `running` — stop it first. **Use case:** Tear down an experiment after the analysis is signed off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getExperimentCall
public okhttp3.Call getExperimentCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for getExperiment- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getExperiment
public GetExperimentResponse getExperiment(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get one experiment Returns the full experiment row including groups, params, allocation, and lifecycle timestamps. **Use case:** Fetch one experiment to render the detail page or to inspect its current allocation and group weights.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- GetExperimentResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentWithHttpInfo
public ApiResponse<GetExperimentResponse> getExperimentWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get one experiment Returns the full experiment row including groups, params, allocation, and lifecycle timestamps. **Use case:** Fetch one experiment to render the detail page or to inspect its current allocation and group weights.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<GetExperimentResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentAsync
public okhttp3.Call getExperimentAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<GetExperimentResponse> _callback) throws ApiException Get one experiment (asynchronously) Returns the full experiment row including groups, params, allocation, and lifecycle timestamps. **Use case:** Fetch one experiment to render the detail page or to inspect its current allocation and group weights.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getExperimentResultsCall
public okhttp3.Call getExperimentResultsCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for getExperimentResults- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getExperimentResults
public GetExperimentResultsResponse getExperimentResults(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get analysis results Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs. control, p-value, and a sample-ratio mismatch flag. **Use case:** Render the results table on the experiment detail page or drive an automated decision once a `goal` metric reaches significance.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- GetExperimentResultsResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentResultsWithHttpInfo
public ApiResponse<GetExperimentResultsResponse> getExperimentResultsWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Get analysis results Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs. control, p-value, and a sample-ratio mismatch flag. **Use case:** Render the results table on the experiment detail page or drive an automated decision once a `goal` metric reaches significance.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<GetExperimentResultsResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentResultsAsync
public okhttp3.Call getExperimentResultsAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<GetExperimentResultsResponse> _callback) throws ApiException Get analysis results (asynchronously) Returns the latest analysis output for the experiment — one row per metric/group/day, including sample size, mean, % delta vs. control, p-value, and a sample-ratio mismatch flag. **Use case:** Render the results table on the experiment detail page or drive an automated decision once a `goal` metric reaches significance.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getExperimentTimeseriesCall
public okhttp3.Call getExperimentTimeseriesCall(@Nonnull String id, @Nullable String xProjectId, @Nullable String metric, ApiCallback _callback) throws ApiException Build call for getExperimentTimeseries- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)metric- Optional metric name to filter the series. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getExperimentTimeseries
public GetExperimentTimeseriesResponse getExperimentTimeseries(@Nonnull String id, @Nullable String xProjectId, @Nullable String metric) throws ApiException Get analysis timeseries Same row shape as `/results`, but returns every daily slice rather than the latest. Filter to a single metric with the `metric` query parameter. **Use case:** Drive a chart of metric movement over the experiment runtime, or sanity-check the lift is monotonic before deciding.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)metric- Optional metric name to filter the series. (optional)- Returns:
- GetExperimentTimeseriesResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentTimeseriesWithHttpInfo
public ApiResponse<GetExperimentTimeseriesResponse> getExperimentTimeseriesWithHttpInfo(@Nonnull String id, @Nullable String xProjectId, @Nullable String metric) throws ApiException Get analysis timeseries Same row shape as `/results`, but returns every daily slice rather than the latest. Filter to a single metric with the `metric` query parameter. **Use case:** Drive a chart of metric movement over the experiment runtime, or sanity-check the lift is monotonic before deciding.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)metric- Optional metric name to filter the series. (optional)- Returns:
- ApiResponse<GetExperimentTimeseriesResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getExperimentTimeseriesAsync
public okhttp3.Call getExperimentTimeseriesAsync(@Nonnull String id, @Nullable String xProjectId, @Nullable String metric, ApiCallback<GetExperimentTimeseriesResponse> _callback) throws ApiException Get analysis timeseries (asynchronously) Same row shape as `/results`, but returns every daily slice rather than the latest. Filter to a single metric with the `metric` query parameter. **Use case:** Drive a chart of metric movement over the experiment runtime, or sanity-check the lift is monotonic before deciding.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)metric- Optional metric name to filter the series. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listExperimentsCall
public okhttp3.Call listExperimentsCall(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String status, @Nullable String q, ApiCallback _callback) throws ApiException Build call for listExperiments- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)status- Filter by lifecycle status. Pass `archived` to return the archive tab; any other value (or omitting it) returns the non-archived experiments. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listExperiments
public ListExperimentsResponse listExperiments(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String status, @Nullable String q) throws ApiException List experiments Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every active experiment in the project — e.g. render an overview dashboard or drive a CI check that no experiment has been running past its `min_runtime_days`.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)status- Filter by lifecycle status. Pass `archived` to return the archive tab; any other value (or omitting it) returns the non-archived experiments. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- ListExperimentsResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listExperimentsWithHttpInfo
public ApiResponse<ListExperimentsResponse> listExperimentsWithHttpInfo(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String status, @Nullable String q) throws ApiException List experiments Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every active experiment in the project — e.g. render an overview dashboard or drive a CI check that no experiment has been running past its `min_runtime_days`.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)status- Filter by lifecycle status. Pass `archived` to return the archive tab; any other value (or omitting it) returns the non-archived experiments. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- ApiResponse<ListExperimentsResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listExperimentsAsync
public okhttp3.Call listExperimentsAsync(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String status, @Nullable String q, ApiCallback<ListExperimentsResponse> _callback) throws ApiException List experiments (asynchronously) Returns a single page of non-archived experiments ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every active experiment in the project — e.g. render an overview dashboard or drive a CI check that no experiment has been running past its `min_runtime_days`.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)status- Filter by lifecycle status. Pass `archived` to return the archive tab; any other value (or omitting it) returns the non-archived experiments. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
reanalyzeExperimentCall
public okhttp3.Call reanalyzeExperimentCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for reanalyzeExperiment- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
reanalyzeExperiment
public ReanalyzeExperimentResponse reanalyzeExperiment(@Nonnull String id, @Nullable String xProjectId) throws ApiException Re-queue analysis Requeues the daily analysis pass for this experiment outside the normal cron cadence. Useful after attaching a new metric or correcting an event taxonomy. The job runs asynchronously. **Use case:** Force-refresh results after wiring up a new metric without waiting for the next nightly cron tick.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ReanalyzeExperimentResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
reanalyzeExperimentWithHttpInfo
public ApiResponse<ReanalyzeExperimentResponse> reanalyzeExperimentWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Re-queue analysis Requeues the daily analysis pass for this experiment outside the normal cron cadence. Useful after attaching a new metric or correcting an event taxonomy. The job runs asynchronously. **Use case:** Force-refresh results after wiring up a new metric without waiting for the next nightly cron tick.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<ReanalyzeExperimentResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
reanalyzeExperimentAsync
public okhttp3.Call reanalyzeExperimentAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<ReanalyzeExperimentResponse> _callback) throws ApiException Re-queue analysis (asynchronously) Requeues the daily analysis pass for this experiment outside the normal cron cadence. Useful after attaching a new metric or correcting an event taxonomy. The job runs asynchronously. **Use case:** Force-refresh results after wiring up a new metric without waiting for the next nightly cron tick.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
setExperimentMetricsCall
public okhttp3.Call setExperimentMetricsCall(@Nonnull String id, @Nonnull SetExperimentMetricsRequest setExperimentMetricsRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for setExperimentMetrics- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentMetricsRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
setExperimentMetrics
public SetExperimentMetricsResponse setExperimentMetrics(@Nonnull String id, @Nonnull SetExperimentMetricsRequest setExperimentMetricsRequest, @Nullable String xProjectId) throws ApiException Attach metrics Replaces the experiment's metric attachments wholesale. Each entry pairs an existing `metric_id` with a `role` (`goal` / `guardrail` / `secondary`). Returns `422` if any `metric_id` doesn't exist in the project. Pass `{ metrics: [] }` to detach everything. **Use cases** - **Standard setup** — one `goal`, one or two `guardrail`, optional `secondary` metrics for diagnostics. - **Detach all** — send `{ \"metrics\": [] }` before archiving.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentMetricsRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- SetExperimentMetricsResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
setExperimentMetricsWithHttpInfo
public ApiResponse<SetExperimentMetricsResponse> setExperimentMetricsWithHttpInfo(@Nonnull String id, @Nonnull SetExperimentMetricsRequest setExperimentMetricsRequest, @Nullable String xProjectId) throws ApiException Attach metrics Replaces the experiment's metric attachments wholesale. Each entry pairs an existing `metric_id` with a `role` (`goal` / `guardrail` / `secondary`). Returns `422` if any `metric_id` doesn't exist in the project. Pass `{ metrics: [] }` to detach everything. **Use cases** - **Standard setup** — one `goal`, one or two `guardrail`, optional `secondary` metrics for diagnostics. - **Detach all** — send `{ \"metrics\": [] }` before archiving.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentMetricsRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<SetExperimentMetricsResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
setExperimentMetricsAsync
public okhttp3.Call setExperimentMetricsAsync(@Nonnull String id, @Nonnull SetExperimentMetricsRequest setExperimentMetricsRequest, @Nullable String xProjectId, ApiCallback<SetExperimentMetricsResponse> _callback) throws ApiException Attach metrics (asynchronously) Replaces the experiment's metric attachments wholesale. Each entry pairs an existing `metric_id` with a `role` (`goal` / `guardrail` / `secondary`). Returns `422` if any `metric_id` doesn't exist in the project. Pass `{ metrics: [] }` to detach everything. **Use cases** - **Standard setup** — one `goal`, one or two `guardrail`, optional `secondary` metrics for diagnostics. - **Detach all** — send `{ \"metrics\": [] }` before archiving.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentMetricsRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
setExperimentStatusCall
public okhttp3.Call setExperimentStatusCall(@Nonnull String id, @Nonnull SetExperimentStatusRequest setExperimentStatusRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for setExperimentStatus- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentStatusRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
setExperimentStatus
public SetExperimentStatusResponse setExperimentStatus(@Nonnull String id, @Nonnull SetExperimentStatusRequest setExperimentStatusRequest, @Nullable String xProjectId) throws ApiException Transition experiment status Drives the experiment lifecycle. Allowed transitions: - `draft → running` — starts allocation. Bumps the `startedAt` timestamp. - `running → stopped` — halts allocation. Existing exposures stay in the dataset. - `stopped → archived` — soft-delete. - `draft → archived` — discard an unstarted experiment. - `archived → draft` — restore a soft-deleted experiment so it can be re-completed and started. Allowed only if it never started; one that already ran must be cloned instead. Restarting an `archived` experiment directly is not allowed — restore it to `draft` first. Returns `409` on illegal transitions and `429` if the plan's `experiments_running` limit is exceeded on `→ running`. **Use cases** - **Start** — `{ \"status\": \"running\" }` after wiring up the SDK and verifying targeting on staging. - **Stop** — `{ \"status\": \"stopped\" }` once the experiment hits its `min_runtime_days` and conclusive results land. - **Archive** — `{ \"status\": \"archived\" }` to soft-delete after sign-off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentStatusRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- SetExperimentStatusResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
setExperimentStatusWithHttpInfo
public ApiResponse<SetExperimentStatusResponse> setExperimentStatusWithHttpInfo(@Nonnull String id, @Nonnull SetExperimentStatusRequest setExperimentStatusRequest, @Nullable String xProjectId) throws ApiException Transition experiment status Drives the experiment lifecycle. Allowed transitions: - `draft → running` — starts allocation. Bumps the `startedAt` timestamp. - `running → stopped` — halts allocation. Existing exposures stay in the dataset. - `stopped → archived` — soft-delete. - `draft → archived` — discard an unstarted experiment. - `archived → draft` — restore a soft-deleted experiment so it can be re-completed and started. Allowed only if it never started; one that already ran must be cloned instead. Restarting an `archived` experiment directly is not allowed — restore it to `draft` first. Returns `409` on illegal transitions and `429` if the plan's `experiments_running` limit is exceeded on `→ running`. **Use cases** - **Start** — `{ \"status\": \"running\" }` after wiring up the SDK and verifying targeting on staging. - **Stop** — `{ \"status\": \"stopped\" }` once the experiment hits its `min_runtime_days` and conclusive results land. - **Archive** — `{ \"status\": \"archived\" }` to soft-delete after sign-off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentStatusRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<SetExperimentStatusResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
setExperimentStatusAsync
public okhttp3.Call setExperimentStatusAsync(@Nonnull String id, @Nonnull SetExperimentStatusRequest setExperimentStatusRequest, @Nullable String xProjectId, ApiCallback<SetExperimentStatusResponse> _callback) throws ApiException Transition experiment status (asynchronously) Drives the experiment lifecycle. Allowed transitions: - `draft → running` — starts allocation. Bumps the `startedAt` timestamp. - `running → stopped` — halts allocation. Existing exposures stay in the dataset. - `stopped → archived` — soft-delete. - `draft → archived` — discard an unstarted experiment. - `archived → draft` — restore a soft-deleted experiment so it can be re-completed and started. Allowed only if it never started; one that already ran must be cloned instead. Restarting an `archived` experiment directly is not allowed — restore it to `draft` first. Returns `409` on illegal transitions and `429` if the plan's `experiments_running` limit is exceeded on `→ running`. **Use cases** - **Start** — `{ \"status\": \"running\" }` after wiring up the SDK and verifying targeting on staging. - **Stop** — `{ \"status\": \"stopped\" }` once the experiment hits its `min_runtime_days` and conclusive results land. - **Archive** — `{ \"status\": \"archived\" }` to soft-delete after sign-off.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)setExperimentStatusRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateExperimentCall
public okhttp3.Call updateExperimentCall(@Nonnull String id, @Nonnull UpdateExperimentRequest updateExperimentRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for updateExperiment- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)updateExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateExperiment
public UpdateExperimentResponse updateExperiment(@Nonnull String id, @Nonnull UpdateExperimentRequest updateExperimentRequest, @Nullable String xProjectId) throws ApiException Update an experiment Partial update. `allocation_pct`, `groups`, `salt`, `universe`, `params` are **immutable while running** — returns `409` if you try. Stop the experiment first. Editing `groups` while in `draft` is fine; weights must still sum to 10000. **Use cases** - **Update metadata** — `description`, `tag`, `targeting_gate` editable any time. - **Ramp before launch** — set `allocation_pct` while still in `draft`. - **Tighten significance** — `significance_threshold` (Pro+). - **Rewire groups** — replace `groups` wholesale while in `draft`; immutable once running.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)updateExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- UpdateExperimentResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateExperimentWithHttpInfo
public ApiResponse<UpdateExperimentResponse> updateExperimentWithHttpInfo(@Nonnull String id, @Nonnull UpdateExperimentRequest updateExperimentRequest, @Nullable String xProjectId) throws ApiException Update an experiment Partial update. `allocation_pct`, `groups`, `salt`, `universe`, `params` are **immutable while running** — returns `409` if you try. Stop the experiment first. Editing `groups` while in `draft` is fine; weights must still sum to 10000. **Use cases** - **Update metadata** — `description`, `tag`, `targeting_gate` editable any time. - **Ramp before launch** — set `allocation_pct` while still in `draft`. - **Tighten significance** — `significance_threshold` (Pro+). - **Rewire groups** — replace `groups` wholesale while in `draft`; immutable once running.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)updateExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<UpdateExperimentResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateExperimentAsync
public okhttp3.Call updateExperimentAsync(@Nonnull String id, @Nonnull UpdateExperimentRequest updateExperimentRequest, @Nullable String xProjectId, ApiCallback<UpdateExperimentResponse> _callback) throws ApiException Update an experiment (asynchronously) Partial update. `allocation_pct`, `groups`, `salt`, `universe`, `params` are **immutable while running** — returns `409` if you try. Stop the experiment first. Editing `groups` while in `draft` is fine; weights must still sum to 10000. **Use cases** - **Update metadata** — `description`, `tag`, `targeting_gate` editable any time. - **Ramp before launch** — set `allocation_pct` while still in `draft`. - **Tighten significance** — `significance_threshold` (Pro+). - **Rewire groups** — replace `groups` wholesale while in `draft`; immutable once running.- Parameters:
id- Stable opaque experiment id (`exp_…`) or the experiment's `name`. (required)updateExperimentRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-