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: PUT: https://rason.net/api/model/{id}

A REST API endpoint that updates a previously posted named or unnamed model on the server, using the resource ID. NOTE: When editing a previously posted model that requires a data upload, data must be re-uploaded with call to PUT https://rason.net/api/model/{nameorid}.

If updating a named model, a Location header is returned with a new resource id for the new version. This new version will be the champion, unless the user has specifically designated a model as the champion using PATCH rason.net/api/model/{nameorid}, with "champion" in the body.

If updating an unnamed model, "Model has been updated" is returned in the body of the response; no new version is created, the model is simply updated.

  • URL: https://rason.net/api/model/{nameorid}
  • Method: PUT
  • URL Params

    Required: None

    Optional: None

  • Headers:

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

    Optional: None

  • Data Params: An edited RASON model
      
          
        {
          modelName: "TestModel1",
          modelType: "optimization",
          variables: {
            "d9:f9": {
              lower: 0, value: 0, finalValue: []
            }
          },
    
          data: {
            "d17:f17": {
              value: [[75, 50, 35]]
            },
            "d11:f11": {
              value: [[1, 1, 0]]
            },
            "d12:f12": {
              value: [[1, 0, 0]]
            },
            "d13:f13": {
              value: [[2, 2, 1]]
            },
            "d14:f14": {
              value: [[1, 1, 0]]
            },
            "d15:f15": {
              value: [[2, 1, 1]]
            }
          },
          constraints: {
            c11: {
              formula: "sumproduct(d9:f9, d11:f11)",
              upper: 450
            },
            c12: {
              formula: "sumproduct(d9:f9, d12:f12)",
              upper: 250
            },
            c13: {
              formula: "sumproduct(d9:f9, d13:f13)",
              upper: 800
            },
            c14: {
              formula: "sumproduct(d9:f9, d14:f14)",
              upper: 450
            },
            c15: {
              formula: "sumproduct(d9:f9, d15:f15)",
              upper: 600
            }
          },
          objective: {
            d18: {
              type: "maximize",
              formula: "sumproduct(d9:f9, d17:f17)",
              finalValue: []
            }
          }
        }
          
        
  • Success & Response Examples
    • Named Model

      Code: 201 (Created)

      Location: https://rason.net/api/model/model/2590+TestModel1+2019-11-22-21-54-04-233385

    • Unnamed Model

      Code: 200 (OK)

      "Model has been updated"

Back to POST rason.net/api/stages/{stage}