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
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class ReportDefinition
            Public Overridable Property DatasetCode As String
            Public Overridable Property Dimensions As List(Of String) = New List(Of String)
            Public Overridable Property Measures As List(Of ReportMeasure) = New List(Of ReportMeasure)
            Public Overridable Property Joins As List(Of String) = New List(Of String)
            Public Overridable Property Filters As String
            Public Overridable Property Sorts As List(Of ReportSort) = New List(Of ReportSort)
            Public Overridable Property Limit As Integer
        End Class

        Public Partial Class ReportExportRequest
            Inherits ReportDefinition
            Public Overridable Property Format As String
            Public Overridable Property Title As String
            Public Overridable Property FileName As String
        End Class

        Public Partial Class ReportMeasure
            Public Overridable Property FieldCode As String
            Public Overridable Property Agg As String
        End Class

        Public Partial Class ReportSort
            Public Overridable Property FieldCode As String
            Public Overridable Property Dir As String
        End Class
    End Namespace
End Namespace

VB.NET ReportExportRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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/csv
Content-Type: text/csv
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/csv
Content-Length: length

(byte[])