Mercedes.VehicleManagement.API

<back to all web services

DashboardReportRequest

Reports
Requires Authentication
The following routes are available for this service:
POST/v1/reportsRetrieve Report by ReportName and Filters
import Foundation
import ServiceStack

public class DashboardReportRequest : IPost, Codable
{
    /**
    * Report Name
    */
    // @ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")
    public var reportName:String

    /**
    * Filters
    */
    // @ApiMember(Description="Filters", IsRequired=true, ParameterType="body")
    public var filters:[String:ReportFilter] = [:]

    /**
    * Paging
    */
    // @ApiMember(Description="Paging", ParameterType="body")
    public var paging:ReportsPaging

    /**
    * Sorting
    */
    // @ApiMember(Description="Sorting", ParameterType="body")
    public var sorting:[String:ReportSortType] = [:]

    required public init(){}
}

public class ReportFilter : Codable
{
    public var type:ReportFilterType
    public var values:[String]
    public var start:Date?
    public var end:Date?
    public var higherThan:Int?
    public var lowerThan:Int?

    required public init(){}
}

public enum ReportFilterType : String, Codable
{
    case list
    case list_like
    case date
    case range
}

public class ReportsPaging : Codable
{
    public var page:Int
    public var pageSize:Int

    required public init(){}
}

public enum ReportSortType : String, Codable
{
    case asc
    case desc
}

public class DashboardReportResult : Codable
{
    public var totalCount:Int
    public var reportResult:[String]

    required public init(){}
}


Swift DashboardReportRequest DTOs

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

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
Content-Length: length

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

{"totalCount":0}