| POST | /api/statistics |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.DTO.Statistics.Operations
Namespace Global
Namespace IDB.API.DTO.Statistics.Operations
Public Enum Action
Start
Command
NewDoc
ChangeDoc
NewVersion
Send
Other
End Enum
'''<Summary>
'''Add a statistic entity.
'''</Summary>
<Api(Description:="Add a statistic entity.")>
Public Partial Class AddStatistic
'''<Summary>
'''Computername
'''</Summary>
<ApiMember(Description:="Computername", IsRequired:=true)>
Public Overridable Property Computer As String
'''<Summary>
'''Program for the statistic entry
'''</Summary>
<ApiMember(Description:="Program for the statistic entry", IsRequired:=true)>
Public Overridable Property ProgramName As ProgramName
'''<Summary>
'''Version of the program
'''</Summary>
<ApiMember(Description:="Version of the program")>
Public Overridable Property ProgramVersion As String
'''<Summary>
'''Action of statistic
'''</Summary>
<ApiMember(Description:="Action of statistic", IsRequired:=true)>
Public Overridable Property Action As Action
'''<Summary>
'''First parameter
'''</Summary>
<ApiMember(Description:="First parameter", IsRequired:=true)>
Public Overridable Property Param1 As String
'''<Summary>
'''Second parameter
'''</Summary>
<ApiMember(Description:="Second parameter")>
Public Overridable Property Param2 As String
'''<Summary>
'''Duration of action
'''</Summary>
<ApiMember(Description:="Duration of action")>
Public Overridable Property Duration As Long?
End Class
Public Enum ProgramName
DO4Outlook
DO4Word
DO4Excel
DO4PowerPoint
ITS
Other
DigiOfficeMobile
End Enum
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/statistics HTTP/1.1
Host: test-dogw.klokgroep.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Computer: String,
ProgramName: DO4Outlook,
ProgramVersion: String,
Action: Start,
Param1: String,
Param2: String,
Duration: 0
}