Skip to content

Latest commit

 

History

History
262 lines (158 loc) · 7.44 KB

File metadata and controls

262 lines (158 loc) · 7.44 KB

\ConfigCrowdAPI

All URIs are relative to http://localhost

Method HTTP request Description
DeleteCrowdConfiguration Delete /api/v2/config/crowd
GetCrowdConfiguration Get /api/v2/config/crowd
InsertOrUpdateCrowdConfiguration Put /api/v2/config/crowd
TestCrowdConfiguration Post /api/v2/config/crowd/test

DeleteCrowdConfiguration

DeleteCrowdConfiguration(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)
	r, err := apiClient.ConfigCrowdAPI.DeleteCrowdConfiguration(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ConfigCrowdAPI.DeleteCrowdConfiguration``: %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 apiDeleteCrowdConfigurationRequest struct via the builder pattern

Return type

(empty response body)

Authorization

BasicAuth, BearerAuth

HTTP request headers

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

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

GetCrowdConfiguration

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

ApiCrowdConfigurationDTO

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]

InsertOrUpdateCrowdConfiguration

InsertOrUpdateCrowdConfiguration(ctx).ApiCrowdConfigurationDTO(apiCrowdConfigurationDTO).Execute()

Example

package main

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

func main() {
	apiCrowdConfigurationDTO := *sonatypeiq.NewApiCrowdConfigurationDTO() // ApiCrowdConfigurationDTO | The request JSON should include the `serverUrl`, `applicationName`, and the `applicationPassword` which will be used for authentication against the Atlassian Crowd Server.  If updating the `serverUrl`, the `applicationPassword` field is required. (optional)

	configuration := sonatypeiq.NewConfiguration()
	apiClient := sonatypeiq.NewAPIClient(configuration)
	r, err := apiClient.ConfigCrowdAPI.InsertOrUpdateCrowdConfiguration(context.Background()).ApiCrowdConfigurationDTO(apiCrowdConfigurationDTO).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ConfigCrowdAPI.InsertOrUpdateCrowdConfiguration``: %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 apiInsertOrUpdateCrowdConfigurationRequest struct via the builder pattern

Name Type Description Notes
apiCrowdConfigurationDTO ApiCrowdConfigurationDTO The request JSON should include the `serverUrl`, `applicationName`, and the `applicationPassword` which will be used for authentication against the Atlassian Crowd Server. If updating the `serverUrl`, the `applicationPassword` field is required.

Return type

(empty response body)

Authorization

BasicAuth, BearerAuth

HTTP request headers

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

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

TestCrowdConfiguration

ApiStatusDTO TestCrowdConfiguration(ctx).ApiCrowdConfigurationDTO(apiCrowdConfigurationDTO).Execute()

Example

package main

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

func main() {
	apiCrowdConfigurationDTO := *sonatypeiq.NewApiCrowdConfigurationDTO() // ApiCrowdConfigurationDTO | To test an existing configuration, the request body is not required.  To test a new configuration, provide the `serverURl`, `applicationName`, and `applicationPassword` for the configuration. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
apiCrowdConfigurationDTO ApiCrowdConfigurationDTO To test an existing configuration, the request body is not required. To test a new configuration, provide the `serverURl`, `applicationName`, and `applicationPassword` for the configuration.

Return type

ApiStatusDTO

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]