All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
CreateDevice | Post /devices/ | Create new device |
CreateDevicePortForwarding | Post /devices/{deviceID}/port-forwarding/ | Create new device port forwarding |
DeleteDevice | Delete /devices/{deviceID}/ | Delete Device |
DeleteDevicePortForwarding | Delete /devices/{deviceID}/port-forwarding/{portForwardingID}/ | Delete Device's Port Forwarding |
GetDevice | Get /devices/{deviceID}/ | Device Info |
GetDeviceStats | Get /devices/{deviceID}/stats/{statsID}/ | Device's stats detail |
GetDeviceWireGuard | Get /devices/{deviceID}/wireguards/{wireGuardID}/ | Device's wireguard profile detail |
ListDeviceBindings | Get /devices/{deviceID}/bindings/ | Device bindings |
ListDeviceConnectionModes | Get /devices/{deviceID}/connection-modes/ | Device connection modes |
ListDeviceDetailStats | Get /devices/{deviceID}/detail-stats/ | Device's detail stats list |
ListDevicePortForwardings | Get /devices/{deviceID}/port-forwarding/ | Device Port Forwarding List |
ListDeviceStats | Get /devices/{deviceID}/stats/ | Device's stats list |
ListDeviceWireGuardPeers | Get /devices/{deviceID}/wireguards/{wireGuardID}/peers/ | Device's wireguard peers |
ListDeviceWireGuards | Get /devices/{deviceID}/wireguards/ | Device's wireguard profiles list |
ListDevices | Get /devices/ | Device List |
UpdateDevice | Patch /devices/{deviceID}/ | Update device properties |
UpdateDevicePortForwarding | Patch /devices/{deviceID}/port-forwarding/{portForwardingID}/ | Update device's port forwarding |
Device CreateDevice(ctx).CreateOrUpdateDeviceRequest(createOrUpdateDeviceRequest).Execute()
Create new device
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createOrUpdateDeviceRequest := *openapiclient.NewCreateOrUpdateDeviceRequest() // CreateOrUpdateDeviceRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.CreateDevice(context.Background()).CreateOrUpdateDeviceRequest(createOrUpdateDeviceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.CreateDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDevice`: Device
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.CreateDevice`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateDeviceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createOrUpdateDeviceRequest | CreateOrUpdateDeviceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PortForwarding CreateDevicePortForwarding(ctx, deviceID).CreateOrUpdatePortForwardingRequest(createOrUpdatePortForwardingRequest).Execute()
Create new device port forwarding
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
createOrUpdatePortForwardingRequest := *openapiclient.NewCreateOrUpdatePortForwardingRequest() // CreateOrUpdatePortForwardingRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.CreateDevicePortForwarding(context.Background(), deviceID).CreateOrUpdatePortForwardingRequest(createOrUpdatePortForwardingRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.CreateDevicePortForwarding``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDevicePortForwarding`: PortForwarding
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.CreateDevicePortForwarding`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiCreateDevicePortForwardingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createOrUpdatePortForwardingRequest | CreateOrUpdatePortForwardingRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDevice(ctx, deviceID).Execute()
Delete Device
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.DeleteDevice(context.Background(), deviceID).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. | |
deviceID | 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]
DeleteDevicePortForwarding(ctx, deviceID, portForwardingID).Execute()
Delete Device's Port Forwarding
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
portForwardingID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.DeleteDevicePortForwarding(context.Background(), deviceID, portForwardingID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.DeleteDevicePortForwarding``: %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. | |
deviceID | string | ||
portForwardingID | string |
Other parameters are passed through a pointer to a apiDeleteDevicePortForwardingRequest 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]
Device GetDevice(ctx, deviceID).Execute()
Device Info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.GetDevice(context.Background(), deviceID).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. | |
deviceID | 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]
DeviceStats GetDeviceStats(ctx, deviceID, statsID).Execute()
Device's stats detail
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
statsID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.GetDeviceStats(context.Background(), deviceID, statsID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.GetDeviceStats``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceStats`: DeviceStats
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.GetDeviceStats`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string | ||
statsID | string |
Other parameters are passed through a pointer to a apiGetDeviceStatsRequest 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]
WireGuard GetDeviceWireGuard(ctx, deviceID, wireGuardID).Execute()
Device's wireguard profile detail
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
wireGuardID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.GetDeviceWireGuard(context.Background(), deviceID, wireGuardID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.GetDeviceWireGuard``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceWireGuard`: WireGuard
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.GetDeviceWireGuard`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string | ||
wireGuardID | string |
Other parameters are passed through a pointer to a apiGetDeviceWireGuardRequest 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]
[]string ListDeviceBindings(ctx, deviceID).Execute()
Device bindings
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceBindings(context.Background(), deviceID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceBindings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceBindings`: []string
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceBindings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDeviceBindingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ConnectionMode ListDeviceConnectionModes(ctx, deviceID).XAndroidPackage(xAndroidPackage).XAndroidSHA1(xAndroidSHA1).Execute()
Device connection modes
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
xAndroidPackage := "xAndroidPackage_example" // string | (optional)
xAndroidSHA1 := "xAndroidSHA1_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceConnectionModes(context.Background(), deviceID).XAndroidPackage(xAndroidPackage).XAndroidSHA1(xAndroidSHA1).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceConnectionModes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceConnectionModes`: []ConnectionMode
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceConnectionModes`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDeviceConnectionModesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xAndroidPackage | string | | xAndroidSHA1 | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]DeviceStats ListDeviceDetailStats(ctx, deviceID).DateTimeAfter(dateTimeAfter).DateTimeBefore(dateTimeBefore).PerPage(perPage).Page(page).Execute()
Device's detail stats list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
dateTimeAfter := "dateTimeAfter_example" // string | (optional)
dateTimeBefore := "dateTimeBefore_example" // string | (optional)
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceDetailStats(context.Background(), deviceID).DateTimeAfter(dateTimeAfter).DateTimeBefore(dateTimeBefore).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceDetailStats``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceDetailStats`: []DeviceStats
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceDetailStats`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDeviceDetailStatsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
dateTimeAfter | string | | dateTimeBefore | string | | perPage | int32 | | page | int32 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]PortForwarding ListDevicePortForwardings(ctx, deviceID).PerPage(perPage).Page(page).Execute()
Device Port Forwarding List
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDevicePortForwardings(context.Background(), deviceID).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDevicePortForwardings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDevicePortForwardings`: []PortForwarding
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDevicePortForwardings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDevicePortForwardingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
perPage | int32 | | page | int32 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]DeviceStats ListDeviceStats(ctx, deviceID).DateAfter(dateAfter).DateBefore(dateBefore).PerPage(perPage).Page(page).Execute()
Device's stats list
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
dateAfter := time.Now() // string | (optional)
dateBefore := time.Now() // string | (optional)
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceStats(context.Background(), deviceID).DateAfter(dateAfter).DateBefore(dateBefore).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceStats``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceStats`: []DeviceStats
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceStats`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDeviceStatsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
dateAfter | string | | dateBefore | string | | perPage | int32 | | page | int32 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]WireGuardPeer ListDeviceWireGuardPeers(ctx, deviceID, wireGuardID).Execute()
Device's wireguard peers
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
wireGuardID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceWireGuardPeers(context.Background(), deviceID, wireGuardID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceWireGuardPeers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceWireGuardPeers`: []WireGuardPeer
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceWireGuardPeers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string | ||
wireGuardID | string |
Other parameters are passed through a pointer to a apiListDeviceWireGuardPeersRequest 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]
[]WireGuard ListDeviceWireGuards(ctx, deviceID).PerPage(perPage).Page(page).Execute()
Device's wireguard profiles list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDeviceWireGuards(context.Background(), deviceID).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDeviceWireGuards``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDeviceWireGuards`: []WireGuard
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDeviceWireGuards`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiListDeviceWireGuardsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
perPage | int32 | | page | int32 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Device ListDevices(ctx).Q(q).ExternalKey(externalKey).RecentlyActive(recentlyActive).LastActiveAtAfter(lastActiveAtAfter).LastActiveAtBefore(lastActiveAtBefore).Sort(sort).PerPage(perPage).Page(page).Execute()
Device List
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
q := "q_example" // string | Filter by search query (optional)
externalKey := "externalKey_example" // string | Filter by external_key (optional)
recentlyActive := true // bool | Filter by recently active (optional)
lastActiveAtAfter := time.Now() // time.Time | Filter by last active at date-time after provided value (optional)
lastActiveAtBefore := time.Now() // time.Time | Filter by last active at date-time before provided value (optional)
sort := "sort_example" // string | Sort by provided field (optional)
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.ListDevices(context.Background()).Q(q).ExternalKey(externalKey).RecentlyActive(recentlyActive).LastActiveAtAfter(lastActiveAtAfter).LastActiveAtBefore(lastActiveAtBefore).Sort(sort).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.ListDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDevices`: []Device
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.ListDevices`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListDevicesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
q | string | Filter by search query | |
externalKey | string | Filter by external_key | |
recentlyActive | bool | Filter by recently active | |
lastActiveAtAfter | time.Time | Filter by last active at date-time after provided value | |
lastActiveAtBefore | time.Time | Filter by last active at date-time before provided value | |
sort | string | Sort by provided field | |
perPage | int32 | ||
page | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device UpdateDevice(ctx, deviceID).CreateOrUpdateDeviceRequest(createOrUpdateDeviceRequest).Execute()
Update device properties
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
createOrUpdateDeviceRequest := *openapiclient.NewCreateOrUpdateDeviceRequest() // CreateOrUpdateDeviceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.UpdateDevice(context.Background(), deviceID).CreateOrUpdateDeviceRequest(createOrUpdateDeviceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.UpdateDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDevice`: Device
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.UpdateDevice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string |
Other parameters are passed through a pointer to a apiUpdateDeviceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createOrUpdateDeviceRequest | CreateOrUpdateDeviceRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PortForwarding UpdateDevicePortForwarding(ctx, deviceID, portForwardingID).CreateOrUpdatePortForwardingRequest(createOrUpdatePortForwardingRequest).Execute()
Update device's port forwarding
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
deviceID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
portForwardingID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
createOrUpdatePortForwardingRequest := *openapiclient.NewCreateOrUpdatePortForwardingRequest() // CreateOrUpdatePortForwardingRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceApi.UpdateDevicePortForwarding(context.Background(), deviceID, portForwardingID).CreateOrUpdatePortForwardingRequest(createOrUpdatePortForwardingRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceApi.UpdateDevicePortForwarding``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDevicePortForwarding`: PortForwarding
fmt.Fprintf(os.Stdout, "Response from `DeviceApi.UpdateDevicePortForwarding`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceID | string | ||
portForwardingID | string |
Other parameters are passed through a pointer to a apiUpdateDevicePortForwardingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createOrUpdatePortForwardingRequest | CreateOrUpdatePortForwardingRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]