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
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class ReportExportRequest : ReportDefinition()
{
    open var Format:String? = null
    open var Title:String? = null
    open var FileName:String? = null
}

open class ReportDefinition
{
    open var DatasetCode:String? = null
    open var Dimensions:ArrayList<String> = ArrayList<String>()
    open var Measures:ArrayList<ReportMeasure> = ArrayList<ReportMeasure>()
    open var Joins:ArrayList<String> = ArrayList<String>()
    open var Filters:String? = null
    open var Sorts:ArrayList<ReportSort> = ArrayList<ReportSort>()
    open var Limit:Int? = null
}

open class ReportMeasure
{
    open var FieldCode:String? = null
    open var Agg:String? = null
}

open class ReportSort
{
    open var FieldCode:String? = null
    open var Dir:String? = null
}

Kotlin ReportExportRequest 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/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[])