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
package dtos

import (
	"time"
)

type DashboardReportResult struct {
	TotalCount   int           `json:"totalCount,omitempty"`
	ReportResult []interface{} `json:"reportResult"`
}

type ReportFilterType string

const (
	ReportFilterTypelist      ReportFilterType = "list"
	ReportFilterTypelist_like                  = "list_like"
	ReportFilterTypedate                       = "date"
	ReportFilterTyperange                      = "range"
)

type ReportFilter struct {
	Type       ReportFilterType `json:"type,omitempty"`
	Values     []string         `json:"values"`
	Start      *time.Time       `json:"start,omitempty"`
	End        *time.Time       `json:"end,omitempty"`
	HigherThan *int             `json:"higherThan,omitempty"`
	LowerThan  *int             `json:"lowerThan,omitempty"`
}

type ReportsPaging struct {
	Page     int `json:"page,omitempty"`
	PageSize int `json:"pageSize,omitempty"`
}

type ReportSortType string

const (
	ReportSortTypeasc  ReportSortType = "asc"
	ReportSortTypedesc                = "desc"
)

type DashboardReportRequest struct {
	/** @description Report Name */
	// @ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")
	ReportName string `json:"reportName"`
	/** @description Filters */
	// @ApiMember(Description="Filters", IsRequired=true, ParameterType="body")
	Filters map[string]ReportFilter `json:"filters"`
	/** @description Paging */
	// @ApiMember(Description="Paging", ParameterType="body")
	Paging ReportsPaging `json:"paging"`
	/** @description Sorting */
	// @ApiMember(Description="Sorting", ParameterType="body")
	Sorting map[string]ReportSortType `json:"sorting"`
}

Go DashboardReportRequest DTOs

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

HTTP + 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
}