POST | /v1/reports | Retrieve Report by ReportName and Filters |
---|
namespace Mercedes.VehicleManagement.API.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type DashboardReportResult() =
member val TotalCount:Int32 = new Int32() with get,set
member val ReportResult:IEnumerable<Object> = null with get,set
type ReportFilterType =
| list = 0
| list_like = 1
| date = 2
| range = 3
[<AllowNullLiteral>]
type ReportFilter() =
member val Type:ReportFilterType = new ReportFilterType() with get,set
member val Values:IEnumerable<String> = null with get,set
member val Start:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val End:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val HigherThan:Nullable<Int32> = new Nullable<Int32>() with get,set
member val LowerThan:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type ReportsPaging() =
member val Page:Int32 = new Int32() with get,set
member val PageSize:Int32 = new Int32() with get,set
type ReportSortType =
| asc = 0
| desc = 1
[<AllowNullLiteral>]
type DashboardReportRequest() =
interface IPost
///<summary>
///Report Name
///</summary>
[<ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")>]
member val ReportName:String = null with get,set
///<summary>
///Filters
///</summary>
[<ApiMember(Description="Filters", IsRequired=true, ParameterType="body")>]
member val Filters:Dictionary<String, ReportFilter> = null with get,set
///<summary>
///Paging
///</summary>
[<ApiMember(Description="Paging", ParameterType="body")>]
member val Paging:ReportsPaging = null with get,set
///<summary>
///Sorting
///</summary>
[<ApiMember(Description="Sorting", ParameterType="body")>]
member val Sorting:Dictionary<String, ReportSortType> = null with get,set
F# DashboardReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/reports HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
reportName: String,
filters:
{
String:
{
type: list,
start: 0001-01-01,
end: 0001-01-01,
higherThan: 0,
lowerThan: 0
}
},
paging:
{
page: 0,
pageSize: 0
},
sorting:
{
String: asc
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { totalCount: 0 }