All URIs are relative to https://127.0.0.1:8006/api2/json
Method | HTTP request | Description |
---|---|---|
GetClusterConfigNodes | Get /cluster/config/nodes | getClusterConfigNodes |
GetClusterNextid | Get /cluster/nextid | getClusterNextid |
GetClusterResources | Get /cluster/resources | getClusterResources |
GetClusterConfigNodes200Response GetClusterConfigNodes(ctx).Execute()
getClusterConfigNodes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/DirkTheDaring/px-api-client-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ClusterAPI.GetClusterConfigNodes(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClusterAPI.GetClusterConfigNodes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClusterConfigNodes`: GetClusterConfigNodes200Response
fmt.Fprintf(os.Stdout, "Response from `ClusterAPI.GetClusterConfigNodes`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetClusterConfigNodesRequest struct via the builder pattern
GetClusterConfigNodes200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetClusterNextid200Response GetClusterNextid(ctx).Vmid(vmid).Execute()
getClusterNextid
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/DirkTheDaring/px-api-client-go"
)
func main() {
vmid := int64(789) // int64 | The (unique) ID of the VM. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ClusterAPI.GetClusterNextid(context.Background()).Vmid(vmid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClusterAPI.GetClusterNextid``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClusterNextid`: GetClusterNextid200Response
fmt.Fprintf(os.Stdout, "Response from `ClusterAPI.GetClusterNextid`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetClusterNextidRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmid | int64 | The (unique) ID of the VM. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetClusterResources200Response GetClusterResources(ctx).Type_(type_).Execute()
getClusterResources
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/DirkTheDaring/px-api-client-go"
)
func main() {
type_ := "type__example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ClusterAPI.GetClusterResources(context.Background()).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ClusterAPI.GetClusterResources``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClusterResources`: GetClusterResources200Response
fmt.Fprintf(os.Stdout, "Response from `ClusterAPI.GetClusterResources`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetClusterResourcesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
type_ | string |
GetClusterResources200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]