Class AssetDirectoryController
Controller class for WMAssetDirectory
Inherited Members
Namespace: Quantellia.WMServer.Asset.Controllers
Assembly: WMServer.dll
Syntax
[Route("assetDirectory")]
[Authorize]
[ApiController]
public class AssetDirectoryController : ControllerBase
Constructors
AssetDirectoryController(WMAppDbContext)
Declaration
public AssetDirectoryController(WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMAppDbContext | context |
Methods
DeleteAssetDirectory(string)
Delete the WMAssetDirectory with the specified ID from the database.
Declaration
[HttpDelete("{id}")]
public Task<IActionResult> DeleteAssetDirectory(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID of the specified WMAssetDirectory |
Returns
Type | Description |
---|---|
Task<IActionResult> |
Exceptions
Type | Condition |
---|---|
Exception |
Get(int)
Evaluate the WMAssetDirectory with the specified ID. If there is no corresponding ID, treat the ID as a FullPathName, and search for the corresponding WMAssetDirectory, otherwise return 404.
Additionally return all child directories with a recursive depth indicated by depth
. To return all child directories, specify a depth of -1.
Declaration
[HttpGet]
public Task<ActionResult<OpenDIAssetDirectory>> Get(int depth = 0)
Parameters
Type | Name | Description |
---|---|---|
int | depth | The recursive depth of child directories to return. |
Returns
Type | Description |
---|---|
Task<ActionResult<OpenDIAssetDirectory>> | The WMAssetDirectory with the specified ID in the Open DI format. |
Get(string, int)
Evaluate the WMAssetDirectory with the specified ID. If there is no corresponding ID, treat the ID as a FullPathName, and search for the corresponding WMAssetDirectory, otherwise return 404.
Additionally return all child directories with a recursive depth indicated by depth
. To return all child directories, specify a depth of -1.
Declaration
[HttpGet("{id}")]
public Task<ActionResult<OpenDIAssetDirectory>> Get(string id, int depth = 0)
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID or directory of a WMAssetDirectory |
int | depth | The recursive depth of child directories to return. |
Returns
Type | Description |
---|---|
Task<ActionResult<OpenDIAssetDirectory>> | The WMAssetDirectory with the specified ID in the Open DI format. |
PostAssetDirectory(OpenDIAssetDirectory)
Add a new WMAssetDirectory to the database.
Declaration
[HttpPost]
public Task<ActionResult<OpenDIAssetDirectory>> PostAssetDirectory(OpenDIAssetDirectory OpenDI_ad)
Parameters
Type | Name | Description |
---|---|---|
OpenDIAssetDirectory | OpenDI_ad |
Returns
Type | Description |
---|---|
Task<ActionResult<OpenDIAssetDirectory>> |
PutAssetDirectory(string, OpenDIAssetDirectory)
Update the WMAssetDirectoryDTO with the specified ID with values specified in the body of the request.
Declaration
[HttpPut("{id}")]
public Task<IActionResult> PutAssetDirectory(string id, OpenDIAssetDirectory OpenDI_ad)
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID of the assetDirectory to be updated |
OpenDIAssetDirectory | OpenDI_ad | The content of the assetDirectory to be updated. Note that assetDirectory.ID must be equal to |
Returns
Type | Description |
---|---|
Task<IActionResult> |
Exceptions
Type | Condition |
---|---|
Exception |