Skip to content

Latest commit

 

History

History
528 lines (296 loc) · 13.1 KB

SystemApi.md

File metadata and controls

528 lines (296 loc) · 13.1 KB

\SystemApi

All URIs are relative to http://localhost

Method HTTP request Description
DeleteFeed Delete /system/feeds/{feed}
DeleteFeedGroup Delete /system/feeds/{feed}/{group}
DeleteService Delete /system/services/{servicename}/{hostid} Delete the service config
DescribeErrorCodes Get /system/error_codes Describe anchore engine error codes.
DescribePolicy Get /system/policy_spec Describe the policy language spec implemented by this service.
GetServiceDetail Get /system System status
GetServicesByName Get /system/services/{servicename} Get a service configuration and state
GetServicesByNameAndHost Get /system/services/{servicename}/{hostid} Get service config for a specific host
GetStatus Get /status Service status
GetSystemFeeds Get /system/feeds list feeds operations and information
ListServices Get /system/services List system services
PostSystemFeeds Post /system/feeds trigger feeds operations
TestWebhook Post /system/webhooks/{webhook_type}/test Adds the capabilities to test a webhook delivery for the given notification type
ToggleFeedEnabled Put /system/feeds/{feed}
ToggleGroupEnabled Put /system/feeds/{feed}/{group}

DeleteFeed

DeleteFeed(ctx, feed)

Delete the groups and data for the feed and disable the feed itself

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
feed string

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteFeedGroup

DeleteFeedGroup(ctx, feed, group)

Delete the group data and disable the group itself

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
feed string
group string

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteService

DeleteService(ctx, servicename, hostid)

Delete the service config

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
servicename string
hostid string

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

DescribeErrorCodes

[]AnchoreErrorCode DescribeErrorCodes(ctx, )

Describe anchore engine error codes.

Describe anchore engine error codes.

Required Parameters

This endpoint does not need any parameter.

Return type

[]AnchoreErrorCode

Authorization

No authorization required

HTTP request headers

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

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

DescribePolicy

[]GateSpec DescribePolicy(ctx, )

Describe the policy language spec implemented by this service.

Get the policy language spec for this service

Required Parameters

This endpoint does not need any parameter.

Return type

[]GateSpec

Authorization

No authorization required

HTTP request headers

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

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

GetServiceDetail

SystemStatusResponse GetServiceDetail(ctx, )

System status

Get the system status including queue lengths

Required Parameters

This endpoint does not need any parameter.

Return type

SystemStatusResponse

Authorization

No authorization required

HTTP request headers

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

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

GetServicesByName

[]Service GetServicesByName(ctx, servicename)

Get a service configuration and state

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
servicename string

Return type

[]Service

Authorization

No authorization required

HTTP request headers

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

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

GetServicesByNameAndHost

[]Service GetServicesByNameAndHost(ctx, servicename, hostid)

Get service config for a specific host

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
servicename string
hostid string

Return type

[]Service

Authorization

No authorization required

HTTP request headers

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

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

GetStatus

StatusResponse GetStatus(ctx, )

Service status

Get the API service status

Required Parameters

This endpoint does not need any parameter.

Return type

StatusResponse

Authorization

No authorization required

HTTP request headers

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

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

GetSystemFeeds

[]FeedMetadata GetSystemFeeds(ctx, )

list feeds operations and information

Return a list of feed and their groups along with update and record count information. This data reflects the state of the policy engine, not the upstream feed service itself.

Required Parameters

This endpoint does not need any parameter.

Return type

[]FeedMetadata

Authorization

No authorization required

HTTP request headers

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

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

ListServices

[]Service ListServices(ctx, )

List system services

Required Parameters

This endpoint does not need any parameter.

Return type

[]Service

Authorization

No authorization required

HTTP request headers

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

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

PostSystemFeeds

[]FeedSyncResult PostSystemFeeds(ctx, optional)

trigger feeds operations

Execute a synchronous feed sync operation. The response will block until complete, then return the result summary.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a PostSystemFeedsOpts struct

Name Type Description Notes
flush optional.Bool instruct system to flush existing data feeds records from anchore-engine
sync optional.Bool instruct system to re-sync data feeds

Return type

[]FeedSyncResult

Authorization

No authorization required

HTTP request headers

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

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

TestWebhook

TestWebhook(ctx, webhookType, optional)

Adds the capabilities to test a webhook delivery for the given notification type

Loads the Webhook configuration for webhook_type, and sends the notification out as a test

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookType string The Webhook Type that we should test
optional *TestWebhookOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a TestWebhookOpts struct

Name Type Description Notes

notificationType | optional.String| What kind of Notification to send | [default to tag_update]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

ToggleFeedEnabled

FeedMetadata ToggleFeedEnabled(ctx, feed, enabled)

Disable the feed so that it does not sync on subsequent sync operations

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
feed string
enabled bool

Return type

FeedMetadata

Authorization

No authorization required

HTTP request headers

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

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

ToggleGroupEnabled

[]FeedMetadata ToggleGroupEnabled(ctx, feed, group, enabled)

Disable a specific group within a feed to not sync

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
feed string
group string
enabled bool

Return type

[]FeedMetadata

Authorization

No authorization required

HTTP request headers

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

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