Introduction to RASON
About RASON Models and the RASON Server
Rason Subscriptions
Rason Web IDE
Creating and Running a Decision Flow
Defining Your Optimization Model
Defining Your Simulation Model
Performing Sensitivity Analysis
Defining Your Stochastic Optimization Model
Defining Your Data Science Model
Defining Custom Types
Defining Custom Functions
Defining Your Decision Table
Defining Contexts
Using the REST API
REST API Quick Call Endpoints
REST API Endpoints
Decision Flow REST API Endpoints
OData Endpoints
OData Service for Decision Flows
Creating Your Own Application
Using Arrays, For, Loops and Tables
Organization Accounts

REST Endpoint: POST: https://rason.net/api/simulate

A REST API endpoint that accepts a RASON model, runs a simulation and returns a result in JSON format. This call should only be used with models that run very quickly, i.e. within a few seconds. There is a time limit of 30 seconds on all 'Quick Solve' calls.

  • URL: https://rason.net/api/simulate
  • Method: POST
  • URL Params

    Required: None

    Optional: Any data component may be passed as a query parameter if a binding property exists for that data component. See the previous topic "Parametric Selection Feature" for a complete example illustrating how to pass a query parameter from outside or inside your RASON model.

  • Headers:

    Required: Authorization - Example: Authorization: bearer {your RASON token}

    Optional: None

  • Data Params Example: A RASON simulation Model.
          
          {
            "modelName": "SimulationExample",
            "modelType": "simulation",
            "modelSettings": {
              "numSimulations": 1,
              "numTrials": 100,
              "randomSeed": 1
            },
            "data": {
              "price": {
                "value": 200
              },
              "capacity": {
                "value": 100
              },
              "sold": {
                "value": 110
              },
              "refund_no_shows": {
                "value": 0.5
              },
              "refund_overbook": {
                "value": 1.25
              }
            },
            "uncertainVariables": {
              "no_shows": {
                "formula": "PsiLogNormal(0.1*sold, 0.06*sold)",
                "mean": []
              }
            },
            "formulas": {
              "show_ups": {
                "formula": "sold - Round(no_shows, 0)"
              },
              "overbook": {
                "formula": "Max(0, show_ups - capacity)"
              }
            },
            "uncertainFunctions": {
              "revenue": {
                "formula": "price*(sold - refund_no_shows*Round(no_shows, 0) - refund_overbook*overbook)",
                "percentiles": [],
                "trials": []
              }
            }
          }
          
        
  • Success Response

    Code: 200 (OK)

    Example Response

          
          Executing synchronous simulation: POST https://rason.net/api/simulate
          {
            "status": {
              "code": 0,
              "id": "2590+2025-05-14-17-24-00-389767",
              "modelType": "simulation",
              "success": true,
              "message": "Solver has completed the simulation."
            },
            "uncertainFunctions": {
              "revenue": {
                "percentiles": [
                  [18796, 19192, 19491, 19596, 19695, 19888, 19900, 19946, 19950, 19950, 19950, 19994, 
                   20087, 20100, 20100, 20100, 20100, 20100, 20100, 20180, 20200, 20239, 20250, 20250, 
                   20250, 20250, 20250, 20250, 20285.5, 20300, 20369, 20400, 20400, 20400, 20400, 20400, 
                   20400, 20400, 20400, 20400, 20400, 20400, 20457, 20500, 20500, 20500, 20526.5, 20550, 
                   20550, 20550, 20550, 20550, 20550, 20550, 20550, 20572, 20600, 20600, 20600, 20640, 
                   20700, 20700, 20700, 20700, 20700, 20700, 20700, 20700, 20700, 20700, 20700, 20700, 
                   20727, 20800, 20800, 20800, 20800, 20800, 20810.5, 20850, 20850, 20850, 20850, 20850, 
                   20850, 20857, 20900, 20900, 20900, 20900, 20900, 20908, 21000, 21000, 21000, 21000, 
                   21000, 21000, 21000]
                ],
                "trials": [
                  [19900, 20250, 20100, 20550, 20700, 20600, 20500, 20700, 20550, 21000, 19700, 20700, 
                  20250, 20600, 20300, 20850, 20550, 18800, 20900, 20700, 19950, 20550, 20700, 20900, 
                  20250, 19600, 20400, 20600, 20700, 20700, 20550, 21000, 20800, 18400, 20800, 20250, 
                  20700, 20600, 20800, 20400, 20400, 20200, 20400, 20400, 20400, 20700, 20250, 20250, 
                  20700, 20250, 20850, 19200, 20900, 20400, 21000, 20100, 21000, 21000, 20300, 20550, 
                  20200, 20800, 20100, 20400, 20700, 20800, 20900, 20900, 20550, 20500, 21000, 20400, 
                  20900, 20100, 20100, 19900, 20700, 19950, 20100, 20500, 20100, 20400, 20700, 19500, 
                  20550, 20800, 20000, 20550, 19950, 21000, 19950, 20400, 20400, 20850, 20850, 20850, 
                  20850, 20500, 20850, 21000]
                ]
              }
            },
            "uncertainVariables": {
              "no_shows": {
                "mean": 10.9432
              }
            }
          }
          
        
Back to REST Endpoint: POST: https://rason.net/api/optimize