Class UniversesApi

java.lang.Object
ai.shipeasy.admin.api.UniversesApi

public class UniversesApi extends Object
  • Constructor Details

    • UniversesApi

      public UniversesApi()
    • UniversesApi

      public UniversesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • createUniverseCall

      public okhttp3.Call createUniverseCall(@Nonnull CreateUniverseRequest createUniverseRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for createUniverse
      Parameters:
      createUniverseRequest - (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
    • createUniverse

      public CreateUniverseResponse createUniverse(@Nonnull CreateUniverseRequest createUniverseRequest, @Nullable String xProjectId) throws ApiException
      Create a universe Creates a new universe. Only `name` is required — `unit_type` defaults to `user_id` and `holdout_range` defaults to `null` (no holdout). Returns `409` if `name` already exists in the project. Returns `403` if you supply `holdout_range` on a plan below Pro. **Use cases** - **Default universe** — `{ \"name\": \"primary_users\" }`. Per-user randomisation, no holdout. - **Reserved holdout** — supply `holdout_range` to carve out a measurement slice excluded from all experiments. - **Account-level** — `unit_type: 'account_id'` so multi-seat accounts see one consistent variant.
      Parameters:
      createUniverseRequest - (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:
      CreateUniverseResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createUniverseWithHttpInfo

      public ApiResponse<CreateUniverseResponse> createUniverseWithHttpInfo(@Nonnull CreateUniverseRequest createUniverseRequest, @Nullable String xProjectId) throws ApiException
      Create a universe Creates a new universe. Only `name` is required — `unit_type` defaults to `user_id` and `holdout_range` defaults to `null` (no holdout). Returns `409` if `name` already exists in the project. Returns `403` if you supply `holdout_range` on a plan below Pro. **Use cases** - **Default universe** — `{ \"name\": \"primary_users\" }`. Per-user randomisation, no holdout. - **Reserved holdout** — supply `holdout_range` to carve out a measurement slice excluded from all experiments. - **Account-level** — `unit_type: 'account_id'` so multi-seat accounts see one consistent variant.
      Parameters:
      createUniverseRequest - (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<CreateUniverseResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createUniverseAsync

      public okhttp3.Call createUniverseAsync(@Nonnull CreateUniverseRequest createUniverseRequest, @Nullable String xProjectId, ApiCallback<CreateUniverseResponse> _callback) throws ApiException
      Create a universe (asynchronously) Creates a new universe. Only `name` is required — `unit_type` defaults to `user_id` and `holdout_range` defaults to `null` (no holdout). Returns `409` if `name` already exists in the project. Returns `403` if you supply `holdout_range` on a plan below Pro. **Use cases** - **Default universe** — `{ \"name\": \"primary_users\" }`. Per-user randomisation, no holdout. - **Reserved holdout** — supply `holdout_range` to carve out a measurement slice excluded from all experiments. - **Account-level** — `unit_type: 'account_id'` so multi-seat accounts see one consistent variant.
      Parameters:
      createUniverseRequest - (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
    • deleteUniverseCall

      public okhttp3.Call deleteUniverseCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for deleteUniverse
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe'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
    • deleteUniverse

      public DeleteUniverseResponse deleteUniverse(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Delete a universe Soft-deletes the universe. Returns `409` if any non-archived experiment still references it — archive those experiments first. **Use case:** Tear down a universe after every experiment that used it has been archived.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe'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:
      DeleteUniverseResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteUniverseWithHttpInfo

      public ApiResponse<DeleteUniverseResponse> deleteUniverseWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Delete a universe Soft-deletes the universe. Returns `409` if any non-archived experiment still references it — archive those experiments first. **Use case:** Tear down a universe after every experiment that used it has been archived.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe'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<DeleteUniverseResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteUniverseAsync

      public okhttp3.Call deleteUniverseAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteUniverseResponse> _callback) throws ApiException
      Delete a universe (asynchronously) Soft-deletes the universe. Returns `409` if any non-archived experiment still references it — archive those experiments first. **Use case:** Tear down a universe after every experiment that used it has been archived.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe'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
    • listUniversesCall

      public okhttp3.Call listUniversesCall(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q, ApiCallback _callback) throws ApiException
      Build call for listUniverses
      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)
      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
    • listUniverses

      public ListUniversesResponse listUniverses(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q) throws ApiException
      List universes Returns a single page of universes ordered by `created_at desc, id desc`. The universes table has no `updated_at`, so this list is keyed on creation time. **Use case:** Snapshot every universe in the project — for example to audit which `unit_type` and `holdout_range` are in use before launching a new experiment.
      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)
      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:
      ListUniversesResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listUniversesWithHttpInfo

      public ApiResponse<ListUniversesResponse> listUniversesWithHttpInfo(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q) throws ApiException
      List universes Returns a single page of universes ordered by `created_at desc, id desc`. The universes table has no `updated_at`, so this list is keyed on creation time. **Use case:** Snapshot every universe in the project — for example to audit which `unit_type` and `holdout_range` are in use before launching a new experiment.
      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)
      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<ListUniversesResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listUniversesAsync

      public okhttp3.Call listUniversesAsync(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q, ApiCallback<ListUniversesResponse> _callback) throws ApiException
      List universes (asynchronously) Returns a single page of universes ordered by `created_at desc, id desc`. The universes table has no `updated_at`, so this list is keyed on creation time. **Use case:** Snapshot every universe in the project — for example to audit which `unit_type` and `holdout_range` are in use before launching a new experiment.
      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)
      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
    • updateUniverseCall

      public okhttp3.Call updateUniverseCall(@Nonnull String id, @Nonnull UpdateUniverseRequest updateUniverseRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for updateUniverse
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe's `name`. (required)
      updateUniverseRequest - (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
    • updateUniverse

      public UpdateUniverseResponse updateUniverse(@Nonnull String id, @Nonnull UpdateUniverseRequest updateUniverseRequest, @Nullable String xProjectId) throws ApiException
      Update a universe Partial update. Only `holdout_range` is mutable — `name` and `unit_type` are immutable after create. Pass `\"holdout_range\": null` to remove an existing holdout. **Use cases** - **Adjust holdout** — change the reserved measurement slice without recreating experiments. - **Remove holdout** — `{ \"holdout_range\": null }`.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe's `name`. (required)
      updateUniverseRequest - (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:
      UpdateUniverseResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateUniverseWithHttpInfo

      public ApiResponse<UpdateUniverseResponse> updateUniverseWithHttpInfo(@Nonnull String id, @Nonnull UpdateUniverseRequest updateUniverseRequest, @Nullable String xProjectId) throws ApiException
      Update a universe Partial update. Only `holdout_range` is mutable — `name` and `unit_type` are immutable after create. Pass `\"holdout_range\": null` to remove an existing holdout. **Use cases** - **Adjust holdout** — change the reserved measurement slice without recreating experiments. - **Remove holdout** — `{ \"holdout_range\": null }`.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe's `name`. (required)
      updateUniverseRequest - (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<UpdateUniverseResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateUniverseAsync

      public okhttp3.Call updateUniverseAsync(@Nonnull String id, @Nonnull UpdateUniverseRequest updateUniverseRequest, @Nullable String xProjectId, ApiCallback<UpdateUniverseResponse> _callback) throws ApiException
      Update a universe (asynchronously) Partial update. Only `holdout_range` is mutable — `name` and `unit_type` are immutable after create. Pass `\"holdout_range\": null` to remove an existing holdout. **Use cases** - **Adjust holdout** — change the reserved measurement slice without recreating experiments. - **Remove holdout** — `{ \"holdout_range\": null }`.
      Parameters:
      id - Stable opaque universe id (`uni_…`) or the universe's `name`. (required)
      updateUniverseRequest - (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