|
REST Endpoint: DELETE: https://rason.net/api/model/{nameorid}?kind={fitted, excel, rason 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 kinds of models: fitted, Excel, RASON or all.
-
"fitted" deletes fitted data science models in PMML/JSON format
-
"excel" deletes models defined in the Excel language, i.e. Excel models.
-
"rason" deletes models defined using the RASON modeling language.
-
"all" deletes fitted, excel and rason models.
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
- Method: DELETE
- URL Params
Required: None
Optional: kind=fitted, excel, rason 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}?kind=fitted
Example: DELETE https://rason.net/api/model/2590+fitted-myjsonsrc+2020-05-26-20-43-50-721463?kind=fitted
{
"DeletedModels": [
{
"ModelId": "2590+fitted-myjsonsrc+2020-05-26-20-43-50-
721463",
"ModelName": "fitted-myjsonsrc",
"ModelDescr": "classification-logistic-model.json",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Origin",
"ModelKind": "Fitted",
"IsChampion": false,
"ParentModelId": "2590+LogisticRegression+2020-05-26-20-
43-47-987029",
"QueryString": ""
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?kind=excel
Example: DELETE https://rason.net/api/model/2StageFarmer1(Stochastic)?kind=excel
{
"DeletedModels": [
{
"ModelId": "2590+2StageFarmer1(Stochastic)+2020-
05-26-21-11-54-342640",
"ModelName": "2StageFarmer1(Stochastic)",
"ModelDescr": "",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Origin",
"ModelKind": "Excel",
"IsChampion": false,
"ParentModelId": null,
"QueryString": ""
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?kind=rason
Example: DELETE https://rason.net/api/model/2StageFarmer1(Stochastic)?kind=rason
{
"deletedModel": [
{
"ModelId": "2590+2StageFarmer1(Stochastic)1+2020-05-26-21-12-54-
091292",
"ModelName": "2StageFarmer1(Stochastic)1",
"ModelDescr": "UGAirlineHub Nonlinear Optimization Example - See Ex
ample walkthrough in RASON User Guide",
"ModelFiles": [
{
"fileName": "AirlineHubData.csv",
"isOnServer": false
}
],
"RuntimeToken": "",
"ModelType": "Origin",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": null,
"QueryString": ""
},
{
"ModelId": "2590+2StageFarmer1(Stochastic)1+2020-05-26-21-12-58-
819840",
"ModelName": "2StageFarmer1(Stochastic)1",
"ModelDescr": "UGAirlineHub Nonlinear Optimization Example - See Ex
ample walkthrough in RASON User Guide",
"ModelFiles": [
{
"fileName": "AirlineHubData.csv",
"isOnServer": false
}
],
"RuntimeToken": "",
"ModelType": "Version",
"ModelKind": "Rason",
"IsChampion": false,
"ParentModelId": "2590+2StageFarmer1(Stochastic)1+2020-05-26-21-12-
54-091292",
"QueryString": ""
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
-
DELETE api/model/{nameorid}?kind=all
Example: DELETE https://rason.net/api/model/2StageFarmer1(Stochastic)?kind=all
Notice that ModelKind for the first deleted model is "rason" and "fitted" for the 2nd deleted model.
{
"DeletedModels": [
{
"ModelId": "2590+LogisticRegression1+2020-05-26-21-51-54-409999",
"ModelName": "LogisticRegression1",
"ModelDescr": "classification: logistic regression; scoring example PMMLCl
assifier.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": ""
},
{
"ModelId": "2590+fitted-myjsonsrc+2020-05-26-20-43-50-
721463",
"ModelName": "fitted-myjsonsrc",
"ModelDescr": "classification-logistic-model.json",
"ModelFiles": [],
"RuntimeToken": "",
"ModelType": "Origin",
"ModelKind": "Fitted",
"IsChampion": false,
"ParentModelId": "2590+LogisticRegression+2020-05-26-20-
43-47-987029",
"QueryString": ""
}
],
"NotDeletedModels": [],
"invalidModels": [],
"status": "OK"
}
|