API for device, collection, output and firmware management
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 4.1.3 factual-kahlil
- SDK version: 4.1.3
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit https://lab5e.com/span
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.10.1 or later
- Json.NET - 12.0.1 or later
- JsonSubTypes - 1.5.2 or later
- System.ComponentModel.Annotations - 4.5.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
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 spanclient.Api;
using spanclient.Client;
using spanclient.Model;using System.Collections.Generic;
using System.Diagnostics;
using spanclient.Api;
using spanclient.Client;
using spanclient.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com/span";
// Configure API key authorization: APIToken
config.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("X-API-Token", "Bearer");
var apiInstance = new CollectionsApi(config);
var collectionId = collectionId_example; // string |
var body = new SendMessageRequest(); // SendMessageRequest |
try
{
// Broadcast message
MultiSendMessageResponse result = apiInstance.BroadcastMessage(collectionId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CollectionsApi.BroadcastMessage: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}All URIs are relative to https://api.lab5e.com/span
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CollectionsApi | BroadcastMessage | POST /collections/{collectionId}/to | Broadcast message |
| CollectionsApi | CreateCollection | POST /collections | Create collection |
| CollectionsApi | DeleteCollection | DELETE /collections/{collectionId} | Delete collection |
| CollectionsApi | ListCollectionData | GET /collections/{collectionId}/data | Get payloads |
| CollectionsApi | ListCollections | GET /collections | List collections |
| CollectionsApi | RetrieveCollection | GET /collections/{collectionId} | Retrieve collection |
| CollectionsApi | UpdateCollection | PATCH /collections/{collectionId} | Update collection |
| DatadumpApi | DataDump | POST /datadump | Data dump |
| DevicesApi | CreateDevice | POST /collections/{collectionId}/devices | Create device |
| DevicesApi | DeleteDevice | DELETE /collections/{collectionId}/devices/{deviceId} | Remove device |
| DevicesApi | ListDeviceData | GET /collections/{collectionId}/devices/{deviceId}/data | Get payloads |
| DevicesApi | ListDevices | GET /collections/{collectionId}/devices | List devices |
| DevicesApi | RetrieveDevice | GET /collections/{collectionId}/devices/{deviceId} | Retrieve device |
| DevicesApi | SendMessage | POST /collections/{collectionId}/devices/{deviceId}/to | Send message |
| DevicesApi | UpdateDevice | PATCH /collections/{existingCollectionId}/devices/{deviceId} | Update device |
| FotaApi | ClearFirmwareError | DELETE /collections/{collectionId}/devices/{deviceId}/fwerror | Clear FOTA error |
| FotaApi | CreateFirmware | POST /collections/{collectionId}/firmware | Create firmware |
| FotaApi | DeleteFirmware | DELETE /collections/{collectionId}/firmware/{imageId} | Delete firmware |
| FotaApi | FirmwareUsage | PATCH /collections/{collectionId}/firmware/{imageId}/usage | Firmware usage |
| FotaApi | ListFirmware | GET /collections/{collectionId}/firmware | List firmware |
| FotaApi | RetrieveFirmware | GET /collections/{collectionId}/firmware/{imageId} | Retrieve firmware |
| FotaApi | UpdateFirmware | PATCH /collections/{collectionId}/firmware/{imageId} | Update firmware |
| OutputsApi | CreateOutput | POST /collections/{collectionId}/outputs | Create output |
| OutputsApi | DeleteOutput | DELETE /collections/{collectionId}/outputs/{outputId} | Delete output |
| OutputsApi | ListOutputs | GET /collections/{collectionId}/outputs | List outputs |
| OutputsApi | Logs | GET /collections/{collectionId}/outputs/{outputId}/logs | Output logs |
| OutputsApi | RetrieveOutput | GET /collections/{collectionId}/outputs/{outputId} | Retrieve output |
| OutputsApi | Status | GET /collections/{collectionId}/outputs/{outputId}/status | Output status |
| OutputsApi | UpdateOutput | PATCH /collections/{collectionId}/outputs/{outputId} | Update output |
| SystemApi | GetSystemInfo | GET /system | System information |
- Model.CoAPMetadata
- Model.Collection
- Model.CollectionFirmware
- Model.CollectionFirmwareFirmwareManagement
- Model.CreateFirmwareRequest
- Model.DataDumpResponse
- Model.Device
- Model.DumpedCollection
- Model.DumpedDevice
- Model.FieldMask
- Model.Firmware
- Model.FirmwareMetadata
- Model.FirmwareUsageResponse
- Model.ListCollectionResponse
- Model.ListDataResponse
- Model.ListDevicesResponse
- Model.ListFirmwareResponse
- Model.ListOutputResponse
- Model.MessageSendResult
- Model.MultiSendMessageResponse
- Model.NetworkMetadata
- Model.Output
- Model.OutputConfig
- Model.OutputDataMessage
- Model.OutputDataMessageOutputMessageType
- Model.OutputLogEntry
- Model.OutputLogs
- Model.OutputStatus
- Model.OutputType
- Model.ProtobufAny
- Model.RuntimeError
- Model.RuntimeStreamError
- Model.SendMessageRequest
- Model.SystemInfoResponse
- Model.UDPMetadata
- Model.UpdateDeviceRequest
- Type: API key
- API key parameter name: X-API-Token
- Location: HTTP header