All Verbs | /RestApi/Sitefinity/Analytics/GetCustomMetricValues |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetCustomMetricValuesMessage
{
public ArrayList<String> MetricNames = null;
public Integer LastNDays = null;
public Integer MaxNDays = null;
public UUID SiteId = null;
public ArrayList<String> getMetricNames() { return MetricNames; }
public GetCustomMetricValuesMessage setMetricNames(ArrayList<String> value) { this.MetricNames = value; return this; }
public Integer getLastNDays() { return LastNDays; }
public GetCustomMetricValuesMessage setLastNDays(Integer value) { this.LastNDays = value; return this; }
public Integer getMaxNDays() { return MaxNDays; }
public GetCustomMetricValuesMessage setMaxNDays(Integer value) { this.MaxNDays = value; return this; }
public UUID getSiteId() { return SiteId; }
public GetCustomMetricValuesMessage setSiteId(UUID value) { this.SiteId = value; return this; }
}
public static class GetCustomMetricValuesData
{
public ArrayList<AnalyticsItem> Result = null;
public ArrayList<String> MetricDisplayNames = null;
public ArrayList<AnalyticsItem> getResult() { return Result; }
public GetCustomMetricValuesData setResult(ArrayList<AnalyticsItem> value) { this.Result = value; return this; }
public ArrayList<String> getMetricDisplayNames() { return MetricDisplayNames; }
public GetCustomMetricValuesData setMetricDisplayNames(ArrayList<String> value) { this.MetricDisplayNames = value; return this; }
}
@DataContract
public static class AnalyticsItem
{
@DataMember
public ArrayList<DimensionItem> Dimensions = null;
@DataMember
public ArrayList<MetricItem> Metrics = null;
@DataMember
public Double TotalItems = null;
public ArrayList<DimensionItem> getDimensions() { return Dimensions; }
public AnalyticsItem setDimensions(ArrayList<DimensionItem> value) { this.Dimensions = value; return this; }
public ArrayList<MetricItem> getMetrics() { return Metrics; }
public AnalyticsItem setMetrics(ArrayList<MetricItem> value) { this.Metrics = value; return this; }
public Double getTotalItems() { return TotalItems; }
public AnalyticsItem setTotalItems(Double value) { this.TotalItems = 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; }
}
@DataContract
public static class MetricItem
{
@DataMember
public Double Value = null;
public Double getValue() { return Value; }
public MetricItem setValue(Double value) { this.Value = value; return this; }
}
}
Java GetCustomMetricValuesMessage DTOs
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/GetCustomMetricValues HTTP/1.1
Host: www.asg.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetCustomMetricValuesMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model">
<LastNDays>0</LastNDays>
<MaxNDays>0</MaxNDays>
<MetricNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</MetricNames>
<SiteId>00000000-0000-0000-0000-000000000000</SiteId>
</GetCustomMetricValuesMessage>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetCustomMetricValuesData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.ServiceStackServices.Model"> <MetricDisplayNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>String</d2p1:string> </MetricDisplayNames> <Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Analytics.Server.Core.Domain.DTO"> <d2p1:AnalyticsItem i:nil="true" /> </Result> </GetCustomMetricValuesData>