All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetAll1 | Get /api/v2/reports/applications | |
GetByApplicationId | Get /api/v2/reports/applications/{applicationId} | |
GetComponentsInQuarantine | Get /api/v2/reports/components/quarantined | |
GetComponentsWithWaivers | Get /api/v2/reports/components/waivers | |
GetMetrics | Post /api/v2/reports/metrics | |
GetReportHistoryForApplication | Get /api/v2/reports/applications/{applicationId}/history | |
GetStaleWaivers | Get /api/v2/reports/waivers/stale |
[]ApiApplicationReportDTOV2 GetAll1(ctx).Execute()
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.ReportsAPI.GetAll1(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetAll1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAll1`: []ApiApplicationReportDTOV2
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetAll1`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAll1Request struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ApiApplicationReportDTOV2 GetByApplicationId(ctx, applicationId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
applicationId := "applicationId_example" // string | Enter the internal application Id. You can use the Applications REST API to get the internal application Id.
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.ReportsAPI.GetByApplicationId(context.Background(), applicationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetByApplicationId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetByApplicationId`: []ApiApplicationReportDTOV2
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetByApplicationId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
applicationId | string | Enter the internal application Id. You can use the Applications REST API to get the internal application Id. |
Other parameters are passed through a pointer to a apiGetByApplicationIdRequest 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]
ApiComponentsInQuarantineDTO GetComponentsInQuarantine(ctx).Execute()
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.ReportsAPI.GetComponentsInQuarantine(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetComponentsInQuarantine``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetComponentsInQuarantine`: ApiComponentsInQuarantineDTO
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetComponentsInQuarantine`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetComponentsInQuarantineRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiComponentWaiversDTO GetComponentsWithWaivers(ctx).Format(format).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
format := "format_example" // string | Enter the format/ecosystem of the component (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.ReportsAPI.GetComponentsWithWaivers(context.Background()).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetComponentsWithWaivers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetComponentsWithWaivers`: ApiComponentWaiversDTO
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetComponentsWithWaivers`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetComponentsWithWaiversRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
format | string | Enter the format/ecosystem of the component |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMetrics(ctx).ApiMetricsReportingQueryDTOV2(apiMetricsReportingQueryDTOV2).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
apiMetricsReportingQueryDTOV2 := *sonatypeiq.NewApiMetricsReportingQueryDTOV2() // ApiMetricsReportingQueryDTOV2 | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.ReportsAPI.GetMetrics(context.Background()).ApiMetricsReportingQueryDTOV2(apiMetricsReportingQueryDTOV2).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiGetMetricsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
apiMetricsReportingQueryDTOV2 | ApiMetricsReportingQueryDTOV2 |
(empty response body)
- Content-Type: application/json
- Accept: application/json, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiReportHistoryDTO GetReportHistoryForApplication(ctx, applicationId).Stage(stage).Limit(limit).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
applicationId := "applicationId_example" // string | Enter the internal application Id. You can use the Applications REST API to get the internal application Id.
stage := "stage_example" // string | Enter the specific stage, for which you want retrieve the scan history, e.g. 'build' (optional)
limit := int32(56) // int32 | Enter the exact no. of most recent reports to retrieve. (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.ReportsAPI.GetReportHistoryForApplication(context.Background(), applicationId).Stage(stage).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetReportHistoryForApplication``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReportHistoryForApplication`: ApiReportHistoryDTO
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetReportHistoryForApplication`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
applicationId | string | Enter the internal application Id. You can use the Applications REST API to get the internal application Id. |
Other parameters are passed through a pointer to a apiGetReportHistoryForApplicationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
stage | string | Enter the specific stage, for which you want retrieve the scan history, e.g. 'build' | limit | int32 | Enter the exact no. of most recent reports to retrieve. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiStaleWaiversResponseDTO GetStaleWaivers(ctx).Execute()
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.ReportsAPI.GetStaleWaivers(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.GetStaleWaivers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStaleWaivers`: ApiStaleWaiversResponseDTO
fmt.Fprintf(os.Stdout, "Response from `ReportsAPI.GetStaleWaivers`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetStaleWaiversRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]