All URIs are relative to https://api.notefile.net
| Method | HTTP request | Description |
|---|---|---|
| AddDbNote | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
| AddQiNote | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID} | |
| CreateNotefile | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID} | |
| DeleteDevice | Delete /v1/projects/{projectOrProductUID}/devices/{deviceUID} | |
| DeleteDeviceEnvironmentVariable | Delete /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key} | |
| DeleteNote | Delete /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
| DeleteNotefiles | Delete /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files | |
| DisableDevice | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable | |
| EnableDevice | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable | |
| GetDbNote | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} | |
| GetDevice | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID} | |
| GetDeviceEnvironmentHierarchy | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchy | Get environment variable hierarchy for a device |
| GetDeviceEnvironmentVariables | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables | |
| GetDeviceEnvironmentVariablesByPin | Get /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | |
| GetDeviceHealthLog | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log | |
| GetDeviceLatestEvents | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest | |
| GetDevicePlans | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans | |
| GetDevicePublicKey | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key | |
| GetDevicePublicKeys | Get /v1/projects/{projectOrProductUID}/devices/public-keys | |
| GetDeviceSessions | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions | |
| GetDevices | Get /v1/projects/{projectOrProductUID}/devices | |
| GetFleetDevices | Get /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices | |
| GetNotefile | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID} | |
| ListNotefiles | Get /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files | |
| ProvisionDevice | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision | |
| SetDeviceEnvironmentVariables | Put /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables | |
| SetDeviceEnvironmentVariablesByPin | Put /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin | |
| SignalDevice | Post /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal | |
| UpdateDbNote | Put /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID} |
AddDbNote(ctx, projectOrProductUID, deviceUID, notefileID, noteID).NoteInput(noteInput).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
noteID := "noteID_example" // string |
noteInput := *openapiclient.NewNoteInput() // NoteInput | Body or payload of note to be added to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.AddDbNote(context.Background(), projectOrProductUID, deviceUID, notefileID, noteID).NoteInput(noteInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.AddDbNote``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string | ||
| noteID | string |
Other parameters are passed through a pointer to a apiAddDbNoteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
noteInput | NoteInput | Body or payload of note to be added to the device |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AddQiNote(ctx, projectOrProductUID, deviceUID, notefileID).NoteInput(noteInput).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
noteInput := *openapiclient.NewNoteInput() // NoteInput | Body or payload of note to be added to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.AddQiNote(context.Background(), projectOrProductUID, deviceUID, notefileID).NoteInput(noteInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.AddQiNote``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string |
Other parameters are passed through a pointer to a apiAddQiNoteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
noteInput | NoteInput | Body or payload of note to be added to the device |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateNotefile(ctx, projectOrProductUID, deviceUID, notefileID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.CreateNotefile(context.Background(), projectOrProductUID, deviceUID, notefileID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.CreateNotefile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string |
Other parameters are passed through a pointer to a apiCreateNotefileRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDevice(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.DeleteDevice(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.DeleteDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiDeleteDeviceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariables DeleteDeviceEnvironmentVariable(ctx, projectOrProductUID, deviceUID, key).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
key := "key_example" // string | The environment variable key to delete.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.DeleteDeviceEnvironmentVariable(context.Background(), projectOrProductUID, deviceUID, key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.DeleteDeviceEnvironmentVariable``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteDeviceEnvironmentVariable`: EnvironmentVariables
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.DeleteDeviceEnvironmentVariable`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| key | string | The environment variable key to delete. |
Other parameters are passed through a pointer to a apiDeleteDeviceEnvironmentVariableRequest 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]
DeleteNote(ctx, projectOrProductUID, deviceUID, notefileID, noteID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
noteID := "noteID_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.DeleteNote(context.Background(), projectOrProductUID, deviceUID, notefileID, noteID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.DeleteNote``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string | ||
| noteID | string |
Other parameters are passed through a pointer to a apiDeleteNoteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteNotefiles(ctx, projectOrProductUID, deviceUID).DeleteNotefilesRequest(deleteNotefilesRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
deleteNotefilesRequest := *openapiclient.NewDeleteNotefilesRequest() // DeleteNotefilesRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.DeleteNotefiles(context.Background(), projectOrProductUID, deviceUID).DeleteNotefilesRequest(deleteNotefilesRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.DeleteNotefiles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiDeleteNotefilesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
deleteNotefilesRequest | DeleteNotefilesRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DisableDevice(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.DisableDevice(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.DisableDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiDisableDeviceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnableDevice(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.EnableDevice(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.EnableDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiEnableDeviceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDbNote200Response GetDbNote(ctx, projectOrProductUID, deviceUID, notefileID, noteID).Delete(delete).Deleted(deleted).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
noteID := "noteID_example" // string |
delete := true // bool | Whether to delete the note from the DB notefile (optional)
deleted := true // bool | Whether to return deleted notes (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDbNote(context.Background(), projectOrProductUID, deviceUID, notefileID, noteID).Delete(delete).Deleted(deleted).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDbNote``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDbNote`: GetDbNote200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDbNote`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string | ||
| noteID | string |
Other parameters are passed through a pointer to a apiGetDbNoteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
delete | bool | Whether to delete the note from the DB notefile | deleted | bool | Whether to return deleted notes |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device GetDevice(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDevice(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevice`: Device
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDevice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceRequest 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]
EnvTreeJsonNode GetDeviceEnvironmentHierarchy(ctx, projectOrProductUID, deviceUID).Execute()
Get environment variable hierarchy for a device
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceEnvironmentHierarchy(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceEnvironmentHierarchy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceEnvironmentHierarchy`: EnvTreeJsonNode
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceEnvironmentHierarchy`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceEnvironmentHierarchyRequest 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]
GetDeviceEnvironmentVariablesByPin200Response GetDeviceEnvironmentVariables(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceEnvironmentVariables(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceEnvironmentVariables``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceEnvironmentVariables`: GetDeviceEnvironmentVariablesByPin200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceEnvironmentVariables`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceEnvironmentVariablesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
GetDeviceEnvironmentVariablesByPin200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDeviceEnvironmentVariablesByPin200Response GetDeviceEnvironmentVariablesByPin(ctx, productUID, deviceUID).XAuthToken(xAuthToken).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
deviceUID := "dev:000000000000000" // string |
xAuthToken := "xAuthToken_example" // string | For accessing endpoints by Device pin.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceEnvironmentVariablesByPin(context.Background(), productUID, deviceUID).XAuthToken(xAuthToken).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceEnvironmentVariablesByPin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceEnvironmentVariablesByPin`: GetDeviceEnvironmentVariablesByPin200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceEnvironmentVariablesByPin`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| productUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceEnvironmentVariablesByPinRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xAuthToken | string | For accessing endpoints by Device pin. |
GetDeviceEnvironmentVariablesByPin200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDeviceHealthLog200Response GetDeviceHealthLog(ctx, projectOrProductUID, deviceUID).StartDate(startDate).EndDate(endDate).LogType(logType).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
startDate := int32(1628631763) // int32 | Start date for filtering results, specified as a Unix timestamp (optional)
endDate := int32(1657894210) // int32 | End date for filtering results, specified as a Unix timestamp (optional)
logType := []string{"LogType_example"} // []string | Return only specified log types (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceHealthLog(context.Background(), projectOrProductUID, deviceUID).StartDate(startDate).EndDate(endDate).LogType(logType).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceHealthLog``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceHealthLog`: GetDeviceHealthLog200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceHealthLog`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceHealthLogRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
startDate | int32 | Start date for filtering results, specified as a Unix timestamp | endDate | int32 | End date for filtering results, specified as a Unix timestamp | logType | []string | Return only specified log types |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDeviceLatestEvents200Response GetDeviceLatestEvents(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceLatestEvents(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceLatestEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceLatestEvents`: GetDeviceLatestEvents200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceLatestEvents`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceLatestEventsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
GetDeviceLatestEvents200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDevicePlans200Response GetDevicePlans(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDevicePlans(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDevicePlans``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevicePlans`: GetDevicePlans200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDevicePlans`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDevicePlansRequest 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]
GetDevicePublicKey200Response GetDevicePublicKey(ctx, projectOrProductUID, deviceUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDevicePublicKey(context.Background(), projectOrProductUID, deviceUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDevicePublicKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevicePublicKey`: GetDevicePublicKey200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDevicePublicKey`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDevicePublicKeyRequest 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]
GetDevicePublicKeys200Response GetDevicePublicKeys(ctx, projectOrProductUID).PageSize(pageSize).PageNum(pageNum).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
pageSize := int32(56) // int32 | (optional) (default to 50)
pageNum := int32(56) // int32 | (optional) (default to 1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDevicePublicKeys(context.Background(), projectOrProductUID).PageSize(pageSize).PageNum(pageNum).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDevicePublicKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevicePublicKeys`: GetDevicePublicKeys200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDevicePublicKeys`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string |
Other parameters are passed through a pointer to a apiGetDevicePublicKeysRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
pageSize | int32 | | [default to 50] pageNum | int32 | | [default to 1]
GetDevicePublicKeys200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDeviceSessions200Response GetDeviceSessions(ctx, projectOrProductUID, deviceUID).PageSize(pageSize).PageNum(pageNum).StartDate(startDate).EndDate(endDate).FirstSync(firstSync).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
pageSize := int32(56) // int32 | (optional) (default to 50)
pageNum := int32(56) // int32 | (optional) (default to 1)
startDate := int32(1628631763) // int32 | Start date for filtering results, specified as a Unix timestamp (optional)
endDate := int32(1657894210) // int32 | End date for filtering results, specified as a Unix timestamp (optional)
firstSync := true // bool | When true, filters results to only show first sync sessions (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDeviceSessions(context.Background(), projectOrProductUID, deviceUID).PageSize(pageSize).PageNum(pageNum).StartDate(startDate).EndDate(endDate).FirstSync(firstSync).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDeviceSessions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceSessions`: GetDeviceSessions200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDeviceSessions`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiGetDeviceSessionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
pageSize | int32 | | [default to 50] pageNum | int32 | | [default to 1] startDate | int32 | Start date for filtering results, specified as a Unix timestamp | endDate | int32 | End date for filtering results, specified as a Unix timestamp | firstSync | bool | When true, filters results to only show first sync sessions | [default to false]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDevices200Response GetDevices(ctx, projectOrProductUID).PageSize(pageSize).PageNum(pageNum).DeviceUID(deviceUID).Tag(tag).SerialNumber(serialNumber).FleetUID(fleetUID).NotecardFirmware(notecardFirmware).Location(location).HostFirmware(hostFirmware).ProductUID(productUID).Sku(sku).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
pageSize := int32(56) // int32 | (optional) (default to 50)
pageNum := int32(56) // int32 | (optional) (default to 1)
deviceUID := []string{"Inner_example"} // []string | A Device UID. (optional)
tag := []string{"Inner_example"} // []string | Tag filter (optional)
serialNumber := []string{"Inner_example"} // []string | Serial number filter (optional)
fleetUID := []string{"Inner_example"} // []string | (optional)
notecardFirmware := []string{"Inner_example"} // []string | Firmware version filter (optional)
location := []string{"Inner_example"} // []string | Location filter (optional)
hostFirmware := []string{"Inner_example"} // []string | Host firmware filter (optional)
productUID := []string{"Inner_example"} // []string | (optional)
sku := []string{"Inner_example"} // []string | SKU filter (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetDevices(context.Background(), projectOrProductUID).PageSize(pageSize).PageNum(pageNum).DeviceUID(deviceUID).Tag(tag).SerialNumber(serialNumber).FleetUID(fleetUID).NotecardFirmware(notecardFirmware).Location(location).HostFirmware(hostFirmware).ProductUID(productUID).Sku(sku).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevices`: GetDevices200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetDevices`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string |
Other parameters are passed through a pointer to a apiGetDevicesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
pageSize | int32 | | [default to 50] pageNum | int32 | | [default to 1] deviceUID | []string | A Device UID. | tag | []string | Tag filter | serialNumber | []string | Serial number filter | fleetUID | []string | | notecardFirmware | []string | Firmware version filter | location | []string | Location filter | hostFirmware | []string | Host firmware filter | productUID | []string | | sku | []string | SKU filter |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDevices200Response GetFleetDevices(ctx, projectOrProductUID, fleetUID).PageSize(pageSize).PageNum(pageNum).DeviceUID(deviceUID).Tag(tag).SerialNumber(serialNumber).NotecardFirmware(notecardFirmware).Location(location).HostFirmware(hostFirmware).ProductUID(productUID).Sku(sku).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
fleetUID := "fleetUID_example" // string |
pageSize := int32(56) // int32 | (optional) (default to 50)
pageNum := int32(56) // int32 | (optional) (default to 1)
deviceUID := []string{"Inner_example"} // []string | A Device UID. (optional)
tag := []string{"Inner_example"} // []string | Tag filter (optional)
serialNumber := []string{"Inner_example"} // []string | Serial number filter (optional)
notecardFirmware := []string{"Inner_example"} // []string | Firmware version filter (optional)
location := []string{"Inner_example"} // []string | Location filter (optional)
hostFirmware := []string{"Inner_example"} // []string | Host firmware filter (optional)
productUID := []string{"Inner_example"} // []string | (optional)
sku := []string{"Inner_example"} // []string | SKU filter (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetFleetDevices(context.Background(), projectOrProductUID, fleetUID).PageSize(pageSize).PageNum(pageNum).DeviceUID(deviceUID).Tag(tag).SerialNumber(serialNumber).NotecardFirmware(notecardFirmware).Location(location).HostFirmware(hostFirmware).ProductUID(productUID).Sku(sku).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetFleetDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFleetDevices`: GetDevices200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetFleetDevices`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| fleetUID | string |
Other parameters are passed through a pointer to a apiGetFleetDevicesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
pageSize | int32 | | [default to 50] pageNum | int32 | | [default to 1] deviceUID | []string | A Device UID. | tag | []string | Tag filter | serialNumber | []string | Serial number filter | notecardFirmware | []string | Firmware version filter | location | []string | Location filter | hostFirmware | []string | Host firmware filter | productUID | []string | | sku | []string | SKU filter |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetNotefile200Response GetNotefile(ctx, projectOrProductUID, deviceUID, notefileID).Max(max).Deleted(deleted).Delete(delete).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
max := int32(56) // int32 | The maximum number of Notes to return in the request. (optional)
deleted := true // bool | true to return deleted notes. (optional)
delete := true // bool | true to delete the notes returned by the request. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.GetNotefile(context.Background(), projectOrProductUID, deviceUID, notefileID).Max(max).Deleted(deleted).Delete(delete).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.GetNotefile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNotefile`: GetNotefile200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.GetNotefile`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string |
Other parameters are passed through a pointer to a apiGetNotefileRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
max | int32 | The maximum number of Notes to return in the request. | deleted | bool | true to return deleted notes. | delete | bool | true to delete the notes returned by the request. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Notefile ListNotefiles(ctx, projectOrProductUID, deviceUID).Files(files).Pending(pending).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
files := []string{"Inner_example"} // []string | One or more files to obtain change information from. (optional)
pending := true // bool | show only files that are pending sync to the Notecard (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.ListNotefiles(context.Background(), projectOrProductUID, deviceUID).Files(files).Pending(pending).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.ListNotefiles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListNotefiles`: []Notefile
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.ListNotefiles`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiListNotefilesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
files | []string | One or more files to obtain change information from. | pending | bool | show only files that are pending sync to the Notecard |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} ProvisionDevice(ctx, projectOrProductUID, deviceUID).ProvisionDeviceRequest(provisionDeviceRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
provisionDeviceRequest := *openapiclient.NewProvisionDeviceRequest("ProductUid_example") // ProvisionDeviceRequest | Provision a device to a specific ProductUID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.ProvisionDevice(context.Background(), projectOrProductUID, deviceUID).ProvisionDeviceRequest(provisionDeviceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.ProvisionDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ProvisionDevice`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.ProvisionDevice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiProvisionDeviceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
provisionDeviceRequest | ProvisionDeviceRequest | Provision a device to a specific ProductUID |
map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariables SetDeviceEnvironmentVariables(ctx, projectOrProductUID, deviceUID).EnvironmentVariables(environmentVariables).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
environmentVariables := *openapiclient.NewEnvironmentVariables(map[string]string{"key": "Inner_example"}) // EnvironmentVariables | Environment variables to be added to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.SetDeviceEnvironmentVariables(context.Background(), projectOrProductUID, deviceUID).EnvironmentVariables(environmentVariables).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.SetDeviceEnvironmentVariables``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetDeviceEnvironmentVariables`: EnvironmentVariables
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.SetDeviceEnvironmentVariables`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiSetDeviceEnvironmentVariablesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
environmentVariables | EnvironmentVariables | Environment variables to be added to the device |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariables SetDeviceEnvironmentVariablesByPin(ctx, productUID, deviceUID).XAuthToken(xAuthToken).EnvironmentVariables(environmentVariables).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
deviceUID := "dev:000000000000000" // string |
xAuthToken := "xAuthToken_example" // string | For accessing endpoints by Device pin.
environmentVariables := *openapiclient.NewEnvironmentVariables(map[string]string{"key": "Inner_example"}) // EnvironmentVariables | Environment variables to be added to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.SetDeviceEnvironmentVariablesByPin(context.Background(), productUID, deviceUID).XAuthToken(xAuthToken).EnvironmentVariables(environmentVariables).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.SetDeviceEnvironmentVariablesByPin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetDeviceEnvironmentVariablesByPin`: EnvironmentVariables
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.SetDeviceEnvironmentVariablesByPin`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| productUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiSetDeviceEnvironmentVariablesByPinRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xAuthToken | string | For accessing endpoints by Device pin. | environmentVariables | EnvironmentVariables | Environment variables to be added to the device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SignalDevice200Response SignalDevice(ctx, projectOrProductUID, deviceUID).Body(body).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
body := *openapiclient.NewBody() // Body | Body or payload of signal to be sent to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceAPI.SignalDevice(context.Background(), projectOrProductUID, deviceUID).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.SignalDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SignalDevice`: SignalDevice200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceAPI.SignalDevice`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiSignalDeviceRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
body | Body | Body or payload of signal to be sent to the device |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateDbNote(ctx, projectOrProductUID, deviceUID, notefileID, noteID).NoteInput(noteInput).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
deviceUID := "dev:000000000000000" // string |
notefileID := "notefileID_example" // string |
noteID := "noteID_example" // string |
noteInput := *openapiclient.NewNoteInput() // NoteInput | Body or payload of note to be added to the device
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceAPI.UpdateDbNote(context.Background(), projectOrProductUID, deviceUID, notefileID, noteID).NoteInput(noteInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceAPI.UpdateDbNote``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| deviceUID | string | ||
| notefileID | string | ||
| noteID | string |
Other parameters are passed through a pointer to a apiUpdateDbNoteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
noteInput | NoteInput | Body or payload of note to be added to the device |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]