All URIs are relative to https://api.lab5e.com
Method | HTTP request | Description |
---|---|---|
ClearFirmwareError | DELETE /span/collections/{collectionId}/devices/{deviceId}/fwerror | Clear FOTA error |
CreateFirmware | POST /span/collections/{collectionId}/firmware | Create firmware |
DeleteFirmware | DELETE /span/collections/{collectionId}/firmware/{imageId} | Delete firmware |
FirmwareUsage | GET /span/collections/{collectionId}/firmware/{imageId}/usage | Firmware usage |
ListFirmware | GET /span/collections/{collectionId}/firmware | List firmware |
RetrieveFirmware | GET /span/collections/{collectionId}/firmware/{imageId} | Retrieve firmware |
RetrieveFirmwareStats | GET /span/collections/{collectionId}/firmware/{imageId}/stats | Retrieve firmware statistics |
UpdateFirmware | PATCH /span/collections/{existingCollectionId}/firmware/{imageId} | Update firmware |
ClearFirmwareErrorResponse ClearFirmwareError (string collectionId, string deviceId)
Clear FOTA error
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class ClearFirmwareErrorExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var deviceId = "deviceId_example"; // string |
try
{
// Clear FOTA error
ClearFirmwareErrorResponse result = apiInstance.ClearFirmwareError(collectionId, deviceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.ClearFirmwareError: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Clear FOTA error
ApiResponse<ClearFirmwareErrorResponse> response = apiInstance.ClearFirmwareErrorWithHttpInfo(collectionId, deviceId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.ClearFirmwareErrorWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
deviceId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware CreateFirmware (string collectionId, CreateFirmwareBody body)
Create firmware
Firmware images must have unique version numbers and have an unique checksum. The checksum is calculated when the firmware image is uploaded.
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class CreateFirmwareExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var body = new CreateFirmwareBody(); // CreateFirmwareBody |
try
{
// Create firmware
Firmware result = apiInstance.CreateFirmware(collectionId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.CreateFirmware: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create firmware
ApiResponse<Firmware> response = apiInstance.CreateFirmwareWithHttpInfo(collectionId, body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.CreateFirmwareWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
body | CreateFirmwareBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware DeleteFirmware (string collectionId, string imageId)
Delete firmware
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class DeleteFirmwareExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var imageId = "imageId_example"; // string |
try
{
// Delete firmware
Firmware result = apiInstance.DeleteFirmware(collectionId, imageId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.DeleteFirmware: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete firmware
ApiResponse<Firmware> response = apiInstance.DeleteFirmwareWithHttpInfo(collectionId, imageId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.DeleteFirmwareWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
imageId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareUsageResponse FirmwareUsage (string collectionId, string imageId)
Firmware usage
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class FirmwareUsageExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var imageId = "imageId_example"; // string |
try
{
// Firmware usage
FirmwareUsageResponse result = apiInstance.FirmwareUsage(collectionId, imageId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.FirmwareUsage: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Firmware usage
ApiResponse<FirmwareUsageResponse> response = apiInstance.FirmwareUsageWithHttpInfo(collectionId, imageId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.FirmwareUsageWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
imageId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFirmwareResponse ListFirmware (string collectionId)
List firmware
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class ListFirmwareExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
try
{
// List firmware
ListFirmwareResponse result = apiInstance.ListFirmware(collectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.ListFirmware: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List firmware
ApiResponse<ListFirmwareResponse> response = apiInstance.ListFirmwareWithHttpInfo(collectionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.ListFirmwareWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware RetrieveFirmware (string collectionId, string imageId)
Retrieve firmware
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class RetrieveFirmwareExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var imageId = "imageId_example"; // string |
try
{
// Retrieve firmware
Firmware result = apiInstance.RetrieveFirmware(collectionId, imageId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.RetrieveFirmware: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieve firmware
ApiResponse<Firmware> response = apiInstance.RetrieveFirmwareWithHttpInfo(collectionId, imageId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.RetrieveFirmwareWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
imageId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareStats RetrieveFirmwareStats (string collectionId, string imageId)
Retrieve firmware statistics
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class RetrieveFirmwareStatsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var collectionId = "collectionId_example"; // string |
var imageId = "imageId_example"; // string |
try
{
// Retrieve firmware statistics
FirmwareStats result = apiInstance.RetrieveFirmwareStats(collectionId, imageId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.RetrieveFirmwareStats: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieve firmware statistics
ApiResponse<FirmwareStats> response = apiInstance.RetrieveFirmwareStatsWithHttpInfo(collectionId, imageId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.RetrieveFirmwareStatsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | string | ||
imageId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware UpdateFirmware (string existingCollectionId, string imageId, UpdateFirmwareBody body)
Update firmware
Only the version and tags fields can be updated. The other fields will be ignored.
using System.Collections.Generic;
using System.Diagnostics;
using Com.Lab5e.Span.Api;
using Com.Lab5e.Span.Client;
using Com.Lab5e.Span.Model;
namespace Example
{
public class UpdateFirmwareExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.lab5e.com";
// Configure API key authorization: APIToken
config.AddApiKey("X-API-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-API-Token", "Bearer");
var apiInstance = new FotaApi(config);
var existingCollectionId = "existingCollectionId_example"; // string |
var imageId = "imageId_example"; // string |
var body = new UpdateFirmwareBody(); // UpdateFirmwareBody |
try
{
// Update firmware
Firmware result = apiInstance.UpdateFirmware(existingCollectionId, imageId, body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.UpdateFirmware: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update firmware
ApiResponse<Firmware> response = apiInstance.UpdateFirmwareWithHttpInfo(existingCollectionId, imageId, body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FotaApi.UpdateFirmwareWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
existingCollectionId | string | ||
imageId | string | ||
body | UpdateFirmwareBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]