POST | /v1/reports/Csv | Retrieve Report by ReportName and Filters and return as CSV |
---|
export class DashboardReportResult
{
public totalCount: number;
public reportResult: Object[];
public constructor(init?: Partial<DashboardReportResult>) { (Object as any).assign(this, init); }
}
export enum ReportFilterType
{
list = 'list',
list_like = 'list_like',
date = 'date',
range = 'range',
}
export class ReportFilter
{
public type: ReportFilterType;
public values: string[];
public start?: string;
public end?: string;
public higherThan?: number;
public lowerThan?: number;
public constructor(init?: Partial<ReportFilter>) { (Object as any).assign(this, init); }
}
export class DashboardCsvReportsRequest implements IPost
{
/** @description Report Name */
// @ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")
public reportName: string;
/** @description Filters */
// @ApiMember(Description="Filters", IsRequired=true, ParameterType="body")
public filters: { [index:string]: ReportFilter; } = {};
public constructor(init?: Partial<DashboardCsvReportsRequest>) { (Object as any).assign(this, init); }
}
TypeScript DashboardCsvReportsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/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}}}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"totalCount":0}