| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/report/export |
|---|
export class ReportMeasure
{
public FieldCode: string;
public Agg: string;
public constructor(init?: Partial<ReportMeasure>) { (Object as any).assign(this, init); }
}
export class ReportSort
{
public FieldCode: string;
public Dir: string;
public constructor(init?: Partial<ReportSort>) { (Object as any).assign(this, init); }
}
export class ReportDefinition
{
public DatasetCode: string;
public Dimensions: string[] = [];
public Measures: ReportMeasure[] = [];
public Joins: string[] = [];
public Filters: string;
public Sorts: ReportSort[] = [];
public Limit: number;
public constructor(init?: Partial<ReportDefinition>) { (Object as any).assign(this, init); }
}
export class ReportExportRequest extends ReportDefinition
{
public Format: string;
public Title: string;
public FileName: string;
public constructor(init?: Partial<ReportExportRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript ReportExportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/report/export HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Format: String,
Title: String,
FileName: String,
DatasetCode: String,
Dimensions:
[
String
],
Measures:
[
{
FieldCode: String,
Agg: String
}
],
Joins:
[
String
],
Filters: String,
Sorts:
[
{
FieldCode: String,
Dir: String
}
],
Limit: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length (byte[])