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(ctx, collectionId, deviceId).Execute()
Clear FOTA error
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.ClearFirmwareError(context.Background(), collectionId, deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.ClearFirmwareError``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ClearFirmwareError`: ClearFirmwareErrorResponse
fmt.Fprintf(os.Stdout, "Response from `FotaApi.ClearFirmwareError`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
deviceId | string |
Other parameters are passed through a pointer to a apiClearFirmwareErrorRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware CreateFirmware(ctx, collectionId).Body(body).Execute()
Create firmware
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
body := *openapiclient.NewCreateFirmwareBody() // CreateFirmwareBody |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.CreateFirmware(context.Background(), collectionId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.CreateFirmware``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateFirmware`: Firmware
fmt.Fprintf(os.Stdout, "Response from `FotaApi.CreateFirmware`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiCreateFirmwareRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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(ctx, collectionId, imageId).Execute()
Delete firmware
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
imageId := "imageId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.DeleteFirmware(context.Background(), collectionId, imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.DeleteFirmware``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteFirmware`: Firmware
fmt.Fprintf(os.Stdout, "Response from `FotaApi.DeleteFirmware`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
imageId | string |
Other parameters are passed through a pointer to a apiDeleteFirmwareRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareUsageResponse FirmwareUsage(ctx, collectionId, imageId).Execute()
Firmware usage
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
imageId := "imageId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.FirmwareUsage(context.Background(), collectionId, imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.FirmwareUsage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FirmwareUsage`: FirmwareUsageResponse
fmt.Fprintf(os.Stdout, "Response from `FotaApi.FirmwareUsage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
imageId | string |
Other parameters are passed through a pointer to a apiFirmwareUsageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFirmwareResponse ListFirmware(ctx, collectionId).Execute()
List firmware
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.ListFirmware(context.Background(), collectionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.ListFirmware``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListFirmware`: ListFirmwareResponse
fmt.Fprintf(os.Stdout, "Response from `FotaApi.ListFirmware`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiListFirmwareRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware RetrieveFirmware(ctx, collectionId, imageId).Execute()
Retrieve firmware
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
imageId := "imageId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.RetrieveFirmware(context.Background(), collectionId, imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.RetrieveFirmware``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveFirmware`: Firmware
fmt.Fprintf(os.Stdout, "Response from `FotaApi.RetrieveFirmware`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
imageId | string |
Other parameters are passed through a pointer to a apiRetrieveFirmwareRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirmwareStats RetrieveFirmwareStats(ctx, collectionId, imageId).Execute()
Retrieve firmware statistics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
imageId := "imageId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.RetrieveFirmwareStats(context.Background(), collectionId, imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.RetrieveFirmwareStats``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveFirmwareStats`: FirmwareStats
fmt.Fprintf(os.Stdout, "Response from `FotaApi.RetrieveFirmwareStats`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
imageId | string |
Other parameters are passed through a pointer to a apiRetrieveFirmwareStatsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Firmware UpdateFirmware(ctx, existingCollectionId, imageId).Body(body).Execute()
Update firmware
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
existingCollectionId := "existingCollectionId_example" // string |
imageId := "imageId_example" // string |
body := *openapiclient.NewUpdateFirmwareBody() // UpdateFirmwareBody |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FotaApi.UpdateFirmware(context.Background(), existingCollectionId, imageId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FotaApi.UpdateFirmware``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateFirmware`: Firmware
fmt.Fprintf(os.Stdout, "Response from `FotaApi.UpdateFirmware`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
existingCollectionId | string | ||
imageId | string |
Other parameters are passed through a pointer to a apiUpdateFirmwareRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | UpdateFirmwareBody | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]