All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetIndividualThreatGraph | Post /kengine/graph/threat/individual | Get Vulnerability Threat Graph |
GetThreatGraph | Post /kengine/graph/threat | Get Threat Graph |
[]GraphIndividualThreatGraph GetIndividualThreatGraph(ctx).GraphIndividualThreatGraphRequest(graphIndividualThreatGraphRequest).Execute()
Get Vulnerability Threat Graph
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/khulnasoft-lab/golang_sdk/client"
)
func main() {
graphIndividualThreatGraphRequest := *openapiclient.NewGraphIndividualThreatGraphRequest("GraphType_example", "IssueType_example") // GraphIndividualThreatGraphRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ThreatAPI.GetIndividualThreatGraph(context.Background()).GraphIndividualThreatGraphRequest(graphIndividualThreatGraphRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ThreatAPI.GetIndividualThreatGraph``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetIndividualThreatGraph`: []GraphIndividualThreatGraph
fmt.Fprintf(os.Stdout, "Response from `ThreatAPI.GetIndividualThreatGraph`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetIndividualThreatGraphRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
graphIndividualThreatGraphRequest | GraphIndividualThreatGraphRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]GraphProviderThreatGraph GetThreatGraph(ctx).GraphThreatFilters(graphThreatFilters).Execute()
Get Threat Graph
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/khulnasoft-lab/golang_sdk/client"
)
func main() {
graphThreatFilters := *openapiclient.NewGraphThreatFilters(*openapiclient.NewGraphCloudProviderFilter([]string{"AccountIds_example"}), *openapiclient.NewGraphCloudProviderFilter([]string{"AccountIds_example"}), false, *openapiclient.NewGraphCloudProviderFilter([]string{"AccountIds_example"}), "Type_example") // GraphThreatFilters | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ThreatAPI.GetThreatGraph(context.Background()).GraphThreatFilters(graphThreatFilters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ThreatAPI.GetThreatGraph``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetThreatGraph`: map[string]GraphProviderThreatGraph
fmt.Fprintf(os.Stdout, "Response from `ThreatAPI.GetThreatGraph`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetThreatGraphRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
graphThreatFilters | GraphThreatFilters |
map[string]GraphProviderThreatGraph
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]