Class ModelController
Controller for the REST API interface to model management functions.
Inheritance
ModelController
Assembly: WMServer.dll
Syntax
[Route("model")]
[Authorize]
[ApiController]
public class ModelController : ControllerBase
Constructors
ModelController(WMAppDbContext)
Constructor that injects the database context.
Declaration
public ModelController(WMAppDbContext context)
Parameters
Methods
Clone(string, VersionCreateArgs?)
Creates a new version of the specified asset.
Declaration
[HttpPost("{id}/createVersion")]
public Task<ActionResult<IEnumerable<OpenDIModel>>> Clone(string id, VersionCreateArgs? args = null)
Parameters
Type |
Name |
Description |
string |
id |
The identifier of the asset
|
VersionCreateArgs |
args |
Arguments for creating the new 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
Delete(string)
Delete an existing instance of a model
Declaration
[HttpDelete("{id}")]
public Task<IActionResult> Delete(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
Evaluate(ModelEvaluationArgs)
Performs an evaluation on the specified model
Declaration
[HttpPost("evaluate")]
public Task<ActionResult<OpenDIValue>> Evaluate(ModelEvaluationArgs args)
Parameters
Returns
Get()
Get the list of models owned by the current user.
Declaration
[HttpGet]
public Task<ActionResult<IEnumerable<OpenDIModel>>> Get()
Returns
Get(string)
Get the model with the specified ID
Declaration
[HttpGet("{id}")]
public Task<ActionResult<OpenDIModel>> Get(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
Post(OpenDIModel)
Create a new instance of a model
Declaration
[HttpPost]
public Task<ActionResult<OpenDIModel>> Post(OpenDIModel openDI_m)
Parameters
Returns
Put(string, OpenDIModel)
Update an existing instance of a model
Declaration
[HttpPut("{id}")]
public Task<IActionResult> Put(string id, OpenDIModel openDI_m)
Parameters
Returns
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