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: GET: https://rason.net/api/model

A REST API endpoint that returns all available resource IDs and information for all models. Use a query parameter to filter for:

  • specific named model only (name),
  • the original posted model (origin),
  • model version (version),
  • model instance (instance),
  • fitted models only (fitted),
  • Excel models only (excel),
  • RASON models only (RASON),
  • named RASON models only (RASON)
  • all named models (all)

Below is a brief explanation of the returned properties

  • ModelId: The unique identifier for the model
  • ModelName: The name of the model taken from the model text. When using POST rason.net/api/model/<name> the name from the url is validated against the name in the model, if specified
  • ModelDescr: The model description taken directly from the model text
  • ModelFiles: The list of files used by the model as taken from the model text.
  • RuntimeToken: Lists any runtime token associated with this model
  • ModelType: Lists the type of model such as "origin", "version", "instance".
    • “origin” – the initially posted model
    • “version” – means that this model is a version of a previously POSTed or PUT model

      Conceptually these are different versions of the POSTed model.

    • “instance” – these are models created whenever a model is solved.
  • ModelKind: Lists the kind of model such as "fitted", "excel" or "rason".
    • “fitted” – fitted Data Science model in PMML/JSON format
    • “excel” – models defined in Excel language
    • “rason” – models defined in RASON language
  • IsChampion: True only if model has been marked as the “Champion” using the REST API endpoint PATCH rason.net/api/model/{nameorid}.
  • ParentModelId: Identifies the model from which this model is derived. In the case of “Origin” models, this is always empty. Otherwise, this property identifies the model used to create this model. For example, if a user POST’s a model and then PUT’s another version of this model, "parentModelId" of the version will be the modelId of the originally posted model. Similar logic holds for posting versions of version and instances of version.
  • QueryString: The query string associated with the model when it was created. In the case of unnamed models, this will change throughout the model’s lifecycle. A user may post an unnamed model with a particular query string but then solve the model with another. In the case of named models, this is the query string associated with the action used to create the model. A model could be posted with one query string, have several versions with different query strings and associated instances with yet another query string. If a particular version or instance doesn’t have a query string, it will inherit the query string of the parent.
  • ModelContainer: (Property only applies to Organization Account users) The container within the Azure Storage account where the model is saved (POSTed). Otherwise, this property is reported as "null". For more information on Organization Accounts, see the Appendix: Organization Accounts.
  • URL:https://rason.net/api/model
  • Method: GET
  • URL Params

    Required: None

    Optional:

    • GET https://rason.net/api/model?type=origin, version, instance – Lists info for all models of specified type.
      • "origin" - originally POSTed model
      • "version" – created by using the API endpoint PUT rason.net/api/model/{nameorid} which creates a new version of the model of the same model name.
      • "instance" – created when a RASON model is solved.
      • "all" – Lists info for all original models, versions and instances. May be omitted.
    • GET https://rason.net/api/model?kind=fitted, excel or rason – Lifts info for all models of specified kind.
      • "fitted" – fitted Data Science model in PMML/JSON format
      • "excel" – models defined in Excel
      • "rason" – created when a RASON model is solved.
      • "all" – Lists info for all fitted, Excel or RASON models. May be omitted.
  • Headers:

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

    Optional: None

  • Data Params: None
  • Success Response

    Code: 200 (OK)

    • GET https://rason.net/api/model
      • Example Request: https://rason.net/api/model
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+DecisionTreeClassification+2020-05-28-21-48-35-064322",
                      "ModelName": "DecisionTreeClassification",
                      "ModelDescr": "classification: decision tree",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+LogisticRegression+2020-05-28-21-07-59-763658",
                      "ModelName": "LogisticRegression",
                      "ModelDescr": "classification: logistic regression; scoring example PMMLClass
                      ifier.json uses exported fitted model, lrModel, to score new data",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Instance",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": "2590+LogisticRegression+2020-05-28-21-04-19-737715"
                      "QueryString": "response-format=STANDALONE",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+2StageFarmer1(Stochastic)+2020-05-26-21-46-10-180902",
                      "ModelName": "2StageFarmer1(Stochastic)",
                      "ModelDescr": "",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Excel",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+fitted-jsonmodelsrc+2020-05-26-20-31-32-407619",
                      "ModelName": "fitted-jsonmodelsrc",
                      "ModelDescr": "classification-nearest-neighbors.json",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Fitted",
                      "IsChampion": false,
                      "ParentModelId": "2590+NearestNeighborsClassification+2020-05-26-20-31355966",
                      "QueryString": "",
                      "ModelContainer": null
                    }
                  ]
                    
                  
    • GET https://rason.net/api/model?type={origin, version, instance or all}
      • Example Request: https://rason.net/api/model?type=origin
      • Example Response
                    
                  [
                    {
                      "ModelId": "2590+DecisionTreeClassification+2020-05-28-21-48-35-064322",
                      "ModelName": "DecisionTreeClassification",
                      "ModelDescr": "classification: decision tree",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?type=version
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+mlrDF+2020-05-21-01-12-10-082250",
                      "ModelName": "mlrDF",
                      "ModelDescr": "DF that partitions a dataset into three partitions, rescales th
                      e partitions and runs MLR",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small.txt",
                          "isOnServer": true
                        },
                        {
                          "fileName": "hald-small-unlabeled.txt",
                          "isOnServer": true
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Version",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": "2590+mlrDF+2020-05-21-01-10-23-882710",
                      "QueryString": "keep-intermediate-results=true&data-storage=JSON",
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?type=instance
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+LogisticRegression+2020-05-28-21-07-59-763658",
                      "ModelName": "LogisticRegression",
                      "ModelDescr": "classification: logistic regression; scoring example PMMLClassifie
                      r.json uses exported fitted model, lrModel, to score new data",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Instance",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": "2590+LogisticRegression+2020-05-28-21-04-19-737715",
                      "QueryString": "response-format=STANDALONE",
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?type=all – Behaves the same as GET rason.net/api/model
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+DecisionTreeClassification+2020-05-28-21-48-35-064322",
                      "ModelName": "DecisionTreeClassification",
                      "ModelDescr": "classification: decision tree",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+LogisticRegression+2020-05-28-21-07-59-763658",
                      "ModelName": "LogisticRegression",
                      "ModelDescr": "classification: logistic regression; scoring example PMMLClass
                      ifier.json uses exported fitted model, lrModel, to score new data",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Instance",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": "2590+LogisticRegression+2020-05-28-21-04-19-737715",
                      "QueryString": "response-format=STANDALONE",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+2StageFarmer1(Stochastic)+2020-05-26-21-46-10-180902",
                      "ModelName": "2StageFarmer1(Stochastic)",
                      "ModelDescr": "",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Excel",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+fitted-jsonmodelsrc+2020-05-26-20-31-32-407619",
                      "ModelName": "fitted-jsonmodelsrc",
                      "ModelDescr": "classification-nearest-neighbors.json",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Fitted",
                      "IsChampion": false,
                      "ParentModelId": "2590+NearestNeighborsClassification+2020-05-26-20-31355966",
                      "QueryString": "",
                      "ModelContainer": null
                    }
                  ]
                    
                  
    • GET https://rason.net/api/model?kind={fitted, excel, rason or all}
      • Example Request: https://rason.net/api/model?kind=fitted
      • Example Response:
                    
                   [
                    {
                      "ModelId": "2590+fitted-jsonmodelsrc+2020-05-26-20-31-32-407619",
                      "ModelName": "fitted-jsonmodelsrc",
                      "ModelDescr": "classification-nearest-neighbors.json",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Fitted",
                      "IsChampion": false,
                      "ParentModelId": "2590+NearestNeighborsClassification+2020-05-26-20-31-30-355966",
                      "QueryString": "", 
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?kind=excel
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+2StageFarmer1(Stochastic)+2020-05-26-21-46-10-180902",
                      "ModelName": "2StageFarmer1(Stochastic)",
                      "ModelDescr": "",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Excel",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "", 
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?kind=rason
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+DecisionTreeClassification+2020-05-28-21-48-35-064322",
                      "ModelName": "DecisionTreeClassification",
                      "ModelDescr": "classification: decision tree",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    }
                  ]
                    
                  
      • Example Request: https://rason.net/api/model?kind=all – Behaves the same as GET rason.net/api/model
      • Example Response:
                    
                  [
                    {
                      "ModelId": "2590+DecisionTreeClassification+2020-05-28-21-48-35-064322",
                      "ModelName": "DecisionTreeClassification",
                      "ModelDescr": "classification: decision tree",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-decision-tree.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+LogisticRegression+2020-05-28-21-07-59-763658",
                      "ModelName": "LogisticRegression",
                      "ModelDescr": "classification: logistic regression; scoring example PMMLClass
                      ifier.json uses exported fitted model, lrModel, to score new data",
                      "ModelFiles": [
                        {
                          "fileName": "hald-small-binary-train.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "hald-small-binary-valid.txt",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.xml",
                          "isOnServer": false
                        },
                        {
                          "fileName": "classification-logistic-model.json",
                          "isOnServer": false
                        }
                      ],
                      "RuntimeToken": "",
                      "ModelType": "Instance",
                      "ModelKind": "Rason",
                      "IsChampion": false,
                      "ParentModelId": "2590+LogisticRegression+2020-05-28-21-04-19-737715",
                      "QueryString": "response-format=STANDALONE",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+2StageFarmer1(Stochastic)+2020-05-26-21-46-10-180902",
                      "ModelName": "2StageFarmer1(Stochastic)",
                      "ModelDescr": "",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Excel",
                      "IsChampion": false,
                      "ParentModelId": null,
                      "QueryString": "",
                      "ModelContainer": null
                    },
                    {
                      "ModelId": "2590+fitted-jsonmodelsrc+2020-05-26-20-31-32-407619",
                      "ModelName": "fitted-jsonmodelsrc",
                      "ModelDescr": "classification-nearest-neighbors.json",
                      "ModelFiles": [],
                      "RuntimeToken": "",
                      "ModelType": "Origin",
                      "ModelKind": "Fitted",
                      "IsChampion": false,
                      "ParentModelId": "2590+NearestNeighborsClassification+2020-05-26-20-31355966",
                      "QueryString": ""
                      "ModelContainer": null
                    }
                  ]
                    
                  
Back to GET rason.net/api/interface