Show / Hide Table of Contents

Class DataSourceController

Controller for the REST API interface to DataSource management functions.

Inheritance
object
ControllerBase
DataSourceController
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.Asset.Controllers
Assembly: WMServer.dll
Syntax
[Route("dataSource")]
[Authorize]
[ApiController]
public class DataSourceController : ControllerBase

Constructors

DataSourceController(WMAppDbContext)

Constructor that injects the database context.

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

Methods

CommitTransaction(string)

Commit the transaction with the specified ID

Declaration
[HttpPost("commitTransaction/{xid}")]
public Task<ActionResult<string>> CommitTransaction(string xid)
Parameters
Type Name Description
string xid
Returns
Type Description
Task<ActionResult<string>>

Delete(string)

Delete an existing instance of a DataSource

Declaration
[HttpDelete("{id}")]
public Task<IActionResult> Delete(string id)
Parameters
Type Name Description
string id
Returns
Type Description
Task<IActionResult>

DeleteData(string, List<InsertUpdateDeleteArgs>)

delete existing data in the DataSource.

Declaration
[HttpPost("{id}/delete")]
public Task<ActionResult> DeleteData(string id, List<InsertUpdateDeleteArgs> args)
Parameters
Type Name Description
string id

The ID of the data source

List<InsertUpdateDeleteArgs> args

The data and conditions for the deletion

Returns
Type Description
Task<ActionResult>

Evaluate(string, DataSourceArgs)

Evaluates the query using the WMDataSource whose ID is specified in the URL argument, using the query text specified as the value of the sourceString key in the request body.

Declaration
[HttpPost("{id}/evaluate")]
public Task<ActionResult<OpenDIValue>> Evaluate(string id, DataSourceArgs args)
Parameters
Type Name Description
string id

ID of the data source against which the query is to be run

DataSourceArgs args

The source string, query action ('ReadTable' or 'ReadScalar'), output type ('CSV' or 'JSON') and and required query arguments.

Returns
Type Description
Task<ActionResult<OpenDIValue>>

Get()

Get the list of data sources owned by the current user.

Declaration
[HttpGet]
public Task<ActionResult<IEnumerable<OpenDIDataSource>>> Get()
Returns
Type Description
Task<ActionResult<IEnumerable<OpenDIDataSource>>>

Get(string)

Get the DataSource with the specified ID

Declaration
[HttpGet("{id}")]
public Task<ActionResult<OpenDIDataSource>> Get(string id)
Parameters
Type Name Description
string id
Returns
Type Description
Task<ActionResult<OpenDIDataSource>>

GetAccessorString(string)

Get the DataSource with the specified ID's connection/accessor string

Declaration
[HttpGet("{id}/accessorString")]
public Task<ActionResult<OpenDIDataSource>> GetAccessorString(string id)
Parameters
Type Name Description
string id
Returns
Type Description
Task<ActionResult<OpenDIDataSource>>

InsertData(string, List<InsertUpdateDeleteArgs>)

Insert new data into the DataSource.

Declaration
[HttpPost("{id}/add")]
public Task<ActionResult> InsertData(string id, List<InsertUpdateDeleteArgs> args)
Parameters
Type Name Description
string id

The ID of the data source

List<InsertUpdateDeleteArgs> args

The data to be inserted

Returns
Type Description
Task<ActionResult>

OpenTransaction(string)

Open a transaction on the datasource identified by the id URL parameter.

Declaration
[HttpPost("{id}/openTransaction")]
public Task<ActionResult<string>> OpenTransaction(string id)
Parameters
Type Name Description
string id
Returns
Type Description
Task<ActionResult<string>>

Post(OpenDIDataSource)

Create a new instance of a DataSource

Declaration
[HttpPost]
public Task<ActionResult<OpenDIDataSource>> Post(OpenDIDataSource openDI_ds)
Parameters
Type Name Description
OpenDIDataSource openDI_ds
Returns
Type Description
Task<ActionResult<OpenDIDataSource>>

Put(string, OpenDIDataSource)

Update an existing instance of a DataSource

Declaration
[HttpPut("{id}")]
public Task<IActionResult> Put(string id, OpenDIDataSource openDI_ds)
Parameters
Type Name Description
string id
OpenDIDataSource openDI_ds
Returns
Type Description
Task<IActionResult>

RollbackTransaction(string)

Commit the transaction with the specified ID

Declaration
[HttpPost("rollbackTransaction/{xid}")]
public Task<ActionResult<string>> RollbackTransaction(string xid)
Parameters
Type Name Description
string xid
Returns
Type Description
Task<ActionResult<string>>

SetAccessorString(string, AccessorStringArgs)

Set the DataSource with the specified ID's connection/accessor string

Declaration
[HttpPut("{id}/accessorString")]
public Task<ActionResult<OpenDIDataSource>> SetAccessorString(string id, AccessorStringArgs args)
Parameters
Type Name Description
string id
AccessorStringArgs args
Returns
Type Description
Task<ActionResult<OpenDIDataSource>>

UpdateData(string, List<InsertUpdateDeleteArgs>)

Update existing data in the DataSource.

Declaration
[HttpPost("{id}/update")]
public Task<ActionResult> UpdateData(string id, List<InsertUpdateDeleteArgs> args)
Parameters
Type Name Description
string id

The ID of the data source

List<InsertUpdateDeleteArgs> args

The data and conditions for the update

Returns
Type Description
Task<ActionResult>
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE