Skip to content

Latest commit

 

History

History
131 lines (83 loc) · 3.15 KB

File metadata and controls

131 lines (83 loc) · 3.15 KB

\CommunityEditionEulaAPI

All URIs are relative to /service/rest

Method HTTP request Description
CreateSystemEula Post /v1/system/eula Set the Community Eula status.
ListSystemEula Get /v1/system/eula Get the current Community Eula status.

CreateSystemEula

CreateSystemEula(ctx).EulaStatus(eulaStatus).Execute()

Set the Community Eula status.

Example

package main

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

func main() {
	eulaStatus := *sonatyperepo.NewEulaStatus() // EulaStatus |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
eulaStatus EulaStatus

Return type

(empty response body)

Authorization

BasicAuth

HTTP request headers

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

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

ListSystemEula

EulaStatus ListSystemEula(ctx).Execute()

Get the current Community Eula status.

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

EulaStatus

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]