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
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using IDB.API.DTO.Statistics.Operations;

namespace IDB.API.DTO.Statistics.Operations
{
    public enum Action
    {
        Start,
        Command,
        Other,
    }

    ///<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 virtual string Computer { get; set; }

        ///<summary>
        ///Program for the statistic entry
        ///</summary>
        [ApiMember(Description="Program for the statistic entry", IsRequired=true)]
        public virtual ProgramName ProgramName { get; set; }

        ///<summary>
        ///Version of the program
        ///</summary>
        [ApiMember(Description="Version of the program")]
        public virtual string ProgramVersion { get; set; }

        ///<summary>
        ///Action of statistic
        ///</summary>
        [ApiMember(Description="Action of statistic", IsRequired=true)]
        public virtual Action Action { get; set; }

        ///<summary>
        ///First parameter
        ///</summary>
        [ApiMember(Description="First parameter", IsRequired=true)]
        public virtual string Param1 { get; set; }

        ///<summary>
        ///Second parameter
        ///</summary>
        [ApiMember(Description="Second parameter")]
        public virtual string Param2 { get; set; }
    }

    public enum ProgramName
    {
        DO4Outlook,
        DO4Word,
        DO4Excel,
        DO4PowerPoint,
        ITS,
        Other,
    }

}

C# 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>