POST | /api/statistics |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Add a statistic entity.
*/
@Api(Description="Add a statistic entity.")
public static class AddStatistic
{
/**
* Computername
*/
@ApiMember(Description="Computername", IsRequired=true)
public String Computer = null;
/**
* Program for the statistic entry
*/
@ApiMember(Description="Program for the statistic entry", IsRequired=true)
public ProgramName ProgramName = null;
/**
* Version of the program
*/
@ApiMember(Description="Version of the program")
public String ProgramVersion = null;
/**
* Action of statistic
*/
@ApiMember(Description="Action of statistic", IsRequired=true)
public Action Action = null;
/**
* First parameter
*/
@ApiMember(Description="First parameter", IsRequired=true)
public String Param1 = null;
/**
* Second parameter
*/
@ApiMember(Description="Second parameter")
public String Param2 = null;
public String getComputer() { return Computer; }
public AddStatistic setComputer(String value) { this.Computer = value; return this; }
public ProgramName getProgramName() { return ProgramName; }
public AddStatistic setProgramName(ProgramName value) { this.ProgramName = value; return this; }
public String getProgramVersion() { return ProgramVersion; }
public AddStatistic setProgramVersion(String value) { this.ProgramVersion = value; return this; }
public Action getAction() { return Action; }
public AddStatistic setAction(Action value) { this.Action = value; return this; }
public String getParam1() { return Param1; }
public AddStatistic setParam1(String value) { this.Param1 = value; return this; }
public String getParam2() { return Param2; }
public AddStatistic setParam2(String value) { this.Param2 = value; return this; }
}
public static enum ProgramName
{
DO4Outlook,
DO4Word,
DO4Excel,
DO4PowerPoint,
Its,
Other;
}
public static enum Action
{
Start,
Command,
Other;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"Computer":"String","ProgramName":"DO4Outlook","ProgramVersion":"String","Action":"Start","Param1":"String","Param2":"String"}