|
REST Endpoint: DELETE: https://rason.net/api/model/{nameorid}?type={origin, version, instance or all}
If a valid model name is passed for {nameorid}, endpoint behaves the same as DELETE rason.net/api/model/{nameorid}
but affects only specified types of models: origin, version, instance or all.
-
"origin" deletes the originally posted model.
-
"version" deletes models of the same name created by using PUT rason.net/model/api/{nameorid}.
-
"instance" deletes an instance of a model which is created when a model is solved.
-
"all" deletes origin models, model versions and model instances.
Response format:
{
"DeletedModels": [ - Information pertaining to all successfully deleted models
"ModelId": "", - ID of deleted model
"ModelName": "", - Name of deleted model
"ModelDescr": "", - Text from "modelDescription" property of deleted model (optional).
"ModelFiles": [], - Files uploaded during model POST (optional).
"RuntimeToken": "", - Runtime Token (optional) of deleted model.
"ModelType": "", - Model type as specified by optional "modelType" property
"ModelKind": "", - Kind of model (fitted, Excel or RASON)
"IsChampion": true/false, - Specifies if model version is the champion
"ParentModelId": null, - DK for the Parent Model
"QueryString": "" – Query Parameters, if used
],
"NotDeletedModels": [], - Information concerning all models not deleted because they are currently executing.
"invalidModels": [], - Any invalid resource identifiers listed here.
"status": "OK" – descriptive status menu
}
Note: Use ?force=true/false query parameter to force deletion of models that are still executing.
This field will only return "true" if the model has been specifically set as the champion using the REST API endpoint PATCH rason.net/api/model/{nameorid}.
- URL
- URL: https://rason.net/api/model/{nameorid}?type=origin
- URL: https://rason.net/api/model/{nameorid}?type=version
- URL: https://rason.net/api/model/{nameorid}?type=instance
- URL: https://rason.net/api/model/{nameorid}?type=all
- Method: DELETE
-
URL Params
Required: None
Optional: type=origin, version, instance or all
-
Headers:
Required: Authorization - Example: Authorization: bearer {your RASON token}
Optional: None
- Data Params: None
-
Success Response
Code: 200 (OK)
Example Response:
-
DELETE api/model/{nameorid}?type=origin
Example: DELETE https://rason.net/api/model/LogisticRegression?type=origin
{
"DeletedModels": [
{
"ModelId": "2590+LogisticRegression+2020-05-26-20-41-53-035392",
"ModelName": "LogisticRegression",
"ModelDescr": "classification: logistic regression; scoring example PMMLClassifier.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": "Origin",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": null,
"QueryString": ""
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?type=version
Example: DELETE https://rason.net/api/model/optSimWorkflow?type=version
{
"DeletedModels": [
{
"ModelId": "2590+optSimWorkflow+2020-05-08-16-58-11-900613",
"ModelName": "optSimWorkflow",
"ModelDescr": "",
"ModelFiles": [],
"RuntimeToken": "Version",
"ModelType": "",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": "2590+optSimWorkflow+2020-05-08-15-57-20-590941",
"QueryString": ""
},
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?type=instance
Example: DELETE https://rason.net/api/model/UGYieldManagement2Example?type=instance
{
"DeletedModels": [
{
"ModelId": "2590+UGYieldManagement2Example+2020-03-11-18-37-22-268626",
"ModelName": "UGYieldManagement2Example",
"ModelDescr": "UGYieldManagement2 Example - Parametric Simulation",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Instance",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": "2590+UGYieldManagement2Example+2020-03-11-18-37-17-615391",
"QueryString": "response-format=STANDALONE"
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?type=all
Example: DELETE https://rason.net/api/model?type=all
Note that ModelType is "Origin" for the first deleted model and "version" for the 2nd deleted model.
{
"DeletedModels": [
{
"ModelId": "2590+productMixExample+2020-05-27-17-35-33-978111",
"ModelName": "productMixExample",
"ModelDescr": "Your company manufactures TVs, stereos and speakers, using
a common parts inventory of power supplies, speaker cones, etc.
Parts are in limited supply and you must determine the
most profitable mix of products to build. See our Tutorial
Online for step-by step instructions on formulating this linear
programming model.",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Origin",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": null,
"QueryString": ""
},
{
"ModelId": "2590+productMixExample+2020-05-27-17-37-34-667234",
"ModelName": "productMixExample",
"ModelDescr": "Your company manufactures TVs, stereos and speakers, using
a common parts inventory of power supplies, speaker cones, etc.
Parts are in limited supply and you must determine the most
profitable mix of products to build. See our Tutorial
Online for step-by-step instructions on formulating this
linear programming model.",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Version",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": "2590+productMixExample+2020-05-27-17-35-33-978111",
"QueryString": ""
},
{
"ModelId": "2590+productMixExample+2020-05-27-17-38-04-882364",
"ModelName": "productMixExample",
"ModelDescr": "Your company manufactures TVs, stereos and speakers, using
a common parts inventory of power supplies, speaker cones, etc.
Parts are in limited supply and you must determine the
most profitable mix of products to build. See our Tutorial
Online for step-by-step instructions on formulating this
linear programming model.",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Instance",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": "2590+productMixExample+2020-05-27-17-37-34-667234",
"QueryString": "response-format=STANDALONE"
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
|