Skip to content

Latest commit

 

History

History
137 lines (83 loc) · 3.52 KB

MalwareAPI.md

File metadata and controls

137 lines (83 loc) · 3.52 KB

\MalwareAPI

All URIs are relative to http://localhost

Method HTTP request Description
EvaluateMalware Post /api/v2/malware/defense/evaluate
GetMalwareDefenseMetrics Get /api/v2/malware/defense/metrics

EvaluateMalware

MalwareDefenseResponseList EvaluateMalware(ctx).ApiMalwareComponentEvaluationRequestList(apiMalwareComponentEvaluationRequestList).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)

func main() {
	apiMalwareComponentEvaluationRequestList := *sonatypeiq.NewApiMalwareComponentEvaluationRequestList() // ApiMalwareComponentEvaluationRequestList |  (optional)

	configuration := sonatypeiq.NewConfiguration()
	apiClient := sonatypeiq.NewAPIClient(configuration)
	resp, r, err := apiClient.MalwareAPI.EvaluateMalware(context.Background()).ApiMalwareComponentEvaluationRequestList(apiMalwareComponentEvaluationRequestList).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MalwareAPI.EvaluateMalware``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EvaluateMalware`: MalwareDefenseResponseList
	fmt.Fprintf(os.Stdout, "Response from `MalwareAPI.EvaluateMalware`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
apiMalwareComponentEvaluationRequestList ApiMalwareComponentEvaluationRequestList

Return type

MalwareDefenseResponseList

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMalwareDefenseMetrics

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

map[string]int64

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]