Skip to content

Latest commit

 

History

History
204 lines (127 loc) · 5.16 KB

ClusterAPI.md

File metadata and controls

204 lines (127 loc) · 5.16 KB

\ClusterAPI

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

GetClusterConfigNodes

GetClusterConfigNodes200Response GetClusterConfigNodes(ctx).Execute()

getClusterConfigNodes

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

GetClusterConfigNodes200Response

Authorization

cookie, token

HTTP request headers

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

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

GetClusterNextid

GetClusterNextid200Response GetClusterNextid(ctx).Vmid(vmid).Execute()

getClusterNextid

Example

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)
}

Path Parameters

Other Parameters

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.

Return type

GetClusterNextid200Response

Authorization

cookie, token

HTTP request headers

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

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

GetClusterResources

GetClusterResources200Response GetClusterResources(ctx).Type_(type_).Execute()

getClusterResources

Example

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)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
type_ string

Return type

GetClusterResources200Response

Authorization

cookie, token

HTTP request headers

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

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