Skip to content

Latest commit

 

History

History
70 lines (42 loc) · 1.42 KB

RolesAPI.md

File metadata and controls

70 lines (42 loc) · 1.42 KB

\RolesAPI

All URIs are relative to http://localhost

Method HTTP request Description
GetRoles Get /api/v2/roles

GetRoles

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

ApiRoleListDTO

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]