# Functions
New function constructs new implementation of Server interface.
ValidateRequestID checks that the request ID has proper format.
# Constants
AckAcknowledgePostEndpoint acknowledges (and therefore hides) a rule from view in an account.
AckDeleteEndpoint deletes an acknowledgement for a rule, by its rule ID.
AckGetEndpoint read the acknowledgement info about disabled rule.
AckListEndpoint list acks from this account where the rule is active.
AckUpdateEndpoint updates an acknowledgement for a rule, by rule ID.
ClusterInfoEndpoint provides information about given cluster retrieved from AMS API.
ClustersDetail https://issues.redhat.com/browse/CCXDEV-5088.
ClustersForOrganizationEndpoint returns all clusters for {organization}.
ClustersRecommendationsEndpoint returns a list of all clusters, number of impacting rules and number of rules by total risk.
Content returns all the static content available for the user.
ContentV2 returns all the static content available for the user.
DbgDeleteClustersEndpoint deletes all {clusters}(comma separated array).
DbgDeleteOrganizationsEndpoint deletes all {organizations}(comma separated array).
DbgGetVoteOnRuleEndpoint is an endpoint to get vote on rule.
DbgOrganizationsEndpoint returns all organizations.
DeleteClustersEndpoint deletes all {clusters}(comma separated array).
DeleteOrganizationsEndpoint deletes all {organizations}(comma separated array).
DisableRuleFeedbackEndpoint accepts a feedback from user when (s)he disables a rule.
DisableRuleForClusterEndpoint disables a rule for specified cluster.
DislikeRuleEndpoint dislikes rule with {rule_id} for {cluster} using current user(from auth header).
EnableRuleForClusterEndpoint re-enables a rule for specified cluster.
ExcludingImpacting flag to return all recommendations excluding impacting ones on GET /rule/.
GetDisabledParam parameter.
GetVoteOnRuleEndpoint is an endpoint to get vote on rule.
ImpactingParam parameter used to show/hide recommendations not hitting any clusters.
IncludingImpacting flag to return all recommendations including impacting ones on GET /rule/.
InfoEndpoint returns basic information about content service version, utils repository version, commit hash etc.
JSONContentType represents the application/json content type.
JWTAuthTokenHeader reprsents the name of the header used in JWT authorization type #nosec G101.
LikeRuleEndpoint likes rule with {rule_id} for {cluster} using current user(from auth header).
ListAllRequestIDs should return list of all request IDs detected for given cluster.
MainEndpoint returns status ok.
MetricsEndpoint returns prometheus metrics.
OkMsg is in status field with HTTP 200 response.
OldReportEndpoint is made for backwards compatibility// TODO: remove when UI fixes are merged.
OnlyImpacting flag to only return impacting recommendations on GET /rule/.
OrganizationsEndpoint returns all organizations.
OSDEligibleParam parameter.
OverviewEndpoint returns some overview data for the clusters belonging to the org id.
Rating endpoint will get/modify the vote for a rule id by the user.
RecommendationsListEndpoint lists all recommendations with a number of impacted clusters.
RedisNotInitializedErrorMessage is an error message written into log when Redis client is not initialized properly.
ReportEndpoint returns report for provided {cluster}.
ReportEndpointV2 https://issues.redhat.com/browse/CCXDEV-5097.
ReportForListOfClustersEndpoint returns rule returns reports for provided list of clusters Reports that are going to be returned are specified by list of cluster IDs that is part of path.
ReportForListOfClustersPayloadEndpoint returns the latest reports for the given list of clusters Reports that are going to be returned are specified by list of cluster IDs that is part of request body.
ReportMetainfoEndpoint returns (meta)information about report for provided {cluster}.
RequestIDNotFound is returned when the requested request ID was not found in the list of request IDs for given cluster.
RequestIDParam parameter name in the URL for request IDs.
RequestsForClusterNotFound is a message returned when no request IDs were found for a given clusterID.
ResetVoteOnRuleEndpoint resets vote on rule with {rule_id} for {cluster} using current user(from auth header).
RuleContent returns static content for {rule_id}.
RuleContentV2 https://issues.redhat.com/browse/CCXDEV-5094 additionally group info is added too https://github.com/RedHatInsights/insights-results-smart-proxy/pull/604.
RuleContentWithUserData returns same as RuleContentV2, but includes user-specific data.
RuleGroupsEndpoint is a simple redirect endpoint to the insights-content-service API specified in configuration.
RuleHitsForRequestID should return simplified results for given cluster and requestID.
RuleIDParamName parameter name in the URL.
RuleIDs returns a list of rule IDs.
SingleRuleEndpoint returns single rule with static content for {cluster} and {rule_id}.
StatusOfRequestID should return status of processing one given request ID.
StatusProcessed is a message returned for already processed reports stored in Redis.
UpgradeRisksPredictionEndpoint returns the prediction about upgrading the given cluster.
UpgradeRisksPredictionServiceEndpoint endpoint for the upgrade prediction service.
XRHAuthTokenHeader reprsents the name of the header used in XRH authorization type #nosec G101.
# Structs
AggregatorServiceUnavailableError error is used when the aggregator service cannot be reached.
AMSAPIUnavailableError error is used when AMS API is not available and is the only source of data.
AuthenticationError happens during auth problems, for example malformed token.
BadBodyContent error meaning that client didn't provide a meaningful body content when it's required.
Configuration represents configuration of REST API HTTP server.
ContentServiceUnavailableError error is used when the content service cannot be reached.
HTTPServer is an implementation of Server interface.
NoBodyError error meaning that client didn't provide body when it's required.
ParamsParsingError error meaning that the cluster name cannot be handled.
ProxyOptions alters behaviour of proxy server for each endpoint.
RouterMissingParamError missing parameter in request.
RouterParsingError parsing error, for example string when we expected integer.
UpgradesDataEngServiceUnavailableError error is used when the ccx-upgrades-data-eng service cannot be reached.
# Type aliases
RequestModifier is a type of function which modifies request when proxying.
ResponseModifier is a type of function which modifies response when proxying.