Trendsic Platform Service

<back to all web services

ReportExportRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
Content-Length: length

(byte[])