import 'package:spanapi/api.dart';
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(collectionId, deviceId)
Clear FOTA error
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final deviceId = deviceId_example; // String |
try {
final result = api_instance.clearFirmwareError(collectionId, deviceId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->clearFirmwareError: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
deviceId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware createFirmware(collectionId, 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.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final body = CreateFirmwareBody(); // CreateFirmwareBody |
try {
final result = api_instance.createFirmware(collectionId, body);
print(result);
} catch (e) {
print('Exception when calling FotaApi->createFirmware: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
body | CreateFirmwareBody |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware deleteFirmware(collectionId, imageId)
Delete firmware
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final imageId = imageId_example; // String |
try {
final result = api_instance.deleteFirmware(collectionId, imageId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->deleteFirmware: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
imageId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareUsageResponse firmwareUsage(collectionId, imageId)
Firmware usage
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final imageId = imageId_example; // String |
try {
final result = api_instance.firmwareUsage(collectionId, imageId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->firmwareUsage: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
imageId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFirmwareResponse listFirmware(collectionId)
List firmware
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
try {
final result = api_instance.listFirmware(collectionId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->listFirmware: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware retrieveFirmware(collectionId, imageId)
Retrieve firmware
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final imageId = imageId_example; // String |
try {
final result = api_instance.retrieveFirmware(collectionId, imageId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->retrieveFirmware: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
imageId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareStats retrieveFirmwareStats(collectionId, imageId)
Retrieve firmware statistics
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final collectionId = collectionId_example; // String |
final imageId = imageId_example; // String |
try {
final result = api_instance.retrieveFirmwareStats(collectionId, imageId);
print(result);
} catch (e) {
print('Exception when calling FotaApi->retrieveFirmwareStats: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
imageId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware updateFirmware(existingCollectionId, imageId, body)
Update firmware
Only the version and tags fields can be updated. The other fields will be ignored.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = FotaApi();
final existingCollectionId = existingCollectionId_example; // String |
final imageId = imageId_example; // String |
final body = UpdateFirmwareBody(); // UpdateFirmwareBody |
try {
final result = api_instance.updateFirmware(existingCollectionId, imageId, body);
print(result);
} catch (e) {
print('Exception when calling FotaApi->updateFirmware: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
existingCollectionId | String | ||
imageId | String | ||
body | UpdateFirmwareBody |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]