Trendsic Platform Service

<back to all web services

ReportRunRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/report/run
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 ReportColumnMeta
            Public Overridable Property Code As String
            Public Overridable Property Name As String
            Public Overridable Property DataType As String
            Public Overridable Property FieldKind As String
            Public Overridable Property Agg As String
        End Class

        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 ReportMeasure
            Public Overridable Property FieldCode As String
            Public Overridable Property Agg As String
        End Class

        Public Partial Class ReportRunRequest
            Inherits ReportDefinition
        End Class

        Public Partial Class ReportRunResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Result As ReportRunResult
        End Class

        Public Partial Class ReportRunResult
            Public Overridable Property Columns As List(Of ReportColumnMeta) = New List(Of ReportColumnMeta)
            Public Overridable Property Rows As List(Of Dictionary(Of String,Object)) = New List(Of Dictionary(Of String,Object))
            Public Overridable Property RowCount As Integer
            Public Overridable Property Truncated As Boolean
            Public Overridable Property Notes As List(Of String) = New List(Of 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 ReportRunRequest DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/report/run HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"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/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Result":{"Columns":[{"Code":"String","Name":"String","DataType":"String","FieldKind":"String","Agg":"String"}],"Rows":[{"String":{}}],"RowCount":0,"Truncated":false,"Notes":["String"]}}