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
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 /RestApi/Sitefinity/Analytics/GetMapData HTTP/1.1
Host: www.asg.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MapDataRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model">
<DashboardId>00000000-0000-0000-0000-000000000000</DashboardId>
<Dimension>Browser</Dimension>
<Filter>String</Filter>
<Metrics xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO">
<d2p1:MetricItemDTO>
<d2p1:DenominatorMetricName>String</d2p1:DenominatorMetricName>
<d2p1:DisplayName>String</d2p1:DisplayName>
<d2p1:Name>String</d2p1:Name>
<d2p1:NominatorMetricName>String</d2p1:NominatorMetricName>
<d2p1:ShowInSelector>false</d2p1:ShowInSelector>
<d2p1:Unit>String</d2p1:Unit>
<d2p1:Value>0</d2p1:Value>
</d2p1:MetricItemDTO>
</Metrics>
<Region>String</Region>
<RelatedDashboardId>00000000-0000-0000-0000-000000000000</RelatedDashboardId>
<SelectedMetric>String</SelectedMetric>
<SiteId>00000000-0000-0000-0000-000000000000</SiteId>
<jsEndDate>String</jsEndDate>
<jsStartDate>String</jsStartDate>
</MapDataRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetDashboardData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model"> <Controls xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:DashBoardControl> <d2p1:ControlType>String</d2p1:ControlType> <d2p1:DimensionName>String</d2p1:DimensionName> <d2p1:DisplayName>String</d2p1:DisplayName> <d2p1:PlaceholderId>String</d2p1:PlaceholderId> <d2p1:RelatedDimension xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </d2p1:RelatedDimension> <d2p1:Series> <d2p1:SingleSerie> <d2p1:Batch>false</d2p1:Batch> <d2p1:CategoryFormat>String</d2p1:CategoryFormat> <d2p1:IsCategory>false</d2p1:IsCategory> <d2p1:MainMetric> <d2p1:DenominatorMetricName>String</d2p1:DenominatorMetricName> <d2p1:DisplayName>String</d2p1:DisplayName> <d2p1:Name>String</d2p1:Name> <d2p1:NominatorMetricName>String</d2p1:NominatorMetricName> <d2p1:ShowInSelector>false</d2p1:ShowInSelector> <d2p1:Unit>String</d2p1:Unit> <d2p1:Value>0</d2p1:Value> </d2p1:MainMetric> <d2p1:RelatedDimension>String</d2p1:RelatedDimension> <d2p1:SeriesDimensions> <d2p1:DimensionItem i:nil="true" /> </d2p1:SeriesDimensions> <d2p1:SeriesName>String</d2p1:SeriesName> </d2p1:SingleSerie> </d2p1:Series> <d2p1:SortAsc>false</d2p1:SortAsc> <d2p1:SortbyField>String</d2p1:SortbyField> <d2p1:attributes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </d2p1:attributes> </d2p1:DashBoardControl> </Controls> <DateItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:KendoItem> <d2p1:Dimensions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </d2p1:Dimensions> <d2p1:category>String</d2p1:category> <d2p1:group>String</d2p1:group> <d2p1:tooltip>String</d2p1:tooltip> <d2p1:values xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringdouble> <d4p1:Key>String</d4p1:Key> <d4p1:Value>0</d4p1:Value> </d4p1:KeyValueOfstringdouble> </d2p1:values> </d2p1:KendoItem> </DateItems> <ErrorMessage>String</ErrorMessage> <GroupBy>String</GroupBy> <IsDrillDown>false</IsDrillDown> <IsMapRequest>false</IsMapRequest> <LayoutTemplateName>String</LayoutTemplateName> <MapDataTable xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:ArrayOfstring> <d2p1:string>String</d2p1:string> </d2p1:ArrayOfstring> </MapDataTable> <MetricNames xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:MetricItemDTO> <d2p1:DenominatorMetricName>String</d2p1:DenominatorMetricName> <d2p1:DisplayName>String</d2p1:DisplayName> <d2p1:Name>String</d2p1:Name> <d2p1:NominatorMetricName>String</d2p1:NominatorMetricName> <d2p1:ShowInSelector>false</d2p1:ShowInSelector> <d2p1:Unit>String</d2p1:Unit> <d2p1:Value>0</d2p1:Value> </d2p1:MetricItemDTO> </MetricNames> <NeedsGrouping>false</NeedsGrouping> <NonDateItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:KendoItem> <d2p1:Dimensions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </d2p1:Dimensions> <d2p1:category>String</d2p1:category> <d2p1:group>String</d2p1:group> <d2p1:tooltip>String</d2p1:tooltip> <d2p1:values xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringdouble> <d4p1:Key>String</d4p1:Key> <d4p1:Value>0</d4p1:Value> </d4p1:KeyValueOfstringdouble> </d2p1:values> </d2p1:KendoItem> </NonDateItems> <SeriesSources xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringArrayOfstringty7Ep6D1> <d2p1:Key>String</d2p1:Key> <d2p1:Value> <d2p1:string>String</d2p1:string> </d2p1:Value> </d2p1:KeyValueOfstringArrayOfstringty7Ep6D1> </SeriesSources> <StatusCode>0</StatusCode> <SuppressMultipleSeries>false</SuppressMultipleSeries> <TotalsItem xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:Dimensions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Dimensions> <d2p1:category>String</d2p1:category> <d2p1:group>String</d2p1:group> <d2p1:tooltip>String</d2p1:tooltip> <d2p1:values xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringdouble> <d3p1:Key>String</d3p1:Key> <d3p1:Value>0</d3p1:Value> </d3p1:KeyValueOfstringdouble> </d2p1:values> </TotalsItem> </GetDashboardData>