Mercedes.VehicleManagement.API

<back to all web services

DashboardCsvReportsRequest

Reports
Requires Authentication
The following routes are available for this service:
POST/v1/reports/CsvRetrieve Report by ReportName and Filters and return as CSV
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 DashboardCsvReportsRequest() = 
        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

F# DashboardCsvReportsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/reports/Csv HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"reportName":"String","filters":{"String":{"type":"list","start":"\/Date(-62135596800000-0000)\/","end":"\/Date(-62135596800000-0000)\/","higherThan":0,"lowerThan":0}}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"totalCount":0}