All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AddLabel | Post /api/v2/labels/{ownerType}/{ownerId} | |
DeleteLabel | Delete /api/v2/labels/{ownerType}/{ownerId}/{labelId} | |
GetApplicableContexts | Get /api/v2/labels/{ownerType}/{ownerId}/applicable/context/{labelId} | |
GetApplicableLabels | Get /api/v2/labels/{ownerType}/{ownerId}/applicable | |
GetLabels | Get /api/v2/labels/{ownerType}/{ownerId} | |
UpdateLabel | Put /api/v2/labels/{ownerType}/{ownerId} |
ApiLabelDTO AddLabel(ctx, ownerType, ownerId).ApiLabelDTO(apiLabelDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
apiLabelDTO := *sonatypeiq.NewApiLabelDTO() // ApiLabelDTO | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.AddLabel(context.Background(), ownerType, ownerId).ApiLabelDTO(apiLabelDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.AddLabel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddLabel`: ApiLabelDTO
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.AddLabel`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | ||
ownerId | string |
Other parameters are passed through a pointer to a apiAddLabelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiLabelDTO | ApiLabelDTO | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteLabel(ctx, ownerType, ownerId, labelId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
labelId := "labelId_example" // string |
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.LabelsAPI.DeleteLabel(context.Background(), ownerType, ownerId, labelId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.DeleteLabel``: %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. | |
ownerType | string | ||
ownerId | string | ||
labelId | string |
Other parameters are passed through a pointer to a apiDeleteLabelRequest 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]
ApplicableContext GetApplicableContexts(ctx, ownerType, ownerId, labelId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
labelId := "labelId_example" // string |
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.GetApplicableContexts(context.Background(), ownerType, ownerId, labelId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.GetApplicableContexts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetApplicableContexts`: ApplicableContext
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.GetApplicableContexts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | ||
ownerId | string | ||
labelId | string |
Other parameters are passed through a pointer to a apiGetApplicableContextsRequest 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]
ApplicableLabels GetApplicableLabels(ctx, ownerType, ownerId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.GetApplicableLabels(context.Background(), ownerType, ownerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.GetApplicableLabels``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetApplicableLabels`: ApplicableLabels
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.GetApplicableLabels`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | ||
ownerId | string |
Other parameters are passed through a pointer to a apiGetApplicableLabelsRequest 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]
[]ApiLabelDTO GetLabels(ctx, ownerType, ownerId).Inherit(inherit).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
inherit := true // bool | (optional) (default to false)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.GetLabels(context.Background(), ownerType, ownerId).Inherit(inherit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.GetLabels``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLabels`: []ApiLabelDTO
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.GetLabels`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | ||
ownerId | string |
Other parameters are passed through a pointer to a apiGetLabelsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
inherit | bool | | [default to false]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiLabelDTO UpdateLabel(ctx, ownerType, ownerId).ApiLabelDTO(apiLabelDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string |
ownerId := "ownerId_example" // string |
apiLabelDTO := *sonatypeiq.NewApiLabelDTO() // ApiLabelDTO | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.UpdateLabel(context.Background(), ownerType, ownerId).ApiLabelDTO(apiLabelDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.UpdateLabel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLabel`: ApiLabelDTO
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.UpdateLabel`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | ||
ownerId | string |
Other parameters are passed through a pointer to a apiUpdateLabelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiLabelDTO | ApiLabelDTO | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]