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
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

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

enum Action
{
    Start,
    Command,
    Other,
}

/**
* Add a statistic entity.
*/
// @Api(Description="Add a statistic entity.")
class AddStatistic implements IConvertible
{
    /**
    * Computername
    */
    // @ApiMember(Description="Computername", IsRequired=true)
    String? Computer;

    /**
    * Program for the statistic entry
    */
    // @ApiMember(Description="Program for the statistic entry", IsRequired=true)
    ProgramName? ProgramName;

    /**
    * Version of the program
    */
    // @ApiMember(Description="Version of the program")
    String? ProgramVersion;

    /**
    * Action of statistic
    */
    // @ApiMember(Description="Action of statistic", IsRequired=true)
    Action? Action;

    /**
    * First parameter
    */
    // @ApiMember(Description="First parameter", IsRequired=true)
    String? Param1;

    /**
    * Second parameter
    */
    // @ApiMember(Description="Second parameter")
    String? Param2;

    AddStatistic({this.Computer,this.ProgramName,this.ProgramVersion,this.Action,this.Param1,this.Param2});
    AddStatistic.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Computer = json['Computer'];
        ProgramName = JsonConverters.fromJson(json['ProgramName'],'ProgramName',context!);
        ProgramVersion = json['ProgramVersion'];
        Action = JsonConverters.fromJson(json['Action'],'Action',context!);
        Param1 = json['Param1'];
        Param2 = json['Param2'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Computer': Computer,
        'ProgramName': JsonConverters.toJson(ProgramName,'ProgramName',context!),
        'ProgramVersion': ProgramVersion,
        'Action': JsonConverters.toJson(Action,'Action',context!),
        'Param1': Param1,
        'Param2': Param2
    };

    getTypeName() => "AddStatistic";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
    'ProgramName': TypeInfo(TypeOf.Enum, enumValues:ProgramName.values),
    'Action': TypeInfo(TypeOf.Enum, enumValues:Action.values),
    'AddStatistic': TypeInfo(TypeOf.Class, create:() => AddStatistic()),
});

Dart AddStatistic DTOs

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

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"Computer":"String","ProgramName":"DO4Outlook","ProgramVersion":"String","Action":"Start","Param1":"String","Param2":"String"}