Get contents FileStreamResult for a file created from template with specified attributes. Suggested file name is returned in response header Content-Disposition.
Response from cards API CardGetFileContentResponse isn't returned. But if there are errors occured, they are returned as PlainValidationResult object as typed JSON with status BadRequest.
[HttpPostAttribute("get-file-template")]
[SessionMethodAttribute(UserAccessLevel.Regular)]
[TypedJsonBodyAttribute]
[ConsumesAttribute("application/json", new string[] { ... })]
[ProducesAttribute("application/octet-stream", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> PostGetFileTemplate(
[FromBodyAttribute] CardGetFileTemplateRequest request,
[FromQueryAttribute] bool showErrorPage = false,
CancellationToken cancellationToken = default
)
<HttpPostAttribute("get-file-template")>
<SessionMethodAttribute(UserAccessLevel.Regular)>
<TypedJsonBodyAttribute>
<ConsumesAttribute("application/json", New String() { ... })>
<ProducesAttribute("application/octet-stream", New String() { ... })>
<ProducesResponseTypeAttribute(200)>
Public Function PostGetFileTemplate (
<FromBodyAttribute> request As CardGetFileTemplateRequest,
<FromQueryAttribute> Optional showErrorPage As Boolean = false,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of IActionResult)
public:
[HttpPostAttribute(L"get-file-template")]
[SessionMethodAttribute(UserAccessLevel::Regular)]
[TypedJsonBodyAttribute]
[ConsumesAttribute(L"application/json", __gc new array<String^>^ { ... })]
[ProducesAttribute(L"application/octet-stream", __gc new array<String^>^ { ... })]
[ProducesResponseTypeAttribute(200)]
Task<IActionResult^>^ PostGetFileTemplate(
[FromBodyAttribute] CardGetFileTemplateRequest^ request,
[FromQueryAttribute] bool showErrorPage = false,
CancellationToken cancellationToken = CancellationToken()
)
[<HttpPostAttribute("get-file-template")>]
[<SessionMethodAttribute(UserAccessLevel.Regular)>]
[<TypedJsonBodyAttribute>]
[<ConsumesAttribute("application/json", new string[] { ... })>]
[<ProducesAttribute("application/octet-stream", new string[] { ... })>]
[<ProducesResponseTypeAttribute(200)>]
member PostGetFileTemplate :
[<FromBodyAttribute>] request : CardGetFileTemplateRequest *
[<FromQueryAttribute>] ?showErrorPage : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _showErrorPage = defaultArg showErrorPage false
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IActionResult>