---
title: "Get Metadata"
method: POST
path: "/problem/get_metadata"
---

# Get Metadata

`POST /problem/get_metadata`

Fetch specific metadata for a specific problem.

Fetch specific metadata for a specific problem. See all the possible
metadata types from DESDEO/desdeo/api/models/problem.py Problem Metadata
section.

Args:
    request (MetaDataGetRequest): the requested metadata type.
    user (Annotated[User, Depends]): the current user.
    session (Annotated[Session, Depends]): the database session.

Returns:
    list[ForestProblemMetadata | RepresentativeNonDominatedSolutions]: list containing all the metadata
        defined for the problem with the requested metadata type. If no match is found,
        returns an empty list.

## Request body

- ProblemMetaDataGetRequest — Request model for getting specific type of metadata from a specific problem.
  - `problem_id` integer, required
  - `metadata_type` string, required

## Response `200`

Successful Response

- union[]
  - union
    - ForestProblemMetaData — A problem metadata class to hold UTOPIA forest problem specific information.
      - `id` integer, nullable
      - `metadata_id` integer, nullable
      - `metadata_type` string
      - `map_json` string, required
      - `schedule_dict` object, required
      - `years` string[], required
      - `stand_id_field` string, required
      - `stand_descriptor` object, nullable
      - `compensation` number, nullable
    - RepresentativeNonDominatedSolutions — A problem metadata class to store representative solutions sets, i.e., non-dominated sets... A problem metadata class to store representative solutions sets, i.e., non-dominated sets that represent/approximate the Pareto optimal solution set of the problem. Note: It is assumed that the solution set is non-dominated.
      - `id` integer, nullable
      - `metadata_id` integer, nullable
      - `metadata_type` string
      - `name` string, required — The name of the representative set.
      - `description` string, nullable — A description of the representative set. Optional.
      - `solution_data` object, required — The non-dominated solutions. It is assumed that columns exist for each variable and objective function. For functions, the `_min` variant should be present, and any tensor variables should be unrolled.
      - `ideal` object, required — The ideal objective function values of the representative set.
      - `nadir` object, required — The nadir objective function values of the representative set.
    - SolverSelectionMetadata — A problem metadata class to store the preferred solver of a problem. A problem metadata class to store the preferred solver of a problem. See desdeo/tools/utils.py -> available_solvers for available solvers.
      - `id` integer, nullable
      - `metadata_id` integer, nullable
      - `metadata_type` string
      - `solver_string_representation` string, required — The string representation of the selected solver.

## 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/revisions/c24fa4e23380/schema)
