ReportingAPI

<back to all web services

PostLinkReportRequest

Requires Authentication
The following routes are available for this service:
POST/v4/report/links
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class PostLinkReportRequest : IPostLinkReportRequest
{
    @DataMember(Name="reports")
    @SerializedName("reports")
    override var reports:ArrayList<ReportRequest>? = null
}

@DataContract
open class ReportRequest
{
    @DataMember(Name="items")
    @SerializedName("items")
    open var items:ArrayList<String>? = null

    @DataMember(Name="groupBy")
    @SerializedName("groupBy")
    open var groupBy:ArrayList<GroupBy>? = null

    @DataMember(Name="attribute")
    @SerializedName("attribute")
    open var attribute:String? = null

    @DataMember(Name="type")
    @SerializedName("type")
    open var Type:ReportType? = null

    @DataMember(Name="fromStartUtcInclusive")
    @SerializedName("fromStartUtcInclusive")
    open var fromStartUtcInclusive:Date? = null

    @DataMember(Name="fromEndUtcInclusive")
    @SerializedName("fromEndUtcInclusive")
    open var fromEndUtcInclusive:Date? = null

    @DataMember(Name="retailers")
    @SerializedName("retailers")
    open var retailers:ArrayList<String>? = null
}

enum class GroupBy
{
    Default,
    Retailer,
    Date,
}

enum class ReportType
{
    ShortUrl,
    Group,
    User,
}

@DataContract
open class PostLinkReportResponse : IPostLinkReportResponse
{
    @DataMember(Name="reports")
    @SerializedName("reports")
    override var reports:ArrayList<Report>? = null

    @DataMember(Name="responseStatus")
    @SerializedName("responseStatus")
    open var responseStatus:ResponseStatus? = null
}

@DataContract
open class Report
{
    @DataMember(Name="data")
    @SerializedName("data")
    open var Data:ArrayList<ReportData>? = null

    @DataMember(Name="executionTimeMs")
    @SerializedName("executionTimeMs")
    open var executionTimeMs:Long? = null

    @DataMember(Name="totalItems")
    @SerializedName("totalItems")
    open var totalItems:Long? = null

    @DataMember(Name="errors")
    @SerializedName("errors")
    open var errors:ArrayList<Error>? = null

    @DataMember(Name="request")
    @SerializedName("request")
    open var request:ReportRequest? = null

    @DataMember(Name="totalClicks")
    @SerializedName("totalClicks")
    open var totalClicks:Long? = null
}

@DataContract
open class ReportData
{
    @DataMember(Name="id")
    @SerializedName("id")
    open var id:String? = null

    @DataMember(Name="item")
    @SerializedName("item")
    open var item:Item? = null

    @DataMember(Name="totalClicks")
    @SerializedName("totalClicks")
    open var totalClicks:BigInteger? = null

    @DataMember(Name="clicks")
    @SerializedName("clicks")
    open var actualClicks:BigInteger? = null

    @DataMember(Name="junkClicks")
    @SerializedName("junkClicks")
    open var junkClicks:BigInteger? = null

    @DataMember(Name="spiderClicks")
    @SerializedName("spiderClicks")
    open var spiderClicks:BigInteger? = null

    @DataMember(Name="dateUtc")
    @SerializedName("dateUtc")
    open var dateUtc:Date? = null
}

@DataContract
open class Item
{
    @DataMember(Name="id")
    @SerializedName("id")
    open var id:String? = null

    @DataMember(Name="displayName")
    @SerializedName("displayName")
    open var displayName:String? = null
}

@DataContract
open class Error
{
    @DataMember(Name="code")
    @SerializedName("code")
    open var code:String? = null
}

Kotlin PostLinkReportRequest 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 /v4/report/links HTTP/1.1 
Host: reporting-api-zane.dev.platform.georiot.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
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"}}}