Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 2.16 KB

README.md

File metadata and controls

58 lines (42 loc) · 2.16 KB

OpenSCAP

(OpenSCAP)

Overview

Requires that the openscap plugin is installed on the server.

Get OpenSCAP reports for nodes.

Available Operations

OpenscapReport

Get latest OpenSCAP report for the given node

Example Usage

package main

import(
	rudder "github.com/infra-rdc/rudder-go"
	"context"
	"log"
)

func main() {
    s := rudder.New(
        rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
    )
    var nodeID string = "9a1773c9-0889-40b6-be89-f6504443ac1b"
    ctx := context.Background()
    res, err := s.OpenSCAP.OpenscapReport(ctx, nodeID)
    if err != nil {
        log.Fatal(err)
    }
    if res.Res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
nodeID string ✔️ Id of the target node 9a1773c9-0889-40b6-be89-f6504443ac1b

Response

*operations.OpenscapReportResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /