<back to all web services

MapDataRequest

The following routes are available for this service:
All Verbs/RestApi/Sitefinity/Analytics/GetMapData
All Verbs/RestApi/GetMapData
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model
Imports Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO
Imports Telerik.Sitefinity.Analytics.Server.Core.Domain.Model

Namespace Global

    Namespace Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO

        Public Partial Class DashBoardControl
            Public Sub New()
                attributes = New Dictionary(Of String, String)
                Series = New List(Of SingleSerie)
                RelatedDimension = New List(Of String)
            End Sub

            Public Overridable Property ControlType As String
            Public Overridable Property attributes As Dictionary(Of String, String)
            Public Overridable Property PlaceholderId As String
            Public Overridable Property DisplayName As String
            Public Overridable Property Series As List(Of SingleSerie)
            Public Overridable Property DimensionName As String
            Public Overridable Property RelatedDimension As List(Of String)
            Public Overridable Property SortbyField As String
            Public Overridable Property SortAsc As Boolean
        End Class

        <DataContract>
        Public Partial Class DimensionItem
            <DataMember>
            Public Overridable Property Value As String

            <DataMember>
            Public Overridable Property Name As String
        End Class

        Public Partial Class KendoItem
            Public Sub New()
                values = New Dictionary(Of String, Double)
                Dimensions = New Dictionary(Of String, String)
            End Sub

            Public Overridable Property category As String
            Public Overridable Property values As Dictionary(Of String, Double)
            Public Overridable Property group As String
            Public Overridable Property tooltip As String
            Public Overridable Property Dimensions As Dictionary(Of String, String)
        End Class

        Public Partial Class MetricItemDTO
            Public Overridable Property Name As String
            Public Overridable Property DisplayName As String
            Public Overridable Property Value As Double
            Public Overridable Property Unit As String
            Public Overridable Property DenominatorMetricName As String
            Public Overridable Property NominatorMetricName As String
            Public Overridable Property ShowInSelector As Boolean
        End Class

        Public Partial Class SingleSerie
            Public Sub New()
                SeriesDimensions = New List(Of DimensionItem)
            End Sub

            Public Overridable Property MainMetric As MetricItemDTO
            Public Overridable Property CategoryFormat As String
            Public Overridable Property Batch As Boolean
            Public Overridable Property IsCategory As Boolean
            Public Overridable Property SeriesName As String
            Public Overridable Property SeriesDimensions As List(Of DimensionItem)
            Public Overridable Property RelatedDimension As String
        End Class
    End Namespace

    Namespace Telerik.Sitefinity.Analytics.Server.Core.Domain.Model

        Public Enum Dimension
            Browser
            BrowserVersion
            City
            Continent
            VisitCount
            Country
            [Date]
            Day
            DaysSinceLastSession
            FlashVersion
            Hostname
            Hour
            DeviceCategory
            JavaEnabled
            Language
            Latitude
            Longitude
            Month
            NetworkDomain
            NetworkLocation
            PageDepth
            OperatingSystem
            OperatingSystemVersion
            Region
            ScreenColors
            ScreenResolution
            SubContinent
            UserDefinedValue
            UserType
            Week
            Year
            AdContent
            AdGroup
            AdSlot
            Campaign
            Keyword
            Medium
            ReferralPath
            Source
            ExitPagePath
            LandingPagePath
            PagePath
            PageTitle
            Affiliation
            DaysToTransaction
            ProductCategory
            ProductName
            ProductSku
            TransactionId
            SearchCategory
            SearchDestinationPage
            SearchKeyword
            SearchKeywordRefinement
            SearchStartPage
            SearchUsed
            EventCategory
            EventAction
            EventLabel
        End Enum
    End Namespace

    Namespace Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model

        Public Partial Class GetDashboardData
            Public Sub New()
                Controls = New List(Of DashBoardControl)
                MetricNames = New List(Of MetricItemDTO)
                DateItems = New List(Of KendoItem)
                NonDateItems = New List(Of KendoItem)
                MapDataTable = New String(){}
                SeriesSources = New Dictionary(Of String, List(Of String))
            End Sub

            Public Overridable Property Controls As List(Of DashBoardControl)
            Public Overridable Property LayoutTemplateName As String
            Public Overridable Property GroupBy As String
            Public Overridable Property MetricNames As List(Of MetricItemDTO)
            Public Overridable Property ErrorMessage As String
            Public Overridable Property NeedsGrouping As Boolean
            Public Overridable Property IsDrillDown As Boolean
            Public Overridable Property DateItems As List(Of KendoItem)
            Public Overridable Property NonDateItems As List(Of KendoItem)
            Public Overridable Property TotalsItem As KendoItem
            Public Overridable Property MapDataTable As String()
            Public Overridable Property IsMapRequest As Boolean
            Public Overridable Property SeriesSources As Dictionary(Of String, List(Of String))
            Public Overridable Property StatusCode As Integer
            Public Overridable Property SuppressMultipleSeries As Boolean
        End Class

        Public Partial Class MapDataRequest
            Public Sub New()
                Metrics = New List(Of MetricItemDTO)
            End Sub

            Public Overridable Property DashboardId As Guid
            Public Overridable Property RelatedDashboardId As Guid
            Public Overridable Property Metrics As List(Of MetricItemDTO)
            Public Overridable Property Filter As String
            Public Overridable Property Dimension As Dimension
            Public Overridable Property jsStartDate As String
            Public Overridable Property jsEndDate As String
            Public Overridable Property SelectedMetric As String
            Public Overridable Property Region As String
            Public Overridable Property SiteId As Guid
            Public Overridable Property StartDate As Date
            Public Overridable Property EndDate As Date
        End Class
    End Namespace
End Namespace

VB.NET MapDataRequest 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 /RestApi/Sitefinity/Analytics/GetMapData HTTP/1.1 
Host: www.asg.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'MapDataRequest' using the custom 'csv' filter}One or more errors occurred.
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Controls":[{"ControlType":"String","attributes":{"String":"String"},"PlaceholderId":"String","DisplayName":"String","Series":[{"MainMetric":{"Name":"String","DisplayName":"String","Value":0,"Unit":"String","DenominatorMetricName":"String","NominatorMetricName":"String","ShowInSelector":false},"CategoryFormat":"String","Batch":false,"IsCategory":false,"SeriesName":"String","SeriesDimensions":[{}],"RelatedDimension":"String"}],"DimensionName":"String","RelatedDimension":["String"],"SortbyField":"String","SortAsc":false}],"LayoutTemplateName":"String","GroupBy":"String","MetricNames":[{"Name":"String","DisplayName":"String","Value":0,"Unit":"String","DenominatorMetricName":"String","NominatorMetricName":"String","ShowInSelector":false}],"ErrorMessage":"String","NeedsGrouping":false,"IsDrillDown":false,"DateItems":[{"category":"String","values":{"String":0},"group":"String","tooltip":"String","Dimensions":{"String":"String"}}],"NonDateItems":[{"category":"String","values":{"String":0},"group":"String","tooltip":"String","Dimensions":{"String":"String"}}],"TotalsItem":{"category":"String","values":{"String":0},"group":"String","tooltip":"String","Dimensions":{"String":"String"}},"MapDataTable":[["String"]],"IsMapRequest":false,"SeriesSources":{"String":["String"]},"StatusCode":0,"SuppressMultipleSeries":false}