Skip to content

Latest commit

 

History

History
1146 lines (733 loc) · 31.1 KB

DevicesAPI.md

File metadata and controls

1146 lines (733 loc) · 31.1 KB

\DevicesAPI

All URIs are relative to https://app.torizon.io/api/v2beta

Method HTTP request Description
DeleteDevicesDeviceuuid Delete /devices/{deviceUuid} Delete a single device
GetDevices Get /devices Query device information
GetDevicesDeviceuuid Get /devices/{deviceUuid} Get detailed information about a single device
GetDevicesNameDeviceuuid Get /devices/name/{deviceUuid} Get the display name of a single device
GetDevicesNetwork Get /devices/network Get network information for many devices
GetDevicesNetworkDeviceuuid Get /devices/network/{deviceUuid} Get network information for a single device
GetDevicesNotesDeviceuuid Get /devices/notes/{deviceUuid} Get the device notes for a specific device
GetDevicesPackages Get /devices/packages Get information about the installed packages for many devices
GetDevicesPackagesDeviceuuid Get /devices/packages/{deviceUuid} Get information about the installed packages for a single device
GetDevicesToken Get /devices/token Retrieve device provisioning token
GetDevicesUptaneDeviceuuidAssignment Get /devices/uptane/{deviceUuid}/assignment Show detailed information about the currently-assigned update for a single device
GetDevicesUptaneDeviceuuidComponents Get /devices/uptane/{deviceUuid}/components Get a list of the software components reported by a single device
PostDevices Post /devices Manually create a new device
PutDevicesHibernationDeviceuuid Put /devices/hibernation/{deviceUuid} Set the hibernation status of a device
PutDevicesNameDeviceuuid Put /devices/name/{deviceUuid} Set the display name of a single device
PutDevicesNotesDeviceuuid Put /devices/notes/{deviceUuid} Set the device notes for a specific device

DeleteDevicesDeviceuuid

DeleteDevicesDeviceuuid(ctx, deviceUuid).Execute()

Delete a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.DevicesAPI.DeleteDevicesDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.DeleteDevicesDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDevicesDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevices

PaginationResultDeviceInfoBasic GetDevices(ctx).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).NameContains(nameContains).Hibernated(hibernated).Status(status).ActivatedAfter(activatedAfter).ActivatedBefore(activatedBefore).SortBy(sortBy).SortDirection(sortDirection).Execute()

Query device information

Example

package main

import (
	"context"
	"fmt"
	"os"
    "time"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	offset := int64(789) // int64 |  (optional)
	limit := int64(789) // int64 |  (optional)
	deviceUuid := []string{"Inner_example"} // []string |  (optional)
	nameContains := "nameContains_example" // string |  (optional)
	hibernated := true // bool |  (optional)
	status := openapiclient.DeviceStatus("NotSeen") // DeviceStatus |  (optional)
	activatedAfter := time.Now() // time.Time |  (optional)
	activatedBefore := time.Now() // time.Time |  (optional)
	sortBy := openapiclient.DeviceSort("Name") // DeviceSort |  (optional)
	sortDirection := openapiclient.DeviceSortDirection("Asc") // DeviceSortDirection |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevices(context.Background()).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).NameContains(nameContains).Hibernated(hibernated).Status(status).ActivatedAfter(activatedAfter).ActivatedBefore(activatedBefore).SortBy(sortBy).SortDirection(sortDirection).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevices`: PaginationResultDeviceInfoBasic
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevices`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesRequest struct via the builder pattern

Name Type Description Notes
offset int64
limit int64
deviceUuid []string
nameContains string
hibernated bool
status DeviceStatus
activatedAfter time.Time
activatedBefore time.Time
sortBy DeviceSort
sortDirection DeviceSortDirection

Return type

PaginationResultDeviceInfoBasic

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesDeviceuuid

DeviceInfoExtended GetDevicesDeviceuuid(ctx, deviceUuid).Execute()

Get detailed information about a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesDeviceuuid`: DeviceInfoExtended
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesDeviceuuid`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

DeviceInfoExtended

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesNameDeviceuuid

string GetDevicesNameDeviceuuid(ctx, deviceUuid).Execute()

Get the display name of a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesNameDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesNameDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesNameDeviceuuid`: string
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesNameDeviceuuid`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesNameDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

string

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesNetwork

PaginationResultNetworkInfo GetDevicesNetwork(ctx).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).Execute()

Get network information for many devices

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	offset := int64(789) // int64 |  (optional)
	limit := int64(789) // int64 |  (optional)
	deviceUuid := []string{"Inner_example"} // []string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesNetwork(context.Background()).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesNetwork``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesNetwork`: PaginationResultNetworkInfo
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesNetwork`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesNetworkRequest struct via the builder pattern

Name Type Description Notes
offset int64
limit int64
deviceUuid []string

Return type

PaginationResultNetworkInfo

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesNetworkDeviceuuid

NetworkInfo GetDevicesNetworkDeviceuuid(ctx, deviceUuid).Execute()

Get network information for a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesNetworkDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesNetworkDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesNetworkDeviceuuid`: NetworkInfo
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesNetworkDeviceuuid`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesNetworkDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

NetworkInfo

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesNotesDeviceuuid

string GetDevicesNotesDeviceuuid(ctx, deviceUuid).Execute()

Get the device notes for a specific device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesNotesDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesNotesDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesNotesDeviceuuid`: string
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesNotesDeviceuuid`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesNotesDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

string

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesPackages

PaginationResultDevicePackages GetDevicesPackages(ctx).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).NameContains(nameContains).Execute()

Get information about the installed packages for many devices

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	offset := int64(789) // int64 |  (optional)
	limit := int64(789) // int64 |  (optional)
	deviceUuid := []string{"Inner_example"} // []string |  (optional)
	nameContains := "nameContains_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesPackages(context.Background()).Offset(offset).Limit(limit).DeviceUuid(deviceUuid).NameContains(nameContains).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesPackages``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesPackages`: PaginationResultDevicePackages
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesPackages`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesPackagesRequest struct via the builder pattern

Name Type Description Notes
offset int64
limit int64
deviceUuid []string
nameContains string

Return type

PaginationResultDevicePackages

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesPackagesDeviceuuid

DevicePackages GetDevicesPackagesDeviceuuid(ctx, deviceUuid).Execute()

Get information about the installed packages for a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesPackagesDeviceuuid(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesPackagesDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesPackagesDeviceuuid`: DevicePackages
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesPackagesDeviceuuid`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesPackagesDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

Return type

DevicePackages

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesToken

ProvisionInfo GetDevicesToken(ctx).Execute()

Retrieve device provisioning token

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesToken(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesToken``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesToken`: ProvisionInfo
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesToken`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesTokenRequest struct via the builder pattern

Return type

ProvisionInfo

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesUptaneDeviceuuidAssignment

[]QueueResponse GetDevicesUptaneDeviceuuidAssignment(ctx, deviceUuid).Execute()

Show detailed information about the currently-assigned update for a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesUptaneDeviceuuidAssignment(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesUptaneDeviceuuidAssignment``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesUptaneDeviceuuidAssignment`: []QueueResponse
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesUptaneDeviceuuidAssignment`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesUptaneDeviceuuidAssignmentRequest struct via the builder pattern

Name Type Description Notes

Return type

[]QueueResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDevicesUptaneDeviceuuidComponents

[]EcuInfoResponse GetDevicesUptaneDeviceuuidComponents(ctx, deviceUuid).Execute()

Get a list of the software components reported by a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.GetDevicesUptaneDeviceuuidComponents(context.Background(), deviceUuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.GetDevicesUptaneDeviceuuidComponents``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDevicesUptaneDeviceuuidComponents`: []EcuInfoResponse
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.GetDevicesUptaneDeviceuuidComponents`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiGetDevicesUptaneDeviceuuidComponentsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]EcuInfoResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostDevices

*os.File PostDevices(ctx).DeviceCreateReq(deviceCreateReq).Execute()

Manually create a new device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceCreateReq := *openapiclient.NewDeviceCreateReq("DeviceId_example") // DeviceCreateReq | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DevicesAPI.PostDevices(context.Background()).DeviceCreateReq(deviceCreateReq).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.PostDevices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostDevices`: *os.File
	fmt.Fprintf(os.Stdout, "Response from `DevicesAPI.PostDevices`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostDevicesRequest struct via the builder pattern

Name Type Description Notes
deviceCreateReq DeviceCreateReq

Return type

*os.File

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/octet-stream, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutDevicesHibernationDeviceuuid

PutDevicesHibernationDeviceuuid(ctx, deviceUuid).UpdateHibernationStatusRequest(updateHibernationStatusRequest).Execute()

Set the hibernation status of a device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 
	updateHibernationStatusRequest := *openapiclient.NewUpdateHibernationStatusRequest(false) // UpdateHibernationStatusRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.DevicesAPI.PutDevicesHibernationDeviceuuid(context.Background(), deviceUuid).UpdateHibernationStatusRequest(updateHibernationStatusRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.PutDevicesHibernationDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiPutDevicesHibernationDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

updateHibernationStatusRequest | UpdateHibernationStatusRequest | |

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutDevicesNameDeviceuuid

PutDevicesNameDeviceuuid(ctx, deviceUuid).Body(body).Execute()

Set the display name of a single device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 
	body := "body_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.DevicesAPI.PutDevicesNameDeviceuuid(context.Background(), deviceUuid).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.PutDevicesNameDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiPutDevicesNameDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

body | string | |

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutDevicesNotesDeviceuuid

PutDevicesNotesDeviceuuid(ctx, deviceUuid).Body(body).Execute()

Set the device notes for a specific device

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/commontorizon/torizon-openapi-go"
)

func main() {
	deviceUuid := "deviceUuid_example" // string | 
	body := "body_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.DevicesAPI.PutDevicesNotesDeviceuuid(context.Background(), deviceUuid).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DevicesAPI.PutDevicesNotesDeviceuuid``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceUuid string

Other Parameters

Other parameters are passed through a pointer to a apiPutDevicesNotesDeviceuuidRequest struct via the builder pattern

Name Type Description Notes

body | string | |

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]