> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluate Expression

> Evaluate a dependent parameter expression using current parameter values.

The expression is given as a JSON-serialized PyBaMM symbol (json_value).
Parameters are the full frontend parameters dict; they are converted and
used to substitute Parameter("...") nodes, then the expression is
evaluated to a scalar.

Parameters
----------
request : EvaluateExpressionRequest
    json_value: JSON symbol tree; parameters: current parameters dict

Returns
-------
EvaluateExpressionResponse
    value: evaluated numeric result



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /variables/evaluate-expression
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /variables/evaluate-expression:
    post:
      tags:
        - variables
      summary: Evaluate Expression
      description: >-
        Evaluate a dependent parameter expression using current parameter
        values.


        The expression is given as a JSON-serialized PyBaMM symbol (json_value).

        Parameters are the full frontend parameters dict; they are converted and

        used to substitute Parameter("...") nodes, then the expression is

        evaluated to a scalar.


        Parameters

        ----------

        request : EvaluateExpressionRequest
            json_value: JSON symbol tree; parameters: current parameters dict

        Returns

        -------

        EvaluateExpressionResponse
            value: evaluated numeric result
      operationId: evaluate_expression_variables_evaluate_expression_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateExpressionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluateExpressionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EvaluateExpressionRequest:
      properties:
        json_value:
          additionalProperties: true
          type: object
          title: Json Value
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
      type: object
      required:
        - json_value
        - parameters
      title: EvaluateExpressionRequest
      description: Request body for evaluating an expression with current parameters.
    EvaluateExpressionResponse:
      properties:
        value:
          type: number
          title: Value
      type: object
      required:
        - value
      title: EvaluateExpressionResponse
      description: Response body with the evaluated numeric value.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````