Add a newly defined problem to the database.

Args: request (Problem): the JSON representation of the problem. user (Annotated[User, Depends): the current user. session (Annotated[Session, Depends): the database session.

Note: Users with the role 'guest' may not add new problems.

Raises: HTTPException: when any issue with defining the problem arises.

Returns: ProblemInfo: the information about the problem added.

post/problem/add

Request

Response

Successful Response

namestring required
descriptionstring required
is_convexboolean nullable required
is_linearboolean nullable required
is_twice_differentiableboolean nullable required
scenario_keysstring[] nullable required
variable_domain'continuous' | 'binary' | 'integer' | 'mixed' required

An enumerator for the possible variable type domains of a problem.

idinteger required
user_idinteger required

Changes

    • breaking

      removed the request body

    • breaking

      the response property /// became optional for the status

    • breaking

      response property simulators/anyOf[subschema #1]/items/file list-of-types was widened by adding types null to media type application/json of response 200

    • info

      the endpoint scheme security APIKeyCookie was added to the API

    • info

      removed the non-success response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the // response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      added the required property to the response with the status

    • breaking

      added required request body

    • breaking

      removed the required property from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • info

      the endpoint scheme security APIKeyCookie was removed from the API

    • info

      added the non-success response with the status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      added to the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the /// response property anyOf list for the response status

    • info

      removed from the // response property anyOf list for the response status

    • info

      the response property /// became required for the status

    • info

      response property simulators/anyOf[subschema #1]/items/file list-of-types was narrowed by removing types null from media type application/json of response 200