DigiOffice API Services Services

<back to all web services

GetAnalyticsInfo

import Foundation
import ServiceStack

// @DataContract
public class GetAnalyticsInfo : IGet, Codable
{
    // @DataMember(Order=1)
    public var month:Date?

    // @DataMember(Order=2)
    public var type:String

    // @DataMember(Order=3)
    public var op:String

    // @DataMember(Order=4)
    public var apiKey:String

    // @DataMember(Order=5)
    public var userId:String

    // @DataMember(Order=6)
    public var ip:String

    required public init(){}
}

// @DataContract
public class GetAnalyticsInfoResponse : Codable
{
    // @DataMember(Order=1)
    public var months:[String]

    // @DataMember(Order=2)
    public var result:AnalyticsLogInfo

    // @DataMember(Order=3)
    public var responseStatus:ResponseStatus

    required public init(){}
}

// @DataContract
public class AnalyticsLogInfo : Codable
{
    // @DataMember(Order=1)
    public var id:Int

    // @DataMember(Order=2)
    public var dateTime:Date

    // @DataMember(Order=3)
    public var browser:String

    // @DataMember(Order=4)
    public var device:String

    // @DataMember(Order=5)
    public var bot:String

    // @DataMember(Order=6)
    public var op:String

    // @DataMember(Order=7)
    public var userId:String

    // @DataMember(Order=8)
    public var userName:String

    // @DataMember(Order=9)
    public var apiKey:String

    // @DataMember(Order=10)
    public var ip:String

    required public init(){}
}


Swift GetAnalyticsInfo DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/GetAnalyticsInfo HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Month":"0001-01-01T00:00:00.0000000","Type":"String","Op":"String","ApiKey":"String","UserId":"String","Ip":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Months":["String"],"Result":{"Id":0,"DateTime":"0001-01-01T00:00:00.0000000","Browser":"String","Device":"String","Bot":"String","Op":"String","UserId":"String","UserName":"String","ApiKey":"String","Ip":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}