BoonAmber - the C# library for the Amber API Server
Boon Logic Amber API Server
This C# SDK is automatically generated by the OpenAPI Codegen project:
- API version: 1.0.3
- SDK version: 1.0.0
- Build package: openapi-generator-cli:v6.0.01
Frameworks supported
- .NET Core >=6.0
- .NET Framework >=4.5.2
Dependencies
- RestSharp >= 106.13.0
- JsonSubTypes >= 1.8.0
- Newtonsoft.Json >= 13.0.1
- Polly >= 7.2.3
- System.ComponentModel.Annotations >= 5.0.0
Installation
Boon Amber is available via Nuget: https://www.nuget.org/packages/BoonAmber
dotnet add package BoonAmber --version 1.0.3
Alternatively the DLL can built from source using the dotnet cli:
dotnet build src/BoonAmber/BoonAmber.csproj
Include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using BoonAmber.Api;
using BoonAmber.Client;
using BoonAmber.Model;
Getting Started
using System;
using System.Diagnostics;
using BoonAmber.Api;
using BoonAmber.Client;
using BoonAmber.Model;
namespace Example
{
public class Example
{
public void main()
{
var apiInstance = new DefaultApi("default", "~/.Amber.license");
try
{
// Try to get version
var result = apiInstance.GetVersion();
Console.WriteLine(result);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling DefaultApi.GetVersion: " + e.Message );
}
}
}
}
Documentation for API Endpoints
All URIs are relative to http://amber.boonlogic.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | DeleteSensor | DELETE /sensor | Delete a sensor instance |
DefaultApi | GetAmberSummary | GET /__summary | Get the JSON block of the amber image |
DefaultApi | GetConfig | GET /config | Get the current configuration of a sensor instance |
DefaultApi | GetPretrain | GET /pretrain | Get status of pretrain operation |
DefaultApi | GetRootCause | GET /rootCause | Get root cause analysis information from a sensor |
DefaultApi | GetSensor | GET /sensor | Get basic information about a sensor instance |
DefaultApi | GetSensors | GET /sensors | List all sensors for this user |
DefaultApi | GetStatus | GET /status | Get analytic information from a sensor |
DefaultApi | GetVersion | GET /version | Retrieves API version information |
DefaultApi | PostConfig | POST /config | Apply configuration to a sensor instance |
DefaultApi | PostOauth2 | POST /oauth2 | Request a bearer token using Amber account credentials |
DefaultApi | PostOutage | POST /outage | Informs the server of an outage |
DefaultApi | PostPretrain | POST /pretrain | Pretrain a sensor using historical data |
DefaultApi | PostSensor | POST /sensor | Create a new a sensor instance |
DefaultApi | PostStream | POST /stream | Stream data to a sensor |
DefaultApi | PutConfig | PUT /config | Update configuration for a sensor instance |
DefaultApi | PutSensor | PUT /sensor | Update label for a sensor instance |
DefaultApi | PutStream | PUT /stream | Stream data to a sensor fusion vector |
Documentation for Models
- Model.EndpointUsageInfo
- Model.Error
- Model.FeatureConfig
- Model.Float32Array
- Model.FusionConfig
- Model.GetConfigResponse
- Model.GetPretrainResponse
- Model.GetRootCauseResponse
- Model.GetSensorResponse
- Model.GetSensorsResponse
- Model.GetStatusResponse
- Model.GetSummaryResponse
- Model.Int32Array
- Model.MAP
- Model.MAmberStatus
- Model.MAutotune
- Model.MBufferStats
- Model.MNCP
- Model.MNano
- Model.MNanoBackend
- Model.MNanoConfig
- Model.MPatternMemory
- Model.MRecentAMs
- Model.MRecentAnalytics
- Model.MRecentFloats
- Model.MRecentIDs
- Model.MRecentSamples
- Model.MRecentTimes
- Model.MStreamingParameters
- Model.MTraining
- Model.PCA
- Model.PostAuth2Request
- Model.PostAuth2Response
- Model.PostConfigRequest
- Model.PostConfigResponse
- Model.PostOutageResponse
- Model.PostPretrainRequest
- Model.PostPretrainResponse
- Model.PostSensorRequest
- Model.PostSensorResponse
- Model.PostStreamRequest
- Model.PostStreamResponse
- Model.PutConfigRequest
- Model.PutConfigResponse
- Model.PutSensorRequest
- Model.PutSensorResponse
- Model.PutStreamFeature
- Model.PutStreamRequest
- Model.PutStreamResponse
- Model.SensorInstance
- Model.SensorUsageInfo
- Model.StreamStatus
- Model.StreamingEndpointUsageInfo
- Model.StreamingParameters
- Model.Uint16Array
- Model.Uint32Array
- Model.Uint64Array
- Model.Version
Documentation for Authorization
Amber License File
Place an .Amber.license in your home directory:
{
"default": {
"username": "AMBER-ACCOUNT-USERNAME",
"password": "AMBER-ACCOUNT-PASSWORD",
"server": "https://amber.boonlogic.com/v1"
}
}
Use this license path when creating the API instance:
var apiInstance = new DefaultApi("default", "~/.Amber.license");
Amber License Environment Variables
Alternatively you can set the relevant Amber license environment variables:
export AMBER_USERNAME=AMBER-ACCOUNT-USERNAME
export AMBER_PASSWORD=AMBER-ACCOUNT-PASSWORD
export AMBER_SERVER=https://amber.boonlogic.com/v1
Then leave the license path empty when creating the API instance:
var apiInstance = new DefaultApi("", "");