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

Example Results

Two Dataframes, orders.result.transformation and customers.result.transformation, are the exact original tables from the two input files (customers.txt and orders.txt) and are stored in the SQLite DB file. Both Dataframes are represented in the form of JSON-serialized Entity Data Models described above and are navigable and querable.

The main OData endpoint to retrieve all results for a given resource ID is GET https://rason.net/odata/result.

Given the structured nature of OData URL routing conventions, the "resource ID" is not included within the URL request. Rather, the "modelID" parameter must be submitted within the request header. Proper authorization, such as a Bearer token must also be submitted with the request.

OData is a flexible tool and offers many operators. Let's use a few to drill into the data.

  • To retrieve a particular result or table by Name, use the OData endpoint:

    GET https://rason.net/odata/result/{tablename} or

    GET https://rason.net/odata/result('table')

    Example: GET https://rason.net/odata/result/customers_result_transformation

    Note: Dots (.) in the URL such as customers.result.transformation, must be changed to underscores (_), i.e. customers_result_transformation.

          
            {
              "@odata.context": "https://rason.net/odata/$metadata#Result(Data())/$entity",
              "Name": "customers_result_transformation",
              "Data": [
               {
                "_ID": 0,
                "_Name": "Record 1",
                "CustomerID": "c1",
                "Country": "Germany",
                "Age": 30.0
               },
               {
                "_ID": 1,
                "_Name": "Record 2",
                "CustomerID": "c2",
                "Country": "France",
                "Age": 40.0
               }
             ]
           }
            
          
  • To retrieve the name of a given table, use the OData endpoint:

    GET https://rason.net/odata/result/{tablename}/name

    Example: GET https://rason.net/odata/result/customers_result_transformation/name

          
            {
            "@odata.context": "https://rason.net/odata/$metadata#Result('customers.result.transformation')/Name",
            "value": "customers_result_transformation"
            }
          
        
  • To retrieve data from a given table, use the OData endpoint:

    GET https://rason.net/odata/result/{tablename}/data/0 or

    GET https://rason.net/odata/result('table')/data(0)

    Example: GET https://rason.net/odata/result/customers_result_transformation/data/0

          
            {
              "@odata.context": "https://rason.net/odata/$metadata#DataInstance",
              "value": [
                {
                  "_ID": 0,
                  "_Name": "Record 1",
                  "CustomerID": "c1",
                  "Country": "Germany",
                  "Age": 30.0
                },
                {
                  "_ID": 1,
                  "_Name": "Record 2",
                  "CustomerID": "c2",
                  "Country": "France",
                  "Age": 40.0
                }
              ]
            }
          
        
  • To retrieve a particular instance or row from a given table using the ID, use use the OData endpoint:

    GET https://rason.net/odata/result/{tablename}/data/{rowID}

    Example: GET https://rason.net/odata/result/customers_result_transformation/data/1

          
          {
            "@odata.context": "https://rason.net/odata/$metadata#DataInstance/$entity",
            "_ID": 1,
            "_Name": "Record 2",
            "CustomerID": "c2",
            "Country": "France",
            "Age": 40.0
          }  
          
        
Back to Solving Odata Example