DigiOffice Gateway Web Services

<back to all web services

AddStatistic

Add a statistic entity.

Requires Authentication
The following routes are available for this service:
POST/api/statistics
namespace IDB.API.DTO.Statistics.Operations

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type ProgramName =
        | DO4Outlook = 0
        | DO4Word = 1
        | DO4Excel = 2
        | DO4PowerPoint = 3
        | ITS = 4
        | Other = 5

    type Action =
        | Start = 0
        | Command = 1
        | Other = 2

    ///<summary>
    ///Add a statistic entity.
    ///</summary>
    [<Api(Description="Add a statistic entity.")>]
    [<AllowNullLiteral>]
    type AddStatistic() = 
        ///<summary>
        ///Computername
        ///</summary>
        [<ApiMember(Description="Computername", IsRequired=true)>]
        member val Computer:String = null with get,set

        ///<summary>
        ///Program for the statistic entry
        ///</summary>
        [<ApiMember(Description="Program for the statistic entry", IsRequired=true)>]
        member val ProgramName:ProgramName = new ProgramName() with get,set

        ///<summary>
        ///Version of the program
        ///</summary>
        [<ApiMember(Description="Version of the program")>]
        member val ProgramVersion:String = null with get,set

        ///<summary>
        ///Action of statistic
        ///</summary>
        [<ApiMember(Description="Action of statistic", IsRequired=true)>]
        member val Action:Action = new Action() with get,set

        ///<summary>
        ///First parameter
        ///</summary>
        [<ApiMember(Description="First parameter", IsRequired=true)>]
        member val Param1:String = null with get,set

        ///<summary>
        ///Second parameter
        ///</summary>
        [<ApiMember(Description="Second parameter")>]
        member val Param2:String = null with get,set

F# AddStatistic DTOs

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

HTTP + 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>