All Verbs | /RestApi/Sitefinity/Analytics/GetMapData | ||
---|---|---|---|
All Verbs | /RestApi/GetMapData |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class MapDataRequest
{
public UUID DashboardId = null;
public UUID RelatedDashboardId = null;
public ArrayList<MetricItemDTO> Metrics = null;
public String Filter = null;
public Dimension Dimension = null;
public String jsStartDate = null;
public String jsEndDate = null;
public String SelectedMetric = null;
public String Region = null;
public UUID SiteId = null;
public Date StartDate = null;
public Date EndDate = null;
public UUID getDashboardId() { return DashboardId; }
public MapDataRequest setDashboardId(UUID value) { this.DashboardId = value; return this; }
public UUID getRelatedDashboardId() { return RelatedDashboardId; }
public MapDataRequest setRelatedDashboardId(UUID value) { this.RelatedDashboardId = value; return this; }
public ArrayList<MetricItemDTO> getMetrics() { return Metrics; }
public MapDataRequest setMetrics(ArrayList<MetricItemDTO> value) { this.Metrics = value; return this; }
public String getFilter() { return Filter; }
public MapDataRequest setFilter(String value) { this.Filter = value; return this; }
public Dimension getDimension() { return Dimension; }
public MapDataRequest setDimension(Dimension value) { this.Dimension = value; return this; }
public String getJsStartDate() { return jsStartDate; }
public MapDataRequest setJsStartDate(String value) { this.jsStartDate = value; return this; }
public String getJsEndDate() { return jsEndDate; }
public MapDataRequest setJsEndDate(String value) { this.jsEndDate = value; return this; }
public String getSelectedMetric() { return SelectedMetric; }
public MapDataRequest setSelectedMetric(String value) { this.SelectedMetric = value; return this; }
public String getRegion() { return Region; }
public MapDataRequest setRegion(String value) { this.Region = value; return this; }
public UUID getSiteId() { return SiteId; }
public MapDataRequest setSiteId(UUID value) { this.SiteId = value; return this; }
public Date getStartDate() { return StartDate; }
public MapDataRequest setStartDate(Date value) { this.StartDate = value; return this; }
public Date getEndDate() { return EndDate; }
public MapDataRequest setEndDate(Date value) { this.EndDate = value; return this; }
}
public static class MetricItemDTO
{
public String Name = null;
public String DisplayName = null;
public Double Value = null;
public String Unit = null;
public String DenominatorMetricName = null;
public String NominatorMetricName = null;
public Boolean ShowInSelector = null;
public String getName() { return Name; }
public MetricItemDTO setName(String value) { this.Name = value; return this; }
public String getDisplayName() { return DisplayName; }
public MetricItemDTO setDisplayName(String value) { this.DisplayName = value; return this; }
public Double getValue() { return Value; }
public MetricItemDTO setValue(Double value) { this.Value = value; return this; }
public String getUnit() { return Unit; }
public MetricItemDTO setUnit(String value) { this.Unit = value; return this; }
public String getDenominatorMetricName() { return DenominatorMetricName; }
public MetricItemDTO setDenominatorMetricName(String value) { this.DenominatorMetricName = value; return this; }
public String getNominatorMetricName() { return NominatorMetricName; }
public MetricItemDTO setNominatorMetricName(String value) { this.NominatorMetricName = value; return this; }
public Boolean isShowInSelector() { return ShowInSelector; }
public MetricItemDTO setShowInSelector(Boolean value) { this.ShowInSelector = value; return this; }
}
public static 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;
}
public static class GetDashboardData
{
public ArrayList<DashBoardControl> Controls = null;
public String LayoutTemplateName = null;
public String GroupBy = null;
public ArrayList<MetricItemDTO> MetricNames = null;
public String ErrorMessage = null;
public Boolean NeedsGrouping = null;
public Boolean IsDrillDown = null;
public ArrayList<KendoItem> DateItems = null;
public ArrayList<KendoItem> NonDateItems = null;
public KendoItem TotalsItem = null;
public ArrayList<String> MapDataTable = null;
public Boolean IsMapRequest = null;
public HashMap<String,ArrayList<String>> SeriesSources = null;
public Integer StatusCode = null;
public Boolean SuppressMultipleSeries = null;
public ArrayList<DashBoardControl> getControls() { return Controls; }
public GetDashboardData setControls(ArrayList<DashBoardControl> value) { this.Controls = value; return this; }
public String getLayoutTemplateName() { return LayoutTemplateName; }
public GetDashboardData setLayoutTemplateName(String value) { this.LayoutTemplateName = value; return this; }
public String getGroupBy() { return GroupBy; }
public GetDashboardData setGroupBy(String value) { this.GroupBy = value; return this; }
public ArrayList<MetricItemDTO> getMetricNames() { return MetricNames; }
public GetDashboardData setMetricNames(ArrayList<MetricItemDTO> value) { this.MetricNames = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public GetDashboardData setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public Boolean isNeedsGrouping() { return NeedsGrouping; }
public GetDashboardData setNeedsGrouping(Boolean value) { this.NeedsGrouping = value; return this; }
public Boolean getIsDrillDown() { return IsDrillDown; }
public GetDashboardData setIsDrillDown(Boolean value) { this.IsDrillDown = value; return this; }
public ArrayList<KendoItem> getDateItems() { return DateItems; }
public GetDashboardData setDateItems(ArrayList<KendoItem> value) { this.DateItems = value; return this; }
public ArrayList<KendoItem> getNonDateItems() { return NonDateItems; }
public GetDashboardData setNonDateItems(ArrayList<KendoItem> value) { this.NonDateItems = value; return this; }
public KendoItem getTotalsItem() { return TotalsItem; }
public GetDashboardData setTotalsItem(KendoItem value) { this.TotalsItem = value; return this; }
public ArrayList<String> getMapDataTable() { return MapDataTable; }
public GetDashboardData setMapDataTable(ArrayList<String> value) { this.MapDataTable = value; return this; }
public Boolean getIsMapRequest() { return IsMapRequest; }
public GetDashboardData setIsMapRequest(Boolean value) { this.IsMapRequest = value; return this; }
public HashMap<String,ArrayList<String>> getSeriesSources() { return SeriesSources; }
public GetDashboardData setSeriesSources(HashMap<String,ArrayList<String>> value) { this.SeriesSources = value; return this; }
public Integer getStatusCode() { return StatusCode; }
public GetDashboardData setStatusCode(Integer value) { this.StatusCode = value; return this; }
public Boolean isSuppressMultipleSeries() { return SuppressMultipleSeries; }
public GetDashboardData setSuppressMultipleSeries(Boolean value) { this.SuppressMultipleSeries = value; return this; }
}
public static class DashBoardControl
{
public String ControlType = null;
public HashMap<String,String> attributes = null;
public String PlaceholderId = null;
public String DisplayName = null;
public ArrayList<SingleSerie> Series = null;
public String DimensionName = null;
public ArrayList<String> RelatedDimension = null;
public String SortbyField = null;
public Boolean SortAsc = null;
public String getControlType() { return ControlType; }
public DashBoardControl setControlType(String value) { this.ControlType = value; return this; }
public HashMap<String,String> getAttributes() { return attributes; }
public DashBoardControl setAttributes(HashMap<String,String> value) { this.attributes = value; return this; }
public String getPlaceholderId() { return PlaceholderId; }
public DashBoardControl setPlaceholderId(String value) { this.PlaceholderId = value; return this; }
public String getDisplayName() { return DisplayName; }
public DashBoardControl setDisplayName(String value) { this.DisplayName = value; return this; }
public ArrayList<SingleSerie> getSeries() { return Series; }
public DashBoardControl setSeries(ArrayList<SingleSerie> value) { this.Series = value; return this; }
public String getDimensionName() { return DimensionName; }
public DashBoardControl setDimensionName(String value) { this.DimensionName = value; return this; }
public ArrayList<String> getRelatedDimension() { return RelatedDimension; }
public DashBoardControl setRelatedDimension(ArrayList<String> value) { this.RelatedDimension = value; return this; }
public String getSortbyField() { return SortbyField; }
public DashBoardControl setSortbyField(String value) { this.SortbyField = value; return this; }
public Boolean isSortAsc() { return SortAsc; }
public DashBoardControl setSortAsc(Boolean value) { this.SortAsc = value; return this; }
}
public static class SingleSerie
{
public MetricItemDTO MainMetric = null;
public String CategoryFormat = null;
public Boolean Batch = null;
public Boolean IsCategory = null;
public String SeriesName = null;
public ArrayList<DimensionItem> SeriesDimensions = null;
public String RelatedDimension = null;
public MetricItemDTO getMainMetric() { return MainMetric; }
public SingleSerie setMainMetric(MetricItemDTO value) { this.MainMetric = value; return this; }
public String getCategoryFormat() { return CategoryFormat; }
public SingleSerie setCategoryFormat(String value) { this.CategoryFormat = value; return this; }
public Boolean isBatch() { return Batch; }
public SingleSerie setBatch(Boolean value) { this.Batch = value; return this; }
public Boolean getIsCategory() { return IsCategory; }
public SingleSerie setIsCategory(Boolean value) { this.IsCategory = value; return this; }
public String getSeriesName() { return SeriesName; }
public SingleSerie setSeriesName(String value) { this.SeriesName = value; return this; }
public ArrayList<DimensionItem> getSeriesDimensions() { return SeriesDimensions; }
public SingleSerie setSeriesDimensions(ArrayList<DimensionItem> value) { this.SeriesDimensions = value; return this; }
public String getRelatedDimension() { return RelatedDimension; }
public SingleSerie setRelatedDimension(String value) { this.RelatedDimension = value; return this; }
}
@DataContract
public static class DimensionItem
{
@DataMember
public String Value = null;
@DataMember
public String Name = null;
public String getValue() { return Value; }
public DimensionItem setValue(String value) { this.Value = value; return this; }
public String getName() { return Name; }
public DimensionItem setName(String value) { this.Name = value; return this; }
}
public static class KendoItem
{
public String category = null;
public HashMap<String,Double> values = null;
public String group = null;
public String tooltip = null;
public HashMap<String,String> Dimensions = null;
public String getCategory() { return category; }
public KendoItem setCategory(String value) { this.category = value; return this; }
public HashMap<String,Double> getValues() { return values; }
public KendoItem setValues(HashMap<String,Double> value) { this.values = value; return this; }
public String getGroup() { return group; }
public KendoItem setGroup(String value) { this.group = value; return this; }
public String getTooltip() { return tooltip; }
public KendoItem setTooltip(String value) { this.tooltip = value; return this; }
public HashMap<String,String> getDimensions() { return Dimensions; }
public KendoItem setDimensions(HashMap<String,String> value) { this.Dimensions = value; return this; }
}
}
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>