Skip to content

Latest commit

 

History

History
1078 lines (714 loc) · 30.9 KB

DevicesApi.md

File metadata and controls

1078 lines (714 loc) · 30.9 KB

\DevicesApi

All URIs are relative to http://localhost

Method HTTP request Description
AttachDeviceTemplates Post /manage/api/v8/devices/{id}/templates Attaches one or more device templates to a device instance.
BatchAttachDeviceTemplates Post /manage/api/v8/devices/templates/attach Attaches one or more device templates to a batch of device instances.
CreateDevice Post /manage/api/v8/devices Creates a device.
DeleteDevice Delete /manage/api/v8/devices/{id} Deletes a device.
DetachDeviceTemplate Delete /manage/api/v8/devices/{id}/templates/{templateId} Detaches a template from a device.
DetachDeviceTemplates Delete /manage/api/v8/devices/{id}/templates Detach device templates that are already attached to a device.
GetDevice Get /manage/api/v8/devices/{id} Returns a device.
GetDeviceConfig Get /manage/api/v8/devices/{id}/config Returns the running configuration for a device.
GetDeviceTemplateHistory Get /manage/api/v8/devices/{id}/templates Returns device template history.
GetDevicesPage Get /manage/api/v8/devices Returns a page of devices.
PatchDevice Patch /manage/api/v8/devices/{id} Update a device.
RedeployDevice Post /manage/api/v8/devices/{id}/redeploy Dedeploys a device.
UpdateDevice Put /manage/api/v8/devices/{id} Update a device.
UpdateDeviceConfig Post /manage/api/v8/devices/{id}/config/update push device configuration to the actual device
UpdateDeviceTemplates Put /manage/api/v8/devices/{id}/templates Update device templates that are already attached to a device.

AttachDeviceTemplates

[]DeviceTemplateHistory AttachDeviceTemplates(ctx, id).DeviceTemplateAttachRequest(deviceTemplateAttachRequest).Execute()

Attaches one or more device templates to a device instance.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    deviceTemplateAttachRequest := *openapiclient.NewDeviceTemplateAttachRequest() // DeviceTemplateAttachRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

deviceTemplateAttachRequest | DeviceTemplateAttachRequest | |

Return type

[]DeviceTemplateHistory

Authorization

No authorization required

HTTP request headers

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

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

BatchAttachDeviceTemplates

[][]DeviceTemplateHistorySummary BatchAttachDeviceTemplates(ctx).DeviceTemplateBatchAttachRequest(deviceTemplateBatchAttachRequest).Execute()

Attaches one or more device templates to a batch of device instances.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceTemplateBatchAttachRequest := *openapiclient.NewDeviceTemplateBatchAttachRequest() // DeviceTemplateBatchAttachRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
deviceTemplateBatchAttachRequest DeviceTemplateBatchAttachRequest

Return type

[][]DeviceTemplateHistorySummary

Authorization

No authorization required

HTTP request headers

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

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

CreateDevice

Device CreateDevice(ctx).DeviceCreate(deviceCreate).Execute()

Creates a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceCreate := *openapiclient.NewDeviceCreate("TenantId_example", "OnboardType_example", "Name_example", "Model_example", "Type_example") // DeviceCreate | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
deviceCreate DeviceCreate

Return type

Device

Authorization

No authorization required

HTTP request headers

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

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

DeleteDevice

DeleteDevice(ctx, id).Execute()

Deletes a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DevicesApi.DeleteDevice(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.DeleteDevice``: %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.
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

DetachDeviceTemplate

[]DeviceTemplateHistory DetachDeviceTemplate(ctx, id, templateId).Execute()

Detaches a template from a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    templateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]DeviceTemplateHistory

Authorization

No authorization required

HTTP request headers

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

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

DetachDeviceTemplates

[]DeviceTemplateHistory DetachDeviceTemplates(ctx, id).Execute()

Detach device templates that are already attached to a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]DeviceTemplateHistory

Authorization

No authorization required

HTTP request headers

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

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

GetDevice

Device GetDevice(ctx, id).Execute()

Returns a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Device

Authorization

No authorization required

HTTP request headers

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

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

GetDeviceConfig

string GetDeviceConfig(ctx, id).Execute()

Returns the running configuration for a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

string

Authorization

No authorization required

HTTP request headers

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

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

GetDeviceTemplateHistory

[]DeviceTemplateHistory GetDeviceTemplateHistory(ctx, id).TemplateId(templateId).Execute()

Returns device template history.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    templateId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

templateId | string | |

Return type

[]DeviceTemplateHistory

Authorization

No authorization required

HTTP request headers

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

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

GetDevicesPage

DevicesPage GetDevicesPage(ctx).Page(page).PageSize(pageSize).DeviceIds(deviceIds).ServiceIds(serviceIds).Types(types).SerialKeys(serialKeys).ServiceTypes(serviceTypes).Models(models).Subtypes(subtypes).Names(names).Versions(versions).TenantIds(tenantIds).IncludeSubtenants(includeSubtenants).Severities(severities).ComplianceStates(complianceStates).VulnerabilityStates(vulnerabilityStates).SortBy(sortBy).SortOrder(sortOrder).Execute()

Returns a page of devices.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    page := int32(0) // int32 | 
    pageSize := int32(10) // int32 | 
    deviceIds := []string{"Inner_example"} // []string |  (optional)
    serviceIds := []string{"Inner_example"} // []string |  (optional)
    types := []string{"Inner_example"} // []string |  (optional)
    serialKeys := []string{"Inner_example"} // []string |  (optional)
    serviceTypes := []string{"Inner_example"} // []string |  (optional)
    models := []string{"Inner_example"} // []string |  (optional)
    subtypes := []string{"Inner_example"} // []string |  (optional)
    names := []string{"Inner_example"} // []string |  (optional)
    versions := []string{"Inner_example"} // []string |  (optional)
    tenantIds := []string{"Inner_example"} // []string |  (optional)
    includeSubtenants := true // bool |  (optional) (default to false)
    severities := []string{"Inner_example"} // []string |  (optional)
    complianceStates := []string{"Inner_example"} // []string | Valid values: COMPLIANT, NOT_COMPLIANT, APPLICABLE, NOT_APPLICABLE, UNKNOWN (optional)
    vulnerabilityStates := []string{"Inner_example"} // []string | Valid values: VULNERABLE, NOT_VULNERABLE, NOT_APPLICABLE, UNKNOWN (optional)
    sortBy := "name" // string |  (optional)
    sortOrder := "sortOrder_example" // string |  (optional) (default to "asc")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DevicesApi.GetDevicesPage(context.Background()).Page(page).PageSize(pageSize).DeviceIds(deviceIds).ServiceIds(serviceIds).Types(types).SerialKeys(serialKeys).ServiceTypes(serviceTypes).Models(models).Subtypes(subtypes).Names(names).Versions(versions).TenantIds(tenantIds).IncludeSubtenants(includeSubtenants).Severities(severities).ComplianceStates(complianceStates).VulnerabilityStates(vulnerabilityStates).SortBy(sortBy).SortOrder(sortOrder).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.GetDevicesPage``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDevicesPage`: DevicesPage
    fmt.Fprintf(os.Stdout, "Response from `DevicesApi.GetDevicesPage`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
page int32
pageSize int32
deviceIds []string
serviceIds []string
types []string
serialKeys []string
serviceTypes []string
models []string
subtypes []string
names []string
versions []string
tenantIds []string
includeSubtenants bool [default to false]
severities []string
complianceStates []string Valid values: COMPLIANT, NOT_COMPLIANT, APPLICABLE, NOT_APPLICABLE, UNKNOWN
vulnerabilityStates []string Valid values: VULNERABLE, NOT_VULNERABLE, NOT_APPLICABLE, UNKNOWN
sortBy string
sortOrder string [default to "asc"]

Return type

DevicesPage

Authorization

No authorization required

HTTP request headers

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

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

PatchDevice

Device PatchDevice(ctx, id).DevicePatch(devicePatch).Execute()

Update a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    devicePatch := *openapiclient.NewDevicePatch() // DevicePatch | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

devicePatch | DevicePatch | |

Return type

Device

Authorization

No authorization required

HTTP request headers

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

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

RedeployDevice

RedeployDevice(ctx, id).Execute()

Dedeploys a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DevicesApi.RedeployDevice(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.RedeployDevice``: %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.
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

UpdateDevice

Device UpdateDevice(ctx, id).DeviceUpdate(deviceUpdate).Execute()

Update a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    deviceUpdate := *openapiclient.NewDeviceUpdate("OnboardType_example", "Name_example", "Model_example", "Type_example") // DeviceUpdate | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

deviceUpdate | DeviceUpdate | |

Return type

Device

Authorization

No authorization required

HTTP request headers

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

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

UpdateDeviceConfig

ManageChangeRequestPending UpdateDeviceConfig(ctx, id).DeviceConfigUpdate(deviceConfigUpdate).Execute()

push device configuration to the actual device

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    deviceConfigUpdate := *openapiclient.NewDeviceConfigUpdate("CorrelationId_example", "Format_example") // DeviceConfigUpdate | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

deviceConfigUpdate | DeviceConfigUpdate | |

Return type

ManageChangeRequestPending

Authorization

No authorization required

HTTP request headers

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

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

UpdateDeviceTemplates

[]DeviceTemplateHistory UpdateDeviceTemplates(ctx, id).DeviceTemplateUpdateRequest(deviceTemplateUpdateRequest).Execute()

Update device templates that are already attached to a device.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | 
    deviceTemplateUpdateRequest := *openapiclient.NewDeviceTemplateUpdateRequest() // DeviceTemplateUpdateRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

deviceTemplateUpdateRequest | DeviceTemplateUpdateRequest | |

Return type

[]DeviceTemplateHistory

Authorization

No authorization required

HTTP request headers

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

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