Statistics API
This C# SDK is automatically generated by the Swagger Codegen project:
- API version: 9.0.000.00.333
- SDK version: 1.0.0
- Build package: io.swagger.codegen.languages.CSharpClientCodegen
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
The DLLs included in the package may not be the latest version. We recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Genesys.Statistics.Api;
using Genesys.Statistics.Client;
using Genesys.Statistics.Model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out Genesys.Statistics.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
using System;
using System.Diagnostics;
using Genesys.Statistics.Api;
using Genesys.Statistics.Client;
using Genesys.Statistics.Model;
namespace Example
{
public class Example
{
public void main()
{
var apiInstance = new StatisticsApi();
var statistics = statistics_example; // string | definitions for statistics which are to be opened with stat server
try
{
// Opens the stat server subscription for the specified set of statistics
ApiResponse result = apiInstance.CreateSubscription(statistics);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling StatisticsApi.CreateSubscription: " + e.Message );
}
}
}
}
All URIs are relative to https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
StatisticsApi | CreateSubscription | POST /statistics/v3/subscriptions | Opens the stat server subscription for the specified set of statistics |
StatisticsApi | DeleteSubscription | DELETE /statistics/v3/subscriptions/{id} | Deletes the specified stat server subscription |
StatisticsApi | GetStatValue | GET /statistics/v3/statistic-values/{statisticName} | Peeks the value of specified statistic |
StatisticsApi | GetStatValues | POST /statistics/v3/operations/get-statistic-ex | Peeks the values of specified statistics |
StatisticsApi | PeekSubscriptionStats | GET /statistics/v3/subscriptions/{id}/statistic-values | Peeks the values of statistics opened inside the specified subscription |
- Model.ApiResponse
- Model.ApiResponseStatus
- Model.PeekedStatisticValue
- Model.StatisticValue
- Model.StatisticsData
All endpoints do not require authorization.