Skip to content

Latest commit

 

History

History
186 lines (119 loc) · 4.5 KB

File metadata and controls

186 lines (119 loc) · 4.5 KB

\SystemNodesAPI

All URIs are relative to /service/rest

Method HTTP request Description
DeleteSystemNode Delete /v1/system/node Reset the ID for this node. Takes effect after restart and should only be used when cloning an instance
ListSystemInformation Get /beta/system/information Get information about all nodes
ListSystemNode Get /v1/system/node Get information about this node

DeleteSystemNode

DeleteSystemNode(ctx).Execute()

Reset the ID for this node. Takes effect after restart and should only be used when cloning an instance

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ListSystemInformation

map[string]interface{} ListSystemInformation(ctx).Execute()

Get information about all nodes

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)

func main() {

	configuration := sonatyperepo.NewConfiguration()
	apiClient := sonatyperepo.NewAPIClient(configuration)
	resp, r, err := apiClient.SystemNodesAPI.ListSystemInformation(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SystemNodesAPI.ListSystemInformation``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListSystemInformation`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `SystemNodesAPI.ListSystemInformation`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

map[string]interface{}

Authorization

BasicAuth

HTTP request headers

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

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

ListSystemNode

NodeInformation ListSystemNode(ctx).Execute()

Get information about this node

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go/v395"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

NodeInformation

Authorization

BasicAuth

HTTP request headers

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

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