This is an OmniCore Model and State Management server.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.8.10
- SDK version: 1.8.10
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit http://www.korewireless.com
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
Generate the DLL using your preferred tool (e.g. dotnet build
)
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using OmniCore.Api;
using OmniCore.Client;
using OmniCore.Model;
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using OmniCore.Api;
using OmniCore.Client;
using OmniCore.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.korewireless.com";
// Configure API key authorization: apiKey
config.ApiKey.Add("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("x-api-key", "Bearer");
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new DeviceApi(config);
var subscriptionId = "subscriptionId_example"; // string | Subscription ID
var registryId = "registryId_example"; // string | Registry ID
var bind = new BindRequest(); // BindRequest | application/json
try
{
Info result = apiInstance.BindDevice(subscriptionId, registryId, bind);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceApi.BindDevice: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://api.korewireless.com
Class | Method | HTTP request | Description |
---|---|---|---|
DeviceApi | BindDevice | POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/bindDeviceToGateway | |
DeviceApi | BindDevices | POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/bindDevicesToGateway | |
DeviceApi | BlockDeviceCommuncation | PUT /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/communication | |
DeviceApi | CreateDevice | POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices | |
DeviceApi | DeleteDevice | DELETE /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices/{deviceId} | |
DeviceApi | GetConfig | GET /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/configVersions | |
DeviceApi | GetDevice | GET /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices/{deviceId} | |
DeviceApi | GetDevices | GET /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices | |
DeviceApi | GetStates | GET /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/states | |
DeviceApi | GetSubscriptionDevices | GET /omnicore/subscriptions/{subscriptionId}/devices | |
DeviceApi | SendCommandToDevice | POST /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/sendCommandToDevice | |
DeviceApi | UnBindDevice | POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/unbindDeviceFromGateway | |
DeviceApi | UnBindDevices | POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/unbindDevicesFromGateway | |
DeviceApi | UpdateConfigurationToDevice | POST /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/updateConfigurationToDevice | |
DeviceApi | UpdateCustomOnboardRequest | POST /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/devices/{deviceId}/updateCustomOnboardRequest | |
DeviceApi | UpdateDevice | PATCH /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices/{deviceId} | |
MetricsApi | GetMetrics | GET /omnicore/subscriptions/{subscriptionId}/metrics | |
RegistryApi | CreateRegistry | POST /omnicore/subscriptions/{subscriptionId}/registries | |
RegistryApi | DeleteRegistry | DELETE /omnicore/subscriptions/{subscriptionId}/registries/{registryId} | |
RegistryApi | GetRegistries | GET /omnicore/subscriptions/{subscriptionId}/registries | |
RegistryApi | GetRegistry | GET /omnicore/subscriptions/{subscriptionId}/registries/{registryId} | |
RegistryApi | SendBroadcastToDevices | POST /omnicore/subscriptions/{subscriptionid}/registries/{registryId}/sendBroadcastToDevice | |
RegistryApi | UpdateRegistry | PATCH /omnicore/subscriptions/{subscriptionId}/registries/{registryId} | |
SinkApi | CreateSink | POST /omnicore/subscriptions/{subscriptionId}/sinks | |
SinkApi | DeleteSink | DELETE /omnicore/subscriptions/{subscriptionId}/sinks/{sinkId} | |
SinkApi | GetASink | GET /omnicore/subscriptions/{subscriptionId}/sinks/{sinkId} | |
SinkApi | GetSinks | GET /omnicore/subscriptions/{subscriptionId}/sinks | Get All Sinks |
VaultApi | CreateVaultConfiguration | POST /vault/subscriptions/{subscriptionid}/configurations | |
VaultApi | CreateVaultKey | POST /vault/subscriptions/{subscriptionid}/encryptionkeys | |
VaultApi | DeleteConfiguration | DELETE /vault/subscriptions/{subscriptionid}/configurations/{configid} | |
VaultApi | DeleteVaultKey | DELETE /vault/subscriptions/{subscriptionid}/encryptionkeys/{keyid} | |
VaultApi | EnableEncryption | POST /vault/subscriptions/{subscriptionid}/encryption | |
VaultApi | GetExports | GET /vault/subscriptions/{subscriptionid}/exports | |
VaultApi | GetRegistryData | GET /vault/subscriptions/{subscriptionid}/folders | |
VaultApi | GetReplays | GET /vault/subscriptions/{subscriptionid}/replays | |
VaultApi | GetVaultAudit | GET /vault/subscriptions/{subscriptionid}/audit | |
VaultApi | GetVaultConfigurations | GET /vault/subscriptions/{subscriptionid}/configurations | |
VaultApi | GetVaultFiles | GET /vault/subscriptions/{subscriptionid}/registry/{registryid}/files | |
VaultApi | GetVaultKeys | GET /vault/subscriptions/{subscriptionid}/encryptionkeys | |
VaultApi | GetVaultMetrics | GET /vault/subscriptions/{subscriptionid}/metrics | |
VaultApi | GetVaultStatus | GET /vault/subscriptions/{subscriptionid}/status | |
VaultApi | SetRetention | POST /vault/subscriptions/{subscriptionid}/retention | |
VaultApi | StartExport | POST /vault/subscriptions/{subscriptionid}/exports | |
VaultApi | StartReplay | POST /vault/subscriptions/{subscriptionid}/replays |
- Model.Audit
- Model.AuditResult
- Model.BindRequest
- Model.BindRequestIdsGateway
- Model.BlockCommunicationBody
- Model.Config
- Model.Configurations
- Model.CreateConfiguration
- Model.CreateVaultKeyBody
- Model.CustomOnboard
- Model.Device
- Model.DeviceCommand
- Model.DeviceConfig
- Model.DeviceConfiguration
- Model.DeviceCredential
- Model.DeviceOnline
- Model.DeviceRegistry
- Model.DeviceState
- Model.EnableEncryptionBody
- Model.ErrorFrame
- Model.ErrorStatus
- Model.EventNotificationConfig
- Model.ExportDetail
- Model.FileDetail
- Model.FileDetails
- Model.Folder
- Model.FolderData
- Model.Frame
- Model.GatewayConfig
- Model.GenericErrorResponse
- Model.GetExportsResponse
- Model.GetKeysResponse
- Model.GetReplaysResponse
- Model.HttpConfig
- Model.Info
- Model.ListDeviceConfigVersionsResponse
- Model.ListDeviceRegistries
- Model.ListDeviceStatesResponse
- Model.ListDevicesOnlineResponse
- Model.ListDevicesResponse
- Model.ListSinks
- Model.LogLevel
- Model.Metrics
- Model.MetricsData
- Model.MetricsDetails
- Model.MetricsLogs
- Model.MetricsResponse
- Model.MetricsResponseDetails
- Model.MqttConfig
- Model.NotificationConfig
- Model.OperationMetrics
- Model.Policy
- Model.PublicKeyCertificate
- Model.PublicKeyCredential
- Model.RegistryCredential
- Model.Replay
- Model.ReplayBody
- Model.SetRetentionBody
- Model.Sink
- Model.StartExportBody
- Model.VaultConfiguration
- Model.VaultEncryptionKey
- Model.VaultStatus
- Model.VaultStatusDetails
- Model.X509CertificateDetails
- Type: Bearer Authentication
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header