|
REST Endpoint: GET: https://rason.net/api/model/{nameorid}
A REST API endpoint that creates an unnamed or named resource ID for
- a RASON model,
- an Excel optimization/simulation/decision table/data science model,
- data science fitted model (RASON or PMML)
and returns a Location header with the resource ID. If "modelName":"myModelName" exists in the body of the RASON model or if the model name is appended to this
endpoint (POST https://rason.net/api/model/{myModelName}), then this REST API endpoint will create a named resource. The model, "myModelName", must be a RASON model
and not a fitted model. Model names are case sensitive.
The returned model ID URL facilitates subsequent calls to the RASON REST API endpoints necessary for manipulating your model (i.e. perform an optimization, run a simulation,
check the status of the model, get results, etc.).
Note: When using this endpoint to post and solve an Excel model, the Excel model is uploaded and stored on the Rason Server.
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
- “instance” – these are models created whenever a model is run
- 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 specifically 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.
|