endpoints_v2.go | |
---|---|
Copyright 2020, 2021 Red Hat, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
|
ReportEndpointV2 https://issues.redhat.com/browse/CCXDEV-5097 |
|
ClusterInfoEndpoint provides information about given cluster retrieved from AMS API |
|
UpgradeRisksPredictionEndpoint returns the prediction about upgrading the given cluster. |
|
UpgradeRisksPredictionMultiClusterEndpoint returns the prediction about upgrading a set of clusters |
|
ClustersDetail https://issues.redhat.com/browse/CCXDEV-5088 |
|
RecommendationsListEndpoint lists all recommendations with a number of impacted clusters. |
|
ClustersRecommendationsEndpoint returns a list of all clusters, number of impacting rules and number of rules by total risk |
|
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 |
|
ContentV2 returns all the static content available for the user |
|
Endpoints to manipulate with simplified rule results stored independently under "tracker_id" identifier in Redis |
|
ListAllRequestIDs should return list of all request IDs detected for given cluster. In reality the list is refreshing as old request IDs are forgotten after 24 hours |
|
StatusOfRequestID should return status of processing one given request ID |
|
RuleHitsForRequestID should return simplified results for given cluster and requestID |
|
Endpoints to acknowledge rule and to manipulate with acknowledgements. |
|
AckListEndpoint list acks from this account where the rule is active. Will return an empty list if this account has no acks. |
|
AckGetEndpoint read the acknowledgement info about disabled rule. Acks are created, deleted, and queried by Insights rule ID, not by their own ack ID. |
|
AckAcknowledgePostEndpoint acknowledges (and therefore hides) a rule from view in an account. If there's already an acknowledgement of this rule by this account, then return that. Otherwise, a new ack is created. |
|
AckUpdateEndpoint updates an acknowledgement for a rule, by rule ID. A new justification can be supplied. The username is taken from the authenticated request. The updated ack is returned. |
|
AckDeleteEndpoint deletes an acknowledgement for a rule, by its rule ID. If the ack existed, it is deleted and a 204 is returned. Otherwise, a 404 is returned. |
|
Rating endpoint will get/modify the vote for a rule id by the user |
|
DVONamespaceForClusterEndpoint Returns the list of all namespaces (i.e. array of objects) to which this particular account has access filtered by {cluster_name}. Each object contains the namespace ID, the namespace display name if available, the cluster ID under which this namespace is created (repeated input), and the number of affecting recommendations for this namespace as well. BDD scenarios for this endpoint: https://github.com/RedHatInsights/insights-behavioral-spec/blob/main/features/DVORecommendations/SmartProxyRESTAPI.feature |
|
DVONamespaceListEndpoint returns a list of all DVO namespaces to which an account has access. Each entry contains the namespace ID, the namespace display name (if available), the cluster ID under which this namespace was created, and the number of recommendations affecting this namespace. BDD scenarios for this endpoint: https://github.com/RedHatInsights/insights-behavioral-spec/blob/main/features/DVORecommendations/SmartProxyRESTAPI.feature |
|
addV2EndpointsToRouter adds API V2 specific endpoints to the router |
|
Common REST API endpoints |
|
Reports endpoints |
|
Content related endpoints |
|
Rules related endpoints |
|
Endpoints requiring Redis to work |
|
Endpoints related to DVO workload recommendations |
|
Prometheus metrics |
|
OpenAPI specs |
|
addV2RedisEndpointsToRouter method registers handlers for endpoints that depend on our Redis storage to provide responses. |
|
addV2DVOEndpointsToRouter method registers handlers for endpoints related to DVO workloads |
|
addV2ReportsEndpointsToRouter method registers handlers for endpoints that return cluster report or reports to client |
|
addV2RuleEndpointsToRouter method registers handlers for endpoints that handle rule-related operations (voting etc.) |
|
Acknowledgement-related endpoints. Please look into ackshandlers.go and acksutils.go for more information about these endpoints prepared to be compatible with RHEL Insights Advisor. |
|
Clusters for given recommendation endpoint |
|
addV2ContentEndpointsToRouter method registers handlers for endpoints that returns content to clients |
|