POST | /api/statistics |
---|
Imports System
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
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
End Class
Public Enum ProgramName
DO4Outlook
DO4Word
DO4Excel
DO4PowerPoint
ITS
Other
End Enum
End Namespace
End Namespace
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 /api/statistics HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AddStatistic xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Statistics.Operations">
<Action>Start</Action>
<Computer>String</Computer>
<Param1>String</Param1>
<Param2>String</Param2>
<ProgramName>DO4Outlook</ProgramName>
<ProgramVersion>String</ProgramVersion>
</AddStatistic>