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
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class DashboardCsvReportsRequest : IPost
{
    /**
    * Report Name
    */
    @ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")
    open var reportName:String? = null

    /**
    * Filters
    */
    @ApiMember(Description="Filters", IsRequired=true, ParameterType="body")
    open var filters:HashMap<String,ReportFilter> = HashMap<String,ReportFilter>()
}

open class ReportFilter
{
    @SerializedName("type") open var Type:ReportFilterType? = null
    open var values:ArrayList<String>? = null
    open var start:Date? = null
    open var end:Date? = null
    open var higherThan:Int? = null
    open var lowerThan:Int? = null
}

enum class ReportFilterType
{
    List,
    ListLike,
    Date,
    Range,
}

open class DashboardReportResult
{
    open var totalCount:Int? = null
    open var reportResult:ArrayList<Object>? = null
}

Kotlin 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}