| 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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<ReportExportRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<DatasetCode>String</DatasetCode>
<Dimensions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Dimensions>
<Filters>String</Filters>
<Joins xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Joins>
<Limit>0</Limit>
<Measures>
<ReportMeasure>
<Agg>String</Agg>
<FieldCode>String</FieldCode>
</ReportMeasure>
</Measures>
<Sorts>
<ReportSort>
<Dir>String</Dir>
<FieldCode>String</FieldCode>
</ReportSort>
</Sorts>
<FileName>String</FileName>
<Format>String</Format>
<Title>String</Title>
</ReportExportRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length (byte[])