Skip to content

Latest commit

 

History

History
318 lines (201 loc) · 12 KB

ScannerApi.md

File metadata and controls

318 lines (201 loc) · 12 KB

\ScannerApi

All URIs are relative to http://localhost/api/v2.0

Method HTTP request Description
CreateScanner Post /scanners Create a scanner registration
DeleteScanner Delete /scanners/{registration_id} Delete a scanner registration
GetScanner Get /scanners/{registration_id} Get a scanner registration details
GetScannerMetadata Get /scanners/{registration_id}/metadata Get the metadata of the specified scanner registration
ListScanners Get /scanners List scanner registrations
PingScanner Post /scanners/ping Tests scanner registration settings
SetScannerAsDefault Patch /scanners/{registration_id} Set system default scanner registration
UpdateScanner Put /scanners/{registration_id} Update a scanner registration

CreateScanner

CreateScanner(ctx, registration, optional) Create a scanner registration

Creats a new scanner registration with the given data.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registration ScannerRegistrationReq A scanner registration to be created.
optional *ScannerApiCreateScannerOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiCreateScannerOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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

DeleteScanner

ScannerRegistration DeleteScanner(ctx, registrationId, optional) Delete a scanner registration

Deletes the specified scanner registration.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registrationId string The scanner registration identifier.
optional *ScannerApiDeleteScannerOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiDeleteScannerOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

ScannerRegistration

Authorization

basic

HTTP request headers

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

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

GetScanner

ScannerRegistration GetScanner(ctx, registrationId, optional) Get a scanner registration details

Retruns the details of the specified scanner registration.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registrationId string The scanner registration identifer.
optional *ScannerApiGetScannerOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiGetScannerOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

ScannerRegistration

Authorization

basic

HTTP request headers

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

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

GetScannerMetadata

ScannerAdapterMetadata GetScannerMetadata(ctx, registrationId, optional) Get the metadata of the specified scanner registration

Get the metadata of the specified scanner registration, including the capabilities and customized properties.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registrationId string The scanner registration identifier.
optional *ScannerApiGetScannerMetadataOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiGetScannerMetadataOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

ScannerAdapterMetadata

Authorization

basic

HTTP request headers

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

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

ListScanners

[]ScannerRegistration ListScanners(ctx, optional) List scanner registrations

Returns a list of currently configured scanner registrations.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ScannerApiListScannersOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiListScannersOpts struct

Name Type Description Notes
xRequestId optional.String An unique ID for the request
q optional.String Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=v)", "range(k=[minmax])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=v2,k3=[minmax]
sort optional.String Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2"
page optional.Int64 The page number [default to 1]
pageSize optional.Int64 The size of per page [default to 10]

Return type

[]ScannerRegistration

Authorization

basic

HTTP request headers

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

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

PingScanner

PingScanner(ctx, settings, optional) Tests scanner registration settings

Pings scanner adapter to test endpoint URL and authorization settings.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
settings ScannerRegistrationSettings A scanner registration settings to be tested.
optional *ScannerApiPingScannerOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiPingScannerOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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

SetScannerAsDefault

SetScannerAsDefault(ctx, registrationId, payload, optional) Set system default scanner registration

Set the specified scanner registration as the system default one.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registrationId string The scanner registration identifier.
payload IsDefault
optional *ScannerApiSetScannerAsDefaultOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiSetScannerAsDefaultOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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

UpdateScanner

UpdateScanner(ctx, registrationId, registration, optional) Update a scanner registration

Updates the specified scanner registration.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
registrationId string The scanner registration identifier.
registration ScannerRegistrationReq A scanner registraiton to be updated.
optional *ScannerApiUpdateScannerOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScannerApiUpdateScannerOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

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