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

Solving OData Example

To solve the workflow, log on to www.RASON.com, click the Editor tab and paste the model into the Editor window. To initiate the solving process, use the following API endpoints to POST the model to the Rason Server, solve the workflow and automatically create an OData endpoint, check the status of the solve and finally obtain the results. For more information on how to solve a workflow/model using the RASON Services Web IDE, see the chapter Using the RASON Services Web IDE.

  • POST rason.net/api/model to post the model to the RASON Server.
  • POST rason.net/api/model/{nameorid}/solve to solve the workflow and create and automatically create an OData endpoint. You'll see similar output. For more information on each labeled field, see the endpoint description for POST rason.net/api/model{nameorid}/solvetype or POST rason.net/api/model.
          
            {
            "ModelId": "2590+2020-01-28-20-18-46-971091",
            "ModelName": "",
            "ModelDescr": "",
            "ModelFiles": ["customers_dt.txt", "orders.txt"],
            "RuntimeToken": "",
            "ModelType": 2,
            "ModelTypeName": "Instance",
            "IsChampion": false,
            "ParentModelId": "2590+2020-01-28-20-18-37-110107",
            "QueryString": ""
            }
          
        
  • GET rason.net/api/model/{nameorid}/status to check the status of the model
  • GET rason.net/api/model{nameorid}/results to obtain the results.

Using an API Development Platform or your own application, you can call the following REST API Endpoints to gain more information on the stages of the workflow.

  • Use GET rason.net/api/model/{nameorid}/stages to retrieve stage information from the workflow. For more information, see the GET rason.net/api/model/{nameorid}/stages endpoint description above.

    Example: GET https://rason.net/api/model/2590+2020-01-28-20-18-46-971091/stages

          
          [
          "customers",
          "orders"
          ]
          
        
  • Use GET rason.net/api/model/{nameorid}/stages?type=ordered to retrieve the stage information in the optimal order of execution. For more information, see the GET rason.net/api/model/{nameorid}/stages endpoint description above.

    Example: GET https://rason.net/api/model/2590+2020-01-28-20-18-46-971091/stages?type=ordered

          
            [
            "orders",
            "customers"
            ]
          
        
  • Use GET rason.net/api/model/{nameorid}/stages?type=terminal to retrieve the terminal nodes in the workflow. For more information, see the GET rason.net/api/model/{nameorid}/stages endpoint description above.

    Example: GET https://rason.net/api/model/2590+2020-01-28-20-18-46-971091/stages?type=terminal

          
            [
            "customers",
            "orders"
            ]
          
        
  • Use GET rason.net/api/model/{nameorid}/stages/{stage-name} to retrieve information on a specified stage.

    Example: GET https://rason.net/api/model/2590+2020-01-28-20-18-46-971091/stages/orders

          
            [
              {
                "name": "orders",
                "type": "datamining",
                "pipeline": [
                  "orders"
                ],
                "allResults": [
                  "result.transformation"
                ],
                "resultsForBindings": [],
                "dataSources": [
                  {
                    "name": "srcorders",
                    "type": "csv",
                    "connection": "orders.txt",
                    "selection": "",
                    "content": "",
                    "direction": "import",
                    "isUsed": true,
                    "isStageBinding": false,
                    "isFittedDMModel": false
                  }
                ],
                "isTerminal": true
              }
            ]
          
        
  • Use GET rason.net/api/model/{nameorid}/solve to attach the input files customers_.dt.txt and orders.txt and solve the workflow.
        
          {
            "status": {
              "id": "227768+2020-01-28-20-29-45-756097",
              "code": 0,
              "codeText": "Success"
            },
            "results": {
              "customers_result_transformation": [],
              "orders_result_transformation": []
            },
            "orders": {
              "status": {
                "code": 0,
                "codeText": "Success"
            },
            "result": {
              "transformation": {
                "objectType": "dataFrame",
                "name": "DataFrameVector_Transformed",
                "order": "col",
                "rowNames": [ "Record 1", "Record 2", "Record 3", "Record 4" ],
               "colNames": [ "OrderID", "CustomerID", "Price", "Quantity" ],
               "colTypes": [ "wstring", "wstring", "double", "double" ],
               "indexCols": null,
               "data": [ 
                 [ "o1", "o1", "o2", "o2" ],
                 [ "c1", "c2", "c1", "c2" ],
                 [ 1, 3, 5, 7 ],
                 [ 10, 20, 15, 40 ]
               ]
             }
           }
          },
          "customers": {
            "status": {
              "code": 0,
              "codeText": "Success"
            },
            "result": {
              "transformation": {
                "objectType": "dataFrame",
                "name": "DataFrameVector_Transformed",
                "order": "col",
                "rowNames": [
                  "Record 1",
                  "Record 2"
                ],
                "colNames": [
                  "CustomerID",
                  "Country",
                  "Age"
                ],
                "colTypes": [
                  "wstring",
                  "wstring",
                  "double"
               ],
                 "indexCols": null,
                 "data": [
                   [ "c1", "c2" ],
                   [ "Germany", "France" ],
                   [ 30, 40 ]
                 ]
               }
             }
           }
         }
        
      
Back to Odata Service Example