Show / Hide Table of Contents

Class DecisionModelController

Controller class for the REST interface to the Decision Modeler functions.

Inheritance
object
ControllerBase
DecisionModelController
Inherited Members
ControllerBase.StatusCode(int)
ControllerBase.StatusCode(int, object)
ControllerBase.Content(string)
ControllerBase.Content(string, string)
ControllerBase.Content(string, string, Encoding)
ControllerBase.Content(string, MediaTypeHeaderValue)
ControllerBase.NoContent()
ControllerBase.Ok()
ControllerBase.Ok(object)
ControllerBase.Redirect(string)
ControllerBase.RedirectPermanent(string)
ControllerBase.RedirectPreserveMethod(string)
ControllerBase.RedirectPermanentPreserveMethod(string)
ControllerBase.LocalRedirect(string)
ControllerBase.LocalRedirectPermanent(string)
ControllerBase.LocalRedirectPreserveMethod(string)
ControllerBase.LocalRedirectPermanentPreserveMethod(string)
ControllerBase.RedirectToAction()
ControllerBase.RedirectToAction(string)
ControllerBase.RedirectToAction(string, object)
ControllerBase.RedirectToAction(string, string)
ControllerBase.RedirectToAction(string, string, object)
ControllerBase.RedirectToAction(string, string, string)
ControllerBase.RedirectToAction(string, string, object, string)
ControllerBase.RedirectToActionPreserveMethod(string, string, object, string)
ControllerBase.RedirectToActionPermanent(string)
ControllerBase.RedirectToActionPermanent(string, object)
ControllerBase.RedirectToActionPermanent(string, string)
ControllerBase.RedirectToActionPermanent(string, string, string)
ControllerBase.RedirectToActionPermanent(string, string, object)
ControllerBase.RedirectToActionPermanent(string, string, object, string)
ControllerBase.RedirectToActionPermanentPreserveMethod(string, string, object, string)
ControllerBase.RedirectToRoute(string)
ControllerBase.RedirectToRoute(object)
ControllerBase.RedirectToRoute(string, object)
ControllerBase.RedirectToRoute(string, string)
ControllerBase.RedirectToRoute(string, object, string)
ControllerBase.RedirectToRoutePreserveMethod(string, object, string)
ControllerBase.RedirectToRoutePermanent(string)
ControllerBase.RedirectToRoutePermanent(object)
ControllerBase.RedirectToRoutePermanent(string, object)
ControllerBase.RedirectToRoutePermanent(string, string)
ControllerBase.RedirectToRoutePermanent(string, object, string)
ControllerBase.RedirectToRoutePermanentPreserveMethod(string, object, string)
ControllerBase.RedirectToPage(string)
ControllerBase.RedirectToPage(string, object)
ControllerBase.RedirectToPage(string, string)
ControllerBase.RedirectToPage(string, string, object)
ControllerBase.RedirectToPage(string, string, string)
ControllerBase.RedirectToPage(string, string, object, string)
ControllerBase.RedirectToPagePermanent(string)
ControllerBase.RedirectToPagePermanent(string, object)
ControllerBase.RedirectToPagePermanent(string, string)
ControllerBase.RedirectToPagePermanent(string, string, string)
ControllerBase.RedirectToPagePermanent(string, string, object, string)
ControllerBase.RedirectToPagePreserveMethod(string, string, object, string)
ControllerBase.RedirectToPagePermanentPreserveMethod(string, string, object, string)
ControllerBase.File(byte[], string)
ControllerBase.File(byte[], string, bool)
ControllerBase.File(byte[], string, string)
ControllerBase.File(byte[], string, string, bool)
ControllerBase.File(byte[], string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(byte[], string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.File(byte[], string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(byte[], string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.File(Stream, string)
ControllerBase.File(Stream, string, bool)
ControllerBase.File(Stream, string, string)
ControllerBase.File(Stream, string, string, bool)
ControllerBase.File(Stream, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(Stream, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.File(Stream, string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(Stream, string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.File(string, string)
ControllerBase.File(string, string, bool)
ControllerBase.File(string, string, string)
ControllerBase.File(string, string, string, bool)
ControllerBase.File(string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.File(string, string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.File(string, string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.PhysicalFile(string, string)
ControllerBase.PhysicalFile(string, string, bool)
ControllerBase.PhysicalFile(string, string, string)
ControllerBase.PhysicalFile(string, string, string, bool)
ControllerBase.PhysicalFile(string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.PhysicalFile(string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.PhysicalFile(string, string, string, DateTimeOffset?, EntityTagHeaderValue)
ControllerBase.PhysicalFile(string, string, string, DateTimeOffset?, EntityTagHeaderValue, bool)
ControllerBase.Unauthorized()
ControllerBase.Unauthorized(object)
ControllerBase.NotFound()
ControllerBase.NotFound(object)
ControllerBase.BadRequest()
ControllerBase.BadRequest(object)
ControllerBase.BadRequest(ModelStateDictionary)
ControllerBase.UnprocessableEntity()
ControllerBase.UnprocessableEntity(object)
ControllerBase.UnprocessableEntity(ModelStateDictionary)
ControllerBase.Conflict()
ControllerBase.Conflict(object)
ControllerBase.Conflict(ModelStateDictionary)
ControllerBase.Problem(string, string, int?, string, string)
ControllerBase.ValidationProblem(ValidationProblemDetails)
ControllerBase.ValidationProblem(ModelStateDictionary)
ControllerBase.ValidationProblem()
ControllerBase.ValidationProblem(string, string, int?, string, string, ModelStateDictionary)
ControllerBase.Created()
ControllerBase.Created(string, object)
ControllerBase.Created(Uri, object)
ControllerBase.CreatedAtAction(string, object)
ControllerBase.CreatedAtAction(string, object, object)
ControllerBase.CreatedAtAction(string, string, object, object)
ControllerBase.CreatedAtRoute(string, object)
ControllerBase.CreatedAtRoute(object, object)
ControllerBase.CreatedAtRoute(string, object, object)
ControllerBase.Accepted()
ControllerBase.Accepted(object)
ControllerBase.Accepted(Uri)
ControllerBase.Accepted(string)
ControllerBase.Accepted(string, object)
ControllerBase.Accepted(Uri, object)
ControllerBase.AcceptedAtAction(string)
ControllerBase.AcceptedAtAction(string, string)
ControllerBase.AcceptedAtAction(string, object)
ControllerBase.AcceptedAtAction(string, string, object)
ControllerBase.AcceptedAtAction(string, object, object)
ControllerBase.AcceptedAtAction(string, string, object, object)
ControllerBase.AcceptedAtRoute(object)
ControllerBase.AcceptedAtRoute(string)
ControllerBase.AcceptedAtRoute(string, object)
ControllerBase.AcceptedAtRoute(object, object)
ControllerBase.AcceptedAtRoute(string, object, object)
ControllerBase.Challenge()
ControllerBase.Challenge(params string[])
ControllerBase.Challenge(AuthenticationProperties)
ControllerBase.Challenge(AuthenticationProperties, params string[])
ControllerBase.Forbid()
ControllerBase.Forbid(params string[])
ControllerBase.Forbid(AuthenticationProperties)
ControllerBase.Forbid(AuthenticationProperties, params string[])
ControllerBase.SignIn(ClaimsPrincipal)
ControllerBase.SignIn(ClaimsPrincipal, string)
ControllerBase.SignIn(ClaimsPrincipal, AuthenticationProperties)
ControllerBase.SignIn(ClaimsPrincipal, AuthenticationProperties, string)
ControllerBase.SignOut()
ControllerBase.SignOut(AuthenticationProperties)
ControllerBase.SignOut(params string[])
ControllerBase.SignOut(AuthenticationProperties, params string[])
ControllerBase.TryUpdateModelAsync<TModel>(TModel)
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string)
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string, IValueProvider)
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string, params Expression<Func<TModel, object>>[])
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string, Func<ModelMetadata, bool>)
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string, IValueProvider, params Expression<Func<TModel, object>>[])
ControllerBase.TryUpdateModelAsync<TModel>(TModel, string, IValueProvider, Func<ModelMetadata, bool>)
ControllerBase.TryUpdateModelAsync(object, Type, string)
ControllerBase.TryUpdateModelAsync(object, Type, string, IValueProvider, Func<ModelMetadata, bool>)
ControllerBase.TryValidateModel(object)
ControllerBase.TryValidateModel(object, string)
ControllerBase.HttpContext
ControllerBase.Request
ControllerBase.Response
ControllerBase.RouteData
ControllerBase.ModelState
ControllerBase.ControllerContext
ControllerBase.MetadataProvider
ControllerBase.ModelBinderFactory
ControllerBase.Url
ControllerBase.ObjectValidator
ControllerBase.ProblemDetailsFactory
ControllerBase.User
ControllerBase.Empty
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.DecisionModeler
Assembly: WMServer.dll
Syntax
[Route("decisionModel")]
[Authorize]
[ApiController]
public class DecisionModelController : ControllerBase

Constructors

DecisionModelController(WMAppDbContext)

Declaration
public DecisionModelController(WMAppDbContext context)
Parameters
Type Name Description
WMAppDbContext context

Methods

AddDecisionModelElements(string, ICollection<JObject>?)

Add the decision model elements specified in the body of the request to the decision model with the specified ID.

Declaration
[HttpPost("{id}/elements")]
public Task<IActionResult> AddDecisionModelElements(string id, ICollection<JObject>? elements)
Parameters
Type Name Description
string id
ICollection<JObject> elements
Returns
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

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
Type Description
Task<ActionResult<IEnumerable<OpenDIDecisionModel>>>
Exceptions
Type Condition
Exception

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
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

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
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

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
Type Description
Task<ActionResult<IEnumerable<DecisionModelDTO>>>

An array of Decision Model objects.

Remarks

The list of Decision Models is provided in a "lazy loading" format, where sub-objects (such as elements, references to the Decision Model owner, etc.) are not provided as JSON objects, or only the IDs of these objects are returned. The returned format is shown below:

[
    {
        "ownerID": "fb17b649-ba0f-4af0-b32e-92cc1bb18392",
        "ownerType": "Quantellia.WMServer.Auth.WMUser",
        "name": "Decision Model 1",
        "summary": "A Decision Model",
        "documentation": "",
        "DocumentationMIMEType": "",
        "id": "ff2668d6-d6ac-4d2b-a503-569ea4a13666"
    },
    {
        "ownerID": "e230c098-1e7b-4acc-9f9e-3c12fe14a632",
        "ownerType": "Quantellia.WMServer.Auth.WMUser",
        "name": "Decision Model 2",
        "summary": "Another Decision Model",
         "documentation": "",
        "DocumentationMIMEType": "",
        "id": "4636233e-7e4b-4697-8cc1-3b65c4bb0e2a"
    }
]

If full details of a sub-object are requried, the Evaluate operation for the class can

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
Type Description
Task<ActionResult<OpenDIDecisionModel>>

The Decision Model with the specified ID in the Open DI format.

Remarks

If the ID property is not specified, a new ID will be created. IDs are GUIDs.

GetDependencies(ICollection<JObject>?)

Get the dependencies between each element provided.

Declaration
[HttpPost("dependencies")]
public Task<ActionResult<List<ElementDependencyResults>>> GetDependencies(ICollection<JObject>? elements)
Parameters
Type Name Description
ICollection<JObject> elements

The elements in the model.

Returns
Type Description
Task<ActionResult<List<ElementDependencyResults>>>

GetDependencies(string)

Get the dependencies between each element in a decision model.

Declaration
[HttpGet("{id}/dependencies")]
public Task<ActionResult<List<ElementDependencyResults>>> GetDependencies(string id)
Parameters
Type Name Description
string id

The ID of the model.

Returns
Type Description
Task<ActionResult<List<ElementDependencyResults>>>

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
Type Description
Task<ActionResult<IEnumerable<OpenDISimulation>>>
Exceptions
Type Condition
Exception

PatchDecisionModel(string, OpenDIDecisionModel)

Patch the properties of an existing decision model. If an element array is passed, it will replace all existing elements.

Declaration
[HttpPatch("{id}")]
public Task<IActionResult> PatchDecisionModel(string id, OpenDIDecisionModel openDI_dm)
Parameters
Type Name Description
string id
OpenDIDecisionModel openDI_dm
Returns
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

PatchDecisionModelElements(string, DecisionModelElementPatchDocument)

Patch the elements of an existing decision model. Supports any number of sets and deletions. A set will add a new element or replace an existing one with the same ID. A deletion will delete any element, depending on ID.

Declaration
[HttpPatch("{id}/elements")]
public Task<IActionResult> PatchDecisionModelElements(string id, DecisionModelElementPatchDocument dmPatchDocument)
Parameters
Type Name Description
string id
DecisionModelElementPatchDocument dmPatchDocument
Returns
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

PostDecisionModel(OpenDIDecisionModel)

Add a new DecisionModel to the database with all included elements.

Declaration
[HttpPost]
public Task<ActionResult<OpenDIDecisionModel>> PostDecisionModel(OpenDIDecisionModel openDI_dm)
Parameters
Type Name Description
OpenDIDecisionModel openDI_dm
Returns
Type Description
Task<ActionResult<OpenDIDecisionModel>>

PutDecisionModelDTO(string, OpenDIDecisionModel)

Update the Decision Model with the specified ID with values specified in the body of the request. This will replace all decision model elements with what is provided in the request.

Declaration
[HttpPut("{id}")]
public Task<IActionResult> PutDecisionModelDTO(string id, OpenDIDecisionModel openDI_dm)
Parameters
Type Name Description
string id
OpenDIDecisionModel openDI_dm
Returns
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

PutDecisionModelwithElements(string, OpenDIDecisionModel)

Update the decision model with the specified ID with values spoecified in the body of the request.

Declaration
[HttpPut("{id}/withElements")]
public Task<IActionResult> PutDecisionModelwithElements(string id, OpenDIDecisionModel openDI_dm)
Parameters
Type Name Description
string id
OpenDIDecisionModel openDI_dm
Returns
Type Description
Task<IActionResult>
Exceptions
Type Condition
Exception

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
Type Description
Task<ActionResult<IEnumerable<VersionArgs>>>
Exceptions
Type Condition
Exception
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 11/16/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE