| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/report/export |
|---|
namespace CRM.AgencyPlatform.API.Internal
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ReportMeasure() =
member val FieldCode:String = null with get,set
member val Agg:String = null with get,set
[<AllowNullLiteral>]
type ReportSort() =
member val FieldCode:String = null with get,set
member val Dir:String = null with get,set
[<AllowNullLiteral>]
type ReportDefinition() =
member val DatasetCode:String = null with get,set
member val Dimensions:ResizeArray<String> = new ResizeArray<String>() with get,set
member val Measures:ResizeArray<ReportMeasure> = new ResizeArray<ReportMeasure>() with get,set
member val Joins:ResizeArray<String> = new ResizeArray<String>() with get,set
member val Filters:String = null with get,set
member val Sorts:ResizeArray<ReportSort> = new ResizeArray<ReportSort>() with get,set
member val Limit:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ReportExportRequest() =
inherit ReportDefinition()
member val Format:String = null with get,set
member val Title:String = null with get,set
member val FileName:String = null with get,set
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
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[])