All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AddOrganization | Post /api/v2/organizations | |
DeleteOrganization | Delete /api/v2/organizations/{organizationId} | |
GetOrganization | Get /api/v2/organizations/{organizationId} | |
GetOrganizations | Get /api/v2/organizations | |
MoveOrganization | Put /api/v2/organizations/{organizationId}/move/destination/{destinationId} |
ApiOrganizationDTO AddOrganization(ctx).ApiOrganizationDTO(apiOrganizationDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
apiOrganizationDTO := *sonatypeiq.NewApiOrganizationDTO() // ApiOrganizationDTO | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.OrganizationsAPI.AddOrganization(context.Background()).ApiOrganizationDTO(apiOrganizationDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsAPI.AddOrganization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddOrganization`: ApiOrganizationDTO
fmt.Fprintf(os.Stdout, "Response from `OrganizationsAPI.AddOrganization`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAddOrganizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
apiOrganizationDTO | ApiOrganizationDTO |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOrganization(ctx, organizationId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
organizationId := "organizationId_example" // string |
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.OrganizationsAPI.DeleteOrganization(context.Background(), organizationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsAPI.DeleteOrganization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string |
Other parameters are passed through a pointer to a apiDeleteOrganizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiOrganizationDTO GetOrganization(ctx, organizationId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
organizationId := "organizationId_example" // string |
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.OrganizationsAPI.GetOrganization(context.Background(), organizationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsAPI.GetOrganization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrganization`: ApiOrganizationDTO
fmt.Fprintf(os.Stdout, "Response from `OrganizationsAPI.GetOrganization`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string |
Other parameters are passed through a pointer to a apiGetOrganizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiOrganizationListDTO GetOrganizations(ctx).OrganizationName(organizationName).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
organizationName := []string{"Inner_example"} // []string | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.OrganizationsAPI.GetOrganizations(context.Background()).OrganizationName(organizationName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsAPI.GetOrganizations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrganizations`: ApiOrganizationListDTO
fmt.Fprintf(os.Stdout, "Response from `OrganizationsAPI.GetOrganizations`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetOrganizationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
organizationName | []string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MoveOrganization(ctx, organizationId, destinationId).FailEarlyOnError(failEarlyOnError).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
organizationId := "organizationId_example" // string |
destinationId := "destinationId_example" // string |
failEarlyOnError := true // bool | (optional) (default to false)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.OrganizationsAPI.MoveOrganization(context.Background(), organizationId, destinationId).FailEarlyOnError(failEarlyOnError).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsAPI.MoveOrganization``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | ||
destinationId | string |
Other parameters are passed through a pointer to a apiMoveOrganizationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
failEarlyOnError | bool | | [default to false]
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]