Skip to content

Latest commit

 

History

History
313 lines (201 loc) · 7.88 KB

File metadata and controls

313 lines (201 loc) · 7.88 KB

\StatusAPI

All URIs are relative to /service/rest

Method HTTP request Description
GetStatusCheck Get /beta/status/check/{nodeId} Health check endpoint that returns the results of the system status checks of specified Node
ListStatus Get /v1/status Health check endpoint that validates server can respond to read requests
ListStatusCheck Get /v1/status/check Health check endpoint that returns the results of the system status checks
ListStatusCheckCluster Get /beta/status/check/cluster Health check endpoint that returns the results of the system status checks
ListStatusWritable Get /v1/status/writable Health check endpoint that validates server can respond to read and write requests

GetStatusCheck

SystemCheckResultsApiDTO GetStatusCheck(ctx, nodeId).Execute()

Health check endpoint that returns the results of the system status checks of specified Node

Example

package main

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

func main() {
	nodeId := "nodeId_example" // string | Node Id

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

SystemCheckResultsApiDTO

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]

ListStatus

ListStatus(ctx).Execute()

Health check endpoint that validates server can respond to read requests

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.StatusAPI.ListStatus(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusAPI.ListStatus``: %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 apiListStatusRequest 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]

ListStatusCheck

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

Health check endpoint that returns the results of the system status checks

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.StatusAPI.ListStatusCheck(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusAPI.ListStatusCheck``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListStatusCheck`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `StatusAPI.ListStatusCheck`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListStatusCheckRequest 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]

ListStatusCheckCluster

[]SystemCheckResultsApiDTO ListStatusCheckCluster(ctx).Execute()

Health check endpoint that returns the results of the system status checks

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.StatusAPI.ListStatusCheckCluster(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusAPI.ListStatusCheckCluster``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListStatusCheckCluster`: []SystemCheckResultsApiDTO
	fmt.Fprintf(os.Stdout, "Response from `StatusAPI.ListStatusCheckCluster`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]SystemCheckResultsApiDTO

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]

ListStatusWritable

ListStatusWritable(ctx).Execute()

Health check endpoint that validates server can respond to read and write requests

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.StatusAPI.ListStatusWritable(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusAPI.ListStatusWritable``: %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 apiListStatusWritableRequest 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]