All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| DeleteAttributionReportTemplate | Delete /api/v2/licenseLegalMetadata/report-template/{id} | |
| GetAllAttributionReportTemplates | Get /api/v2/licenseLegalMetadata/report-template | |
| GetAttributionReportTemplateById | Get /api/v2/licenseLegalMetadata/report-template/{id} | |
| SaveAttributionReportTemplate | Post /api/v2/licenseLegalMetadata/report-template |
DeleteAttributionReportTemplate(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
id := "id_example" // string | Enter the template id for the template to be deleted.
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.LicenseLegalMetadataTemplateAPI.DeleteAttributionReportTemplate(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LicenseLegalMetadataTemplateAPI.DeleteAttributionReportTemplate``: %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. | |
| id | string | Enter the template id for the template to be deleted. |
Other parameters are passed through a pointer to a apiDeleteAttributionReportTemplateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AttributionReportTemplateDTO GetAllAttributionReportTemplates(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.LicenseLegalMetadataTemplateAPI.GetAllAttributionReportTemplates(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LicenseLegalMetadataTemplateAPI.GetAllAttributionReportTemplates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllAttributionReportTemplates`: []AttributionReportTemplateDTO
fmt.Fprintf(os.Stdout, "Response from `LicenseLegalMetadataTemplateAPI.GetAllAttributionReportTemplates`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAllAttributionReportTemplatesRequest struct via the builder pattern
[]AttributionReportTemplateDTO
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AttributionReportTemplateDTO GetAttributionReportTemplateById(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
id := "id_example" // string | Enter the templateId for the report.
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LicenseLegalMetadataTemplateAPI.GetAttributionReportTemplateById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LicenseLegalMetadataTemplateAPI.GetAttributionReportTemplateById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAttributionReportTemplateById`: AttributionReportTemplateDTO
fmt.Fprintf(os.Stdout, "Response from `LicenseLegalMetadataTemplateAPI.GetAttributionReportTemplateById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Enter the templateId for the report. |
Other parameters are passed through a pointer to a apiGetAttributionReportTemplateByIdRequest 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]
AttributionReportTemplateDTO SaveAttributionReportTemplate(ctx).AttributionReportTemplateDTO(attributionReportTemplateDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
attributionReportTemplateDTO := *sonatypeiq.NewAttributionReportTemplateDTO() // AttributionReportTemplateDTO | Specify the details for the template as:<ul><li>`id` is the template id.</li><li>`templateName` indicates the name of the stored template.</li><li>`documentTitle` is the title that is displayed at the top of the report.</li><li>`header` is the text that will be displayed above the `documentTitle`.</li><li>`footer` is the text that will be displayed at the bottom of the report.<li><li>`includeTableOfContents` is `true` if a table of contents containing links to the components and their licenses will be added to the report.<li>`includeAppendix` is `true` if standard license text will be grouped in the report appendix.</li><li>`includeStandardLicenseTexts` is `true` if the standard license text will be displayed for components with no license files.</li><li>`includeSonatypeSpecialLicenses` is `true` if Sonatype Special Licenses (e.g. Generic-Copyleft-Clause, Generic-Liberal-Clause, See-License-Clause, Identity-Clause etc.) will be included in the report.</li><li>`includeInnerSource` is `true` if InnerSource components will be included in the report.</li></ul> (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.LicenseLegalMetadataTemplateAPI.SaveAttributionReportTemplate(context.Background()).AttributionReportTemplateDTO(attributionReportTemplateDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LicenseLegalMetadataTemplateAPI.SaveAttributionReportTemplate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SaveAttributionReportTemplate`: AttributionReportTemplateDTO
fmt.Fprintf(os.Stdout, "Response from `LicenseLegalMetadataTemplateAPI.SaveAttributionReportTemplate`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSaveAttributionReportTemplateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| attributionReportTemplateDTO | AttributionReportTemplateDTO | Specify the details for the template as:<ul><li>`id` is the template id.</li><li>`templateName` indicates the name of the stored template.</li><li>`documentTitle` is the title that is displayed at the top of the report.</li><li>`header` is the text that will be displayed above the `documentTitle`.</li><li>`footer` is the text that will be displayed at the bottom of the report.<li><li>`includeTableOfContents` is `true` if a table of contents containing links to the components and their licenses will be added to the report.<li>`includeAppendix` is `true` if standard license text will be grouped in the report appendix.</li><li>`includeStandardLicenseTexts` is `true` if the standard license text will be displayed for components with no license files.</li><li>`includeSonatypeSpecialLicenses` is `true` if Sonatype Special Licenses (e.g. Generic-Copyleft-Clause, Generic-Liberal-Clause, See-License-Clause, Identity-Clause etc.) will be included in the report.</li><li>`includeInnerSource` is `true` if InnerSource components will be included in the report.</li></ul> |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]