Class DecisionModelController
Controller class for the REST interface to the Decision Modeler functions.
Inheritance
DecisionModelController
Assembly: WMServer.dll
Syntax
[Route("decisionModel")]
[Authorize]
[ApiController]
public class DecisionModelController : ControllerBase
Constructors
DecisionModelController(WMAppDbContext)
Declaration
public DecisionModelController(WMAppDbContext context)
Parameters
Methods
Clone(string, VersionCreateArgs?)
Creates a new version of the specified asset.
Declaration
[HttpPost("{id}/createVersion")]
public Task<ActionResult<IEnumerable<OpenDIDecisionModel>>> Clone(string id, VersionCreateArgs? args = null)
Parameters
Type |
Name |
Description |
string |
id |
The identifier of the asset
|
VersionCreateArgs |
args |
Arguments for creating a version.
|
Returns
Exceptions
Commit(string)
Commits the specified asset to Head.
Declaration
[HttpPost("{id}/commitVersion")]
public Task<IActionResult> Commit(string id)
Parameters
Type |
Name |
Description |
string |
id |
The identifier of the asset
|
Returns
Exceptions
DeleteDecisionModel(string)
Delete the Decision Model with the specified ID from the database.
Declaration
[HttpDelete("{id}")]
public Task<IActionResult> DeleteDecisionModel(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
Exceptions
GetDcesionModels()
Evaluate a list of the Decision Models to which the user has been granted view access.
Declaration
[HttpGet]
public Task<ActionResult<IEnumerable<DecisionModelDTO>>> GetDcesionModels()
Returns
GetDecisionModel(string)
Evaluate the Decision Model with the specified ID.
Declaration
[HttpGet("{id}")]
public Task<ActionResult<OpenDIDecisionModel>> GetDecisionModel(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
GetSimulations(string)
Get all of the simulations associated with this decision model.
Declaration
[HttpGet("{id}/simulations")]
public Task<ActionResult<IEnumerable<OpenDISimulation>>> GetSimulations(string id)
Parameters
Type |
Name |
Description |
string |
id |
The ID of the decision model
|
Returns
Exceptions
PostDecisionModel(OpenDIDecisionModel)
Declaration
[HttpPost]
public Task<ActionResult<OpenDIDecisionModel>> PostDecisionModel(OpenDIDecisionModel openDI_dm)
Parameters
Returns
PostDecisionModelElements(string, ICollection<OpenDIDecisionModelEvaluableElement>)
Add the Decision Model Elements specified in the body of the request to the Decision Model
with the specified ID.
Declaration
[HttpPost]
[Route("{id}/Elements")]
public Task<ActionResult<DecisionModel>> PostDecisionModelElements(string id, ICollection<OpenDIDecisionModelEvaluableElement> elements)
Parameters
Type |
Name |
Description |
string |
id |
ID of the Decision Model to which the Decision Model Elements specified in the body will be added.
|
ICollection<OpenDIDecisionModelEvaluableElement> |
elements |
A JSON array of Decision Model Elements to be added to the specified Decision Model.
|
Returns
Type |
Description |
Task<ActionResult<DecisionModel>> |
On success, the complete Decision Model is returned as a JSON object. The newly added elements will be
included in the elements array.
|
PutDecisionModelDTO(string, DecisionModelDTO)
Update the Decision Model with the specified ID with values specified in the body of the request.
Declaration
[HttpPut("{id}")]
public Task<IActionResult> PutDecisionModelDTO(string id, DecisionModelDTO decisionModelDTO)
Parameters
Returns
Exceptions
PutDecisionModelDWithElements(string, OpenDIDecisionModel)
Update the Decision Model with the specified ID with values specified in the body of the request.
Declaration
[HttpPut("{id}/withElements")]
public Task<ActionResult<OpenDIDecisionModel>> PutDecisionModelDWithElements(string id, OpenDIDecisionModel openDIDm)
Parameters
Returns
Exceptions
Versions(string)
Commits the specified asset to Head.
Declaration
[HttpPost("{id}/versions")]
public Task<ActionResult<IEnumerable<VersionArgs>>> Versions(string id)
Parameters
Type |
Name |
Description |
string |
id |
The identifier of the asset
|
Returns
Exceptions