---
title: "Full Iteration"
method: POST
path: "/gnimbus/all_iterations"
---

# Full Iteration

`POST /gnimbus/all_iterations`

Get all results from all iterations of the group.

Args:
    request (GroupInfoRequest): essentially just the ID of the group
    user (Annotated[User, Depends(get_current_user)]): current user
    session (Annotated[Session, Depends(get_session)]): current session

Returns:
    GNIMBUSAllIterationsResponse: A GNIMBUSAllIterationsResponse response
    containing all the results of the iterations. If last iteration was optimization,
    the first iteration is incomplete (i.e. the voting preferences and voting results are missing)

Raises:
    HTTPException: Validation errors or no results or no states and such.

## Request body

- GroupInfoRequest — Class for requesting group information.
  - `group_id` integer, required

## Response `200`

Successful Response

- GNIMBUSAllIterationsResponse — The response model for getting all found solutions among others.
  - `all_full_iterations` FullIteration[], required
    - `phase` string, required
    - `optimization_preferences` OptimizationPreference, required — An optimization preference class. As for the method and phase, see GNIMBUS for details.
      - `method` string
      - `phase` string
      - `set_preferences` object, required
    - `voting_preferences` union, required
      - VotingPreference — Voting preferences.
        - `method` string
        - `set_preferences` object, required
      - EndProcessPreference — A model for determining if everyone is happy with current solution so we can end the process.
        - `method` string
        - `success` boolean, nullable, required
        - `set_preferences` object, required
    - `starting_result` SolutionReference, required — A model that functions as a reference to solutions existing in the database. Referenced solutions are not necessarily solutions that the user has saved explicitly. For referencing those, see `SavedSolutionReference`.
      - `name` string, nullable — Optional name to help identify the solution if, e.g., saved.
      - `solution_index` integer, nullable — The index of the referenced solution, if multiple solutions exist in the reference state.
      - `state` StateDB, required — State holder with a single relationship to the base State.
        - `id` integer, nullable
        - `problem_id` integer, nullable
        - `session_id` integer, nullable
        - `parent_id` integer, nullable
        - `state_id` integer, nullable
      - `objective_values_all` object[], required
      - `variable_values_all` object[], required
      - `objective_values` object, nullable, required
      - `variable_values` object, nullable, required
      - `state_id` integer, required
      - `num_solutions` integer, required
    - `common_results` SolutionReference[], required
      - `name` string, nullable — Optional name to help identify the solution if, e.g., saved.
      - `solution_index` integer, nullable — The index of the referenced solution, if multiple solutions exist in the reference state.
      - `state` StateDB, required — State holder with a single relationship to the base State.
        - `id` integer, nullable
        - `problem_id` integer, nullable
        - `session_id` integer, nullable
        - `parent_id` integer, nullable
        - `state_id` integer, nullable
      - `objective_values_all` object[], required
      - `variable_values_all` object[], required
      - `objective_values` object, nullable, required
      - `variable_values` object, nullable, required
      - `state_id` integer, required
      - `num_solutions` integer, required
    - `user_results` SolutionReference[], required
      - `name` string, nullable — Optional name to help identify the solution if, e.g., saved.
      - `solution_index` integer, nullable — The index of the referenced solution, if multiple solutions exist in the reference state.
      - `state` StateDB, required — State holder with a single relationship to the base State.
        - `id` integer, nullable
        - `problem_id` integer, nullable
        - `session_id` integer, nullable
        - `parent_id` integer, nullable
        - `state_id` integer, nullable
      - `objective_values_all` object[], required
      - `variable_values_all` object[], required
      - `objective_values` object, nullable, required
      - `variable_values` object, nullable, required
      - `state_id` integer, required
      - `num_solutions` integer, required
    - `personal_result_index` integer, nullable, required
    - `final_result` SolutionReference, required — A model that functions as a reference to solutions existing in the database. Referenced solutions are not necessarily solutions that the user has saved explicitly. For referencing those, see `SavedSolutionReference`.
      - `name` string, nullable — Optional name to help identify the solution if, e.g., saved.
      - `solution_index` integer, nullable — The index of the referenced solution, if multiple solutions exist in the reference state.
      - `state` StateDB, required — State holder with a single relationship to the base State.
        - `id` integer, nullable
        - `problem_id` integer, nullable
        - `session_id` integer, nullable
        - `parent_id` integer, nullable
        - `state_id` integer, nullable
      - `objective_values_all` object[], required
      - `variable_values_all` object[], required
      - `objective_values` object, nullable, required
      - `variable_values` object, nullable, required
      - `state_id` integer, required
      - `num_solutions` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/industrial-optimization-group/apis/desdeo-fast-api.md) · [All operations](https://skmtc.net/industrial-optimization-group/apis/desdeo-fast-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/industrial-optimization-group/desdeo-fast-api/versions/c24fa4e23380/schema)
