Skip to content

Latest commit

 

History

History
204 lines (124 loc) · 5.38 KB

File metadata and controls

204 lines (124 loc) · 5.38 KB

\UserTokenConfigurationAPI

All URIs are relative to http://localhost

Method HTTP request Description
GetConfiguration7 Get /api/v2/config/userTokens
ResetConfiguration Delete /api/v2/config/userTokens
UpdateConfiguration Put /api/v2/config/userTokens

GetConfiguration7

ApiUserTokenConfigurationDTO GetConfiguration7(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

ApiUserTokenConfigurationDTO

Authorization

BasicAuth, BearerAuth

HTTP request headers

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

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

ResetConfiguration

ApiUserTokenConfigurationDTO ResetConfiguration(ctx).Property(property).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)

func main() {
	property := []string{"Inner_example"} // []string |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
property []string

Return type

ApiUserTokenConfigurationDTO

Authorization

BasicAuth, BearerAuth

HTTP request headers

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

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

UpdateConfiguration

ApiUserTokenConfigurationDTO UpdateConfiguration(ctx).ApiUserTokenConfigurationDTO(apiUserTokenConfigurationDTO).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)

func main() {
	apiUserTokenConfigurationDTO := *sonatypeiq.NewApiUserTokenConfigurationDTO() // ApiUserTokenConfigurationDTO |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
apiUserTokenConfigurationDTO ApiUserTokenConfigurationDTO

Return type

ApiUserTokenConfigurationDTO

Authorization

BasicAuth, BearerAuth

HTTP request headers

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

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