From 7923b7ccf61c3ccf6662e30dbf67513f7c0329d6 Mon Sep 17 00:00:00 2001 From: NachoBot Date: Mon, 13 May 2024 09:41:45 -0400 Subject: [PATCH] Syncing API (#336) Co-authored-by: GitHub --- .../insights-advisor/content.json | 4 +- .../apis/hcc-insights/tasks/content.json | 7868 ++++++++++++++--- 2 files changed, 6715 insertions(+), 1157 deletions(-) diff --git a/packages/common/config/apis/hcc-insights/insights-advisor/content.json b/packages/common/config/apis/hcc-insights/insights-advisor/content.json index ea27c1c9..521c8f0a 100644 --- a/packages/common/config/apis/hcc-insights/insights-advisor/content.json +++ b/packages/common/config/apis/hcc-insights/insights-advisor/content.json @@ -2238,8 +2238,8 @@ } }, "info": { - "description": "The API of the Advisor project in Insights", - "title": "Insights Advisor API", + "description": "The API for managing and issuing Red Hat generated tasks on your infrastructure", + "title": "Insights Tasks API", "version": "1.0.0" }, "openapi": "3.0.3", diff --git a/packages/common/config/apis/hcc-insights/tasks/content.json b/packages/common/config/apis/hcc-insights/tasks/content.json index eae4711b..82c6a5f0 100644 --- a/packages/common/config/apis/hcc-insights/tasks/content.json +++ b/packages/common/config/apis/hcc-insights/tasks/content.json @@ -3,460 +3,472 @@ "openapi": { "components": { "schemas": { - "ExecuteTask": { - "description": "Execute a task on a given set of hosts.\n\nCreates an ExecutedTask object and one or more Job objects, one for each\nrecognised host.", + "Ack": { "properties": { - "hosts": { - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "created_at": { + "format": "date-time", + "readOnly": true, + "type": "string" }, - "name": { + "created_by": { + "description": "The user who created the ack", + "maxLength": 255, "type": "string" }, - "parameters": { - "items": { - "$ref": "#/components/schemas/ExecutedTaskParameter" - }, - "type": "array" + "justification": { + "description": "The reason the rule was acked", + "maxLength": 140, + "type": "string" }, - "task": { - "pattern": "^[-a-zA-Z0-9_]+$", + "rule": { + "type": "string" + }, + "updated_at": { + "format": "date-time", + "readOnly": true, "type": "string" } }, "required": [ - "hosts", - "task" + "created_at", + "rule", + "updated_at" ], "type": "object" }, - "ExecutedTask": { + "AckCount": { + "description": "A rule_id and the number of acks on it", "properties": { - "alerts_count": { - "type": "integer" - }, - "completed_jobs_count": { + "ack_count": { "type": "integer" }, - "end_time": { - "format": "date-time", - "nullable": true, + "rule_id": { "type": "string" - }, - "failure_jobs_count": { - "type": "integer" - }, - "id": { - "readOnly": true, - "type": "integer" - }, - "initiated_by": { - "description": "username", - "maxLength": 80, + } + }, + "required": [ + "ack_count", + "rule_id" + ], + "type": "object" + }, + "AckInput": { + "properties": { + "justification": { + "default": "", + "maxLength": 140, "type": "string" }, - "name": { - "maxLength": 200, + "rule_id": { + "maxLength": 240, "type": "string" - }, - "running_jobs_count": { - "type": "integer" - }, - "start_time": { - "format": "date-time", + } + }, + "required": [ + "rule_id" + ], + "type": "object" + }, + "AckJustification": { + "properties": { + "justification": { + "description": "The reason the rule was acked", + "maxLength": 140, "type": "string" - }, - "status": { + } + }, + "type": "object" + }, + "AllAck": { + "properties": { + "account": { "type": "string" }, - "systems_count": { - "type": "integer" - }, - "task_description": { + "created_at": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "task_filter_message": { + "created_by": { + "description": "The user who created the ack", + "maxLength": 255, "type": "string" }, - "task_slug": { - "pattern": "^[-a-zA-Z0-9_]+$", + "justification": { + "description": "The reason the rule was acked", + "maxLength": 140, "type": "string" }, - "task_title": { + "org_id": { "type": "string" }, - "task_url": { - "format": "uri", - "readOnly": true, + "rule": { + "title": "rule_id", "type": "string" }, - "this_url": { - "format": "uri", + "updated_at": { + "format": "date-time", "readOnly": true, "type": "string" - }, - "timeout_jobs_count": { - "type": "integer" } }, "required": [ - "alerts_count", - "completed_jobs_count", - "failure_jobs_count", - "id", - "initiated_by", - "name", - "running_jobs_count", - "start_time", - "status", - "systems_count", - "task_description", - "task_filter_message", - "task_slug", - "task_title", - "task_url", - "this_url", - "timeout_jobs_count" + "account", + "created_at", + "org_id", + "rule", + "updated_at" ], "type": "object" }, - "ExecutedTaskOne": { + "AllRuleRatings": { + "description": "This is only available to internal users and lists ratings from all users.", "properties": { - "end_time": { - "format": "date-time", + "account": { + "maxLength": 10, "nullable": true, "type": "string" }, - "id": { - "readOnly": true, - "type": "integer" - }, - "initiated_by": { - "description": "username", - "maxLength": 80, - "type": "string" - }, - "jobs": { - "items": { - "$ref": "#/components/schemas/JobTask" - }, - "type": "array" - }, - "name": { - "maxLength": 200, - "type": "string" - }, - "parameters": { - "items": { - "$ref": "#/components/schemas/ExecutedTaskParameter" - }, - "type": "array" - }, - "start_time": { + "created_at": { "format": "date-time", + "readOnly": true, "type": "string" }, - "status": { - "type": "string" - }, - "systems_count": { - "type": "integer" - }, - "task_description": { + "org_id": { + "maxLength": 50, "type": "string" }, - "task_filter_message": { + "rated_by": { + "default": "", + "description": "The username that rated this rule", + "maxLength": 32, "type": "string" }, - "task_slug": { - "pattern": "^[-a-zA-Z0-9_]+$", - "type": "string" + "rating": { + "allOf": [ + { + "$ref": "#/components/schemas/RatingEnum" + } + ], + "maximum": 32767, + "minimum": -32768 }, - "task_title": { + "rule": { + "description": "Rule ID from Insights", "type": "string" }, - "task_url": { - "format": "uri", + "updated_at": { + "format": "date-time", "readOnly": true, "type": "string" } }, "required": [ - "id", - "initiated_by", - "jobs", - "name", - "parameters", - "start_time", - "status", - "systems_count", - "task_description", - "task_filter_message", - "task_slug", - "task_title", - "task_url" + "created_at", + "org_id", + "rating", + "rule", + "updated_at" ], "type": "object" }, - "ExecutedTaskParameter": { + "AutoSubscribe": { + "description": "Serializer specifically for listing\nall Pathways currently in the system", "properties": { - "default": { - "readOnly": true, - "type": "string" - }, - "description": { - "readOnly": true, - "type": "string" - }, - "id": { - "readOnly": true, - "type": "integer" + "is_auto_subscribed": { + "type": "boolean" }, - "key": { + "org_id": { "type": "string" - }, - "required": { - "readOnly": true, + } + }, + "required": [ + "is_auto_subscribed", + "org_id" + ], + "type": "object" + }, + "AutoSubscribeInput": { + "description": "Serializer specifically for handling\nCREATE and UPDATE views for AutoSubscribe", + "properties": { + "is_auto_subscribed": { "type": "boolean" }, - "value": { + "org_id": { "type": "string" } }, "required": [ - "default", - "description", - "id", - "key", - "required", - "value" + "is_auto_subscribed", + "org_id" ], "type": "object" }, - "Host": { + "ExportHits": { + "description": "The basic report information for each system affected by a rule. Only\nlists basic details of the host and rule, and links to more information.", "properties": { - "connection_type": { + "hostname": { "type": "string" }, - "culled_timestamp": { + "last_seen": { "format": "date-time", "type": "string" }, - "display_name": { - "maxLength": 200, + "likelihood": { + "type": "integer" + }, + "publish_date": { + "format": "date-time", "type": "string" }, - "groups": {}, - "id": { - "format": "uuid", + "results_url": { + "format": "uri", "type": "string" }, - "os_version": { + "rhel_version": { "type": "string" }, - "stale_timestamp": { - "format": "date-time", + "solution_url": { + "format": "uri", "type": "string" }, - "stale_warning_timestamp": { + "stale_at": { "format": "date-time", "type": "string" }, - "tags": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" + "title": { + "type": "string" }, - "updated": { - "format": "date-time", + "total_risk": { + "type": "integer" + }, + "uuid": { + "format": "uuid", "type": "string" } }, "required": [ - "connection_type", - "culled_timestamp", - "display_name", - "groups", - "id", - "os_version", - "stale_timestamp", - "stale_warning_timestamp", - "tags", - "updated" + "hostname", + "last_seen", + "likelihood", + "publish_date", + "results_url", + "rhel_version", + "solution_url", + "stale_at", + "title", + "total_risk", + "uuid" ], "type": "object" }, - "Job": { + "HostAck": { + "description": "Ignore reports of this rule on this system for this account.", "properties": { - "connection_type": { + "created_at": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "display_name": { + "created_by": { + "description": "The username that created this acknowledgement", + "readOnly": true, "type": "string" }, - "executed_task": { - "type": "integer" - }, - "executed_task_link": { - "format": "uri", + "display_name": { "readOnly": true, "type": "string" }, - "has_stdout": { - "type": "boolean" - }, "id": { "readOnly": true, "type": "integer" }, - "log_link": { - "format": "uri", - "readOnly": true, - "type": "string" - }, - "results": {}, - "rhc_client_id": { - "format": "uuid", - "nullable": true, - "type": "string" - }, - "run_id": { - "format": "uuid", - "type": "string" - }, - "status": { + "justification": { + "maxLength": 140, "type": "string" }, - "stdout_link": { - "format": "uri", - "readOnly": true, + "rule": { + "description": "Rule ID from Insights", "type": "string" }, - "system": { + "system_uuid": { "format": "uuid", "type": "string" }, - "updated_on": { + "updated_at": { "format": "date-time", + "readOnly": true, "type": "string" } }, "required": [ - "connection_type", + "created_at", + "created_by", "display_name", - "executed_task", - "executed_task_link", - "has_stdout", "id", - "log_link", - "results", - "run_id", - "status", - "stdout_link", - "system", - "updated_on" + "rule", + "system_uuid", + "updated_at" ], "type": "object" }, - "JobLog": { - "description": "A line of information relating to the progress of a job.", + "HostAckInput": { + "description": "Ignore reports of this rule on this system for this account.\n\nUse this when creating a new HostAck.", "properties": { - "created_at": { - "format": "date-time", - "readOnly": true, + "justification": { + "maxLength": 140, "type": "string" }, - "is_ok": { - "type": "boolean" - }, - "line": { - "maxLength": 255, + "rule": { + "description": "Rule ID from Insights", "type": "string" }, - "run_id": { + "system_uuid": { "format": "uuid", "type": "string" } }, "required": [ - "created_at", - "line", - "run_id" + "rule", + "system_uuid" ], "type": "object" }, - "JobTask": { - "description": "The jobs for a particular executed task", + "HostAckJustification": { + "description": "Just modify the justification on a Host Ack.", "properties": { - "display_name": { - "type": "string" - }, - "has_stdout": { - "type": "boolean" - }, "id": { "readOnly": true, "type": "integer" }, - "log_link": { - "format": "uri", - "readOnly": true, + "justification": { + "maxLength": 140, "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "JustificationCount": { + "properties": { + "count": { + "type": "integer" }, - "results": {}, - "run_id": { - "format": "uuid", + "justification": { "type": "string" - }, - "status": { + } + }, + "required": [ + "count", + "justification" + ], + "type": "object" + }, + "Kcs": { + "description": "Pairings of C.R.C rule URL and its KCS solution number (node_id)", + "properties": { + "node_id": { + "description": "KCS solution number", "type": "string" }, - "stdout_link": { + "rule_url": { + "description": "Rule URL on C.R.C.", "format": "uri", - "readOnly": true, "type": "string" + } + }, + "required": [ + "node_id", + "rule_url" + ], + "type": "object" + }, + "MultiAckResponse": { + "description": "The response from adding or deleting multiple acks on a rule. For backward\ncompatibility we include the count, and then list the impacted systems.", + "properties": { + "count": { + "type": "integer" }, - "system_id": { - "format": "uuid", + "host_ids": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "count", + "host_ids" + ], + "type": "object" + }, + "MultiHostAck": { + "description": "Add acks to multiple hosts for a single rule.", + "properties": { + "justification": { + "maxLength": 140, "type": "string" }, - "updated_on": { - "format": "date-time", - "type": "string" + "systems": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" } }, "required": [ - "display_name", - "has_stdout", - "id", - "log_link", - "results", - "run_id", - "status", - "stdout_link", - "system_id", - "updated_on" + "justification", + "systems" ], "type": "object" }, - "PaginatedExecutedTaskList": { + "MultiHostUnAck": { + "description": "Delete acks from multiple hosts for a single rule.", "properties": { - "data": { + "systems": { "items": { - "$ref": "#/components/schemas/ExecutedTask" + "format": "uuid", + "type": "string" }, "type": "array" - }, - "links": { - "properties": { - "first": { - "format": "uri", - "nullable": true, + } + }, + "required": [ + "systems" + ], + "type": "object" + }, + "OrgId": { + "description": "A specific org id for a Red Hat customer.", + "properties": { + "org_id": { + "maxLength": 10, + "minLength": 6, + "type": "string" + } + }, + "required": [ + "org_id" + ], + "type": "object" + }, + "PaginatedAckList": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/Ack" + }, + "type": "array" + }, + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, "type": "string" }, "last": { @@ -492,11 +504,11 @@ }, "type": "object" }, - "PaginatedHostList": { + "PaginatedAllRuleRatingsList": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/Host" + "$ref": "#/components/schemas/AllRuleRatings" }, "type": "array" }, @@ -540,11 +552,11 @@ }, "type": "object" }, - "PaginatedJobList": { + "PaginatedHostAckList": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/HostAck" }, "type": "array" }, @@ -588,11 +600,11 @@ }, "type": "object" }, - "PaginatedJobLogList": { + "PaginatedJustificationCountList": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/JobLog" + "$ref": "#/components/schemas/JustificationCount" }, "type": "array" }, @@ -636,11 +648,11 @@ }, "type": "object" }, - "PaginatedTaskHostList": { + "PaginatedOrgIdList": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/TaskHost" + "$ref": "#/components/schemas/OrgId" }, "type": "array" }, @@ -684,11 +696,11 @@ }, "type": "object" }, - "PaginatedTaskList": { + "PaginatedPathwayList": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/Task" + "$ref": "#/components/schemas/Pathway" }, "type": "array" }, @@ -732,162 +744,5729 @@ }, "type": "object" }, - "Task": { + "PaginatedRuleForAccountList": { "properties": { - "description": { - "type": "string" - }, - "filter_message": { - "maxLength": 200, - "nullable": true, - "type": "string" - }, - "parameters": { + "data": { "items": { - "$ref": "#/components/schemas/TaskParameter" + "$ref": "#/components/schemas/RuleForAccount" }, "type": "array" }, - "publish_date": { - "format": "date-time", - "type": "string" - }, - "slug": { - "maxLength": 50, - "pattern": "^[-a-zA-Z0-9_]+$", - "type": "string" - }, - "systems_url": { - "format": "uri", - "readOnly": true, - "type": "string" - }, - "title": { - "maxLength": 200, - "type": "string" + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" }, - "type": { - "type": "string" + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" } }, - "required": [ - "description", - "parameters", - "publish_date", - "slug", - "systems_url", - "title", - "type" - ], "type": "object" }, - "TaskHost": { + "PaginatedRuleRatingList": { "properties": { - "connection_type": { - "type": "string" - }, - "culled_timestamp": { - "format": "date-time", - "type": "string" - }, - "display_name": { - "maxLength": 200, - "type": "string" - }, - "groups": {}, - "id": { - "format": "uuid", - "type": "string" - }, - "os_version": { - "type": "string" - }, - "requirements": { + "data": { "items": { - "type": "string" + "$ref": "#/components/schemas/RuleRating" }, "type": "array" }, - "stale_timestamp": { - "format": "date-time", - "type": "string" - }, - "stale_warning_timestamp": { - "format": "date-time", - "type": "string" + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" }, - "tags": { + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "type": "object" + }, + "PaginatedRuleRatingStatsList": { + "properties": { + "data": { "items": { - "additionalProperties": {}, - "type": "object" + "$ref": "#/components/schemas/RuleRatingStats" }, "type": "array" }, - "updated": { - "format": "date-time", - "type": "string" + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" } }, - "required": [ - "connection_type", - "culled_timestamp", - "display_name", - "groups", - "id", - "os_version", - "requirements", - "stale_timestamp", - "stale_warning_timestamp", - "tags", - "updated" - ], "type": "object" }, - "TaskParameter": { + "PaginatedSubscriptionExcludedAccountList": { "properties": { - "default": { - "maxLength": 250, - "nullable": true, - "type": "string" - }, - "description": { - "type": "string" + "data": { + "items": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + }, + "type": "array" }, - "key": { - "maxLength": 40, - "type": "string" + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" }, - "required": { - "type": "boolean" + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" } }, - "required": [ - "description", - "key" - ], "type": "object" - } - }, - "securitySchemes": { - "Authorization": { - "in": "header", - "name": "Authorization", - "type": "apiKey" - } - } + }, + "PaginatedSystemList": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/System" + }, + "type": "array" + }, + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "type": "object" + }, + "PaginatedSystemsDetailList": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/SystemsDetail" + }, + "type": "array" + }, + "links": { + "properties": { + "first": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "last": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "next": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "previous": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "count": { + "example": 169, + "type": "integer" + } + }, + "required": [ + "count" + ], + "type": "object" + } + }, + "type": "object" + }, + "PatchedTopicEdit": { + "description": "Create or edit topics.", + "properties": { + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featured": { + "type": "boolean" + }, + "name": { + "maxLength": 80, + "type": "string" + }, + "slug": { + "description": "Rule topic slug", + "maxLength": 20, + "pattern": "^[-a-zA-Z0-9_]+$", + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object" + }, + "Pathway": { + "description": "Serializer specifically for listing\nall Pathways currently in the system", + "properties": { + "categories": { + "items": { + "$ref": "#/components/schemas/RuleCategory" + }, + "readOnly": true, + "type": "array" + }, + "component": { + "type": "string" + }, + "critical_risk_count": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "has_incident": { + "type": "boolean" + }, + "has_playbook": { + "type": "boolean" + }, + "high_risk_count": { + "type": "integer" + }, + "impacted_systems_count": { + "type": "integer" + }, + "incident_count": { + "type": "integer" + }, + "low_risk_count": { + "type": "integer" + }, + "medium_risk_count": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "publish_date": { + "format": "date-time", + "type": "string" + }, + "reboot_required": { + "type": "boolean" + }, + "recommendation_level": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "resolution_risk": { + "$ref": "#/components/schemas/ResolutionRisk" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "categories", + "component", + "critical_risk_count", + "description", + "has_incident", + "has_playbook", + "high_risk_count", + "impacted_systems_count", + "incident_count", + "low_risk_count", + "medium_risk_count", + "name", + "publish_date", + "reboot_required", + "recommendation_level", + "resolution_risk", + "slug" + ], + "type": "object" + }, + "PathwayInput": { + "description": "Serializer specifically for handling\nCREATE and UPDATE views for Pathways", + "properties": { + "component": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "publish_date": { + "format": "date-time", + "type": "string" + }, + "resolution_risk": { + "type": "string" + } + }, + "required": [ + "component", + "description", + "name", + "publish_date", + "resolution_risk" + ], + "type": "object" + }, + "PreferencesInput": { + "description": "User preferences - separated from account settings.", + "properties": { + "is_subscribed": { + "type": "boolean" + } + }, + "required": [ + "is_subscribed" + ], + "type": "object" + }, + "RatingEnum": { + "description": "* `-1` - Dislike\n* `0` - Neutral\n* `1` - Like", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "RenderedReport": { + "description": "The actual rule fields with the report data for a particular system\nrendered into them, in a flat structure that's easier to use.", + "properties": { + "description": { + "maxLength": 240, + "type": "string" + }, + "generic": { + "type": "string" + }, + "more_info": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "summary": { + "type": "string" + } + }, + "required": [ + "description", + "generic", + "reason", + "resolution", + "summary" + ], + "type": "object" + }, + "Report": { + "properties": { + "details": {}, + "impacted_date": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "resolution": { + "allOf": [ + { + "$ref": "#/components/schemas/Resolution" + } + ], + "readOnly": true + }, + "rule": { + "allOf": [ + { + "$ref": "#/components/schemas/Rule" + } + ], + "readOnly": true + } + }, + "required": [ + "details", + "impacted_date", + "resolution", + "rule" + ], + "type": "object" + }, + "ReportExport": { + "description": "Report information for export. Based on CurrentReport with fields from\nRule and Host pulled through for convenience.", + "properties": { + "details": {}, + "host_id": { + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "impacted_date": { + "format": "date-time", + "nullable": true, + "readOnly": true, + "type": "string" + }, + "report_time": { + "format": "date-time", + "type": "string" + }, + "reports_url": { + "type": "string" + }, + "rule_id": { + "type": "string" + } + }, + "required": [ + "details", + "host_id", + "impacted_date", + "report_time", + "reports_url", + "rule_id" + ], + "type": "object" + }, + "Resolution": { + "properties": { + "has_playbook": { + "readOnly": true, + "type": "boolean" + }, + "resolution": { + "type": "string" + }, + "resolution_risk": { + "allOf": [ + { + "$ref": "#/components/schemas/ResolutionRisk" + } + ], + "readOnly": true + }, + "system_type": { + "type": "integer" + } + }, + "required": [ + "has_playbook", + "resolution", + "resolution_risk", + "system_type" + ], + "type": "object" + }, + "ResolutionRisk": { + "properties": { + "name": { + "maxLength": 80, + "type": "string" + }, + "risk": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "Rule": { + "description": "The standard rule information. Used for models and relations that don't\nknow the account and therefore can't know the acks or impacted systems.", + "properties": { + "active": { + "type": "boolean" + }, + "category": { + "$ref": "#/components/schemas/RuleCategory" + }, + "created_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "deleted_at": { + "format": "date-time", + "type": "string" + }, + "description": { + "maxLength": 240, + "type": "string" + }, + "generic": { + "type": "string" + }, + "impact": { + "$ref": "#/components/schemas/RuleImpact" + }, + "likelihood": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "more_info": { + "type": "string" + }, + "node_id": { + "description": "KCS solution number", + "maxLength": 10, + "type": "string" + }, + "publish_date": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "reason": { + "type": "string" + }, + "reboot_required": { + "type": "boolean" + }, + "resolution_set": { + "items": { + "$ref": "#/components/schemas/Resolution" + }, + "type": "array" + }, + "rule_id": { + "description": "Rule ID from Insights", + "maxLength": 240, + "type": "string" + }, + "summary": { + "type": "string" + }, + "tags": { + "readOnly": true, + "type": "string" + }, + "total_risk": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "updated_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "category", + "created_at", + "description", + "generic", + "impact", + "reason", + "resolution_set", + "rule_id", + "summary", + "tags", + "updated_at" + ], + "type": "object" + }, + "RuleCategory": { + "properties": { + "id": { + "readOnly": true, + "type": "integer" + }, + "name": { + "maxLength": 20, + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object" + }, + "RuleExport": { + "description": "Rule information for export.", + "properties": { + "active": { + "type": "boolean" + }, + "category": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "deleted_at": { + "format": "date-time", + "nullable": true, + "readOnly": true, + "type": "string" + }, + "description": { + "maxLength": 240, + "type": "string" + }, + "generic": { + "type": "string" + }, + "hosts_acked_count": { + "type": "integer" + }, + "impact": { + "type": "string" + }, + "impacted_systems_count": { + "type": "integer" + }, + "likelihood": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "more_info": { + "type": "string" + }, + "node_id": { + "description": "KCS solution number", + "maxLength": 10, + "type": "string" + }, + "playbook_count": { + "type": "integer" + }, + "publish_date": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "rating": { + "readOnly": true, + "type": "integer" + }, + "reason": { + "type": "string" + }, + "reboot_required": { + "type": "boolean" + }, + "reports_shown": { + "readOnly": true, + "type": "boolean" + }, + "resolution_set": { + "items": { + "$ref": "#/components/schemas/Resolution" + }, + "type": "array" + }, + "rule_id": { + "description": "Rule ID from Insights", + "maxLength": 240, + "type": "string" + }, + "rule_status": { + "readOnly": true, + "type": "string" + }, + "summary": { + "type": "string" + }, + "tags": { + "readOnly": true, + "type": "string" + }, + "total_risk": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "updated_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "category", + "created_at", + "deleted_at", + "description", + "generic", + "hosts_acked_count", + "impact", + "impacted_systems_count", + "playbook_count", + "rating", + "reason", + "reports_shown", + "resolution_set", + "rule_id", + "rule_status", + "summary", + "tags", + "updated_at" + ], + "type": "object" + }, + "RuleForAccount": { + "description": "Rule information when we know the account, and therefore can calculate\nthe number of impacted systems and the reports_shown/rule_status flags.\nWe have to declare those explicitly here because they're not part of the model.", + "properties": { + "active": { + "type": "boolean" + }, + "category": { + "$ref": "#/components/schemas/RuleCategory" + }, + "created_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "deleted_at": { + "format": "date-time", + "type": "string" + }, + "description": { + "maxLength": 240, + "type": "string" + }, + "generic": { + "type": "string" + }, + "hosts_acked_count": { + "readOnly": true, + "type": "integer" + }, + "impact": { + "$ref": "#/components/schemas/RuleImpact" + }, + "impacted_systems_count": { + "readOnly": true, + "type": "integer" + }, + "likelihood": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "more_info": { + "type": "string" + }, + "node_id": { + "description": "KCS solution number", + "maxLength": 10, + "type": "string" + }, + "pathway": { + "$ref": "#/components/schemas/RulePathway" + }, + "playbook_count": { + "readOnly": true, + "type": "integer" + }, + "publish_date": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "rating": { + "readOnly": true, + "type": "integer" + }, + "reason": { + "type": "string" + }, + "reboot_required": { + "type": "boolean" + }, + "reports_shown": { + "readOnly": true, + "type": "boolean" + }, + "resolution_set": { + "items": { + "$ref": "#/components/schemas/Resolution" + }, + "type": "array" + }, + "rule_id": { + "description": "Rule ID from Insights", + "maxLength": 240, + "type": "string" + }, + "rule_status": { + "readOnly": true, + "type": "string" + }, + "summary": { + "type": "string" + }, + "tags": { + "readOnly": true, + "type": "string" + }, + "total_risk": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "updated_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + } + }, + "required": [ + "category", + "created_at", + "description", + "generic", + "hosts_acked_count", + "impact", + "impacted_systems_count", + "playbook_count", + "rating", + "reason", + "reports_shown", + "resolution_set", + "rule_id", + "rule_status", + "summary", + "tags", + "updated_at" + ], + "type": "object" + }, + "RuleImpact": { + "properties": { + "impact": { + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "name": { + "maxLength": 80, + "type": "string" + } + }, + "type": "object" + }, + "RulePathway": { + "properties": { + "component": { + "maxLength": 80, + "type": "string" + }, + "name": { + "maxLength": 240, + "type": "string" + }, + "resolution_risk": { + "allOf": [ + { + "$ref": "#/components/schemas/ResolutionRisk" + } + ], + "readOnly": true + } + }, + "required": [ + "component", + "name", + "resolution_risk" + ], + "type": "object" + }, + "RuleRating": { + "description": "Rule ratings list the rating (-1, 0 or +1) for one or more rules. The\nrule is listed by its Insights Rule ID.", + "properties": { + "rating": { + "allOf": [ + { + "$ref": "#/components/schemas/RatingEnum" + } + ], + "maximum": 32767, + "minimum": -32768 + }, + "rule": { + "description": "Rule ID from Insights", + "type": "string" + } + }, + "required": [ + "rating", + "rule" + ], + "type": "object" + }, + "RuleRatingStats": { + "description": "Output of statistics view of rule ratings - rule ID and totals of ratings.", + "properties": { + "rule": { + "type": "string" + }, + "total_negative": { + "type": "integer" + }, + "total_positive": { + "type": "integer" + }, + "total_ratings": { + "type": "integer" + } + }, + "required": [ + "rule", + "total_negative", + "total_positive", + "total_ratings" + ], + "type": "object" + }, + "RuleSystemsExport": { + "description": "List of systems with current reports for each rule.", + "properties": { + "rules": { + "additionalProperties": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": "object" + } + }, + "required": [ + "rules" + ], + "type": "object" + }, + "RuleUsageStats": { + "description": "Rule usage statistics for rule developers.", + "properties": { + "accounts_acked": { + "type": "integer" + }, + "accounts_hit": { + "type": "integer" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "rule_id": { + "maxLength": 240, + "type": "string" + }, + "systems_hit": { + "type": "integer" + } + }, + "required": [ + "accounts_acked", + "accounts_hit", + "active", + "description", + "rule_id", + "systems_hit" + ], + "type": "object" + }, + "SettingDDF": { + "description": "Outputs the description of the settings in a Data-Driven Forms format.", + "properties": { + "component": { + "type": "string" + }, + "description": { + "type": "string" + }, + "helperText": { + "type": "string" + }, + "initialValue": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isRequired": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "component", + "initialValue", + "isDisabled", + "isRequired", + "name" + ], + "type": "object" + }, + "SettingsDDF": { + "description": "Combining the DDF fields into one 'fields' object.", + "properties": { + "fields": { + "items": { + "$ref": "#/components/schemas/SettingDDF" + }, + "type": "array" + } + }, + "required": [ + "fields" + ], + "type": "object" + }, + "Stats": { + "description": "Advisor rule or report frequency statisics.", + "properties": { + "category": { + "additionalProperties": { + "type": "integer" + }, + "type": "object" + }, + "total": { + "type": "integer" + }, + "total_risk": { + "additionalProperties": { + "type": "integer" + }, + "type": "object" + } + }, + "required": [ + "category", + "total", + "total_risk" + ], + "type": "object" + }, + "SubscriptionExcludedAccount": { + "properties": { + "account": { + "type": "string" + }, + "org_id": { + "type": "string" + } + }, + "required": [ + "org_id" + ], + "type": "object" + }, + "System": { + "properties": { + "all_pathway_hits": { + "readOnly": true, + "type": "integer" + }, + "critical_hits": { + "readOnly": true, + "type": "integer" + }, + "display_name": { + "maxLength": 200, + "type": "string" + }, + "group_name": { + "readOnly": true, + "type": "string" + }, + "hits": { + "readOnly": true, + "type": "integer" + }, + "important_hits": { + "readOnly": true, + "type": "integer" + }, + "incident_hits": { + "readOnly": true, + "type": "integer" + }, + "last_seen": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "low_hits": { + "readOnly": true, + "type": "integer" + }, + "moderate_hits": { + "readOnly": true, + "type": "integer" + }, + "pathway_filter_hits": { + "readOnly": true, + "type": "integer" + }, + "rhel_version": { + "type": "string" + }, + "stale_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "system_uuid": { + "format": "uuid", + "type": "string" + } + }, + "required": [ + "all_pathway_hits", + "critical_hits", + "display_name", + "group_name", + "hits", + "important_hits", + "incident_hits", + "last_seen", + "low_hits", + "moderate_hits", + "pathway_filter_hits", + "rhel_version", + "stale_at", + "system_uuid" + ], + "type": "object" + }, + "SystemType": { + "description": "RHN-based system types classified by role and product code.", + "properties": { + "id": { + "readOnly": true, + "type": "integer" + }, + "product_code": { + "maxLength": 10, + "type": "string" + }, + "role": { + "maxLength": 15, + "type": "string" + } + }, + "required": [ + "id", + "product_code", + "role" + ], + "type": "object" + }, + "SystemsDetail": { + "properties": { + "all_pathway_hits": { + "readOnly": true, + "type": "integer" + }, + "critical_hits": { + "readOnly": true, + "type": "integer" + }, + "display_name": { + "maxLength": 200, + "type": "string" + }, + "hits": { + "readOnly": true, + "type": "integer" + }, + "impacted_date": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "important_hits": { + "readOnly": true, + "type": "integer" + }, + "incident_hits": { + "readOnly": true, + "type": "integer" + }, + "last_seen": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "low_hits": { + "readOnly": true, + "type": "integer" + }, + "moderate_hits": { + "readOnly": true, + "type": "integer" + }, + "pathway_filter_hits": { + "readOnly": true, + "type": "integer" + }, + "rhel_version": { + "type": "string" + }, + "stale_at": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "system_uuid": { + "format": "uuid", + "type": "string" + } + }, + "required": [ + "all_pathway_hits", + "critical_hits", + "display_name", + "hits", + "impacted_date", + "important_hits", + "incident_hits", + "last_seen", + "low_hits", + "moderate_hits", + "pathway_filter_hits", + "rhel_version", + "stale_at", + "system_uuid" + ], + "type": "object" + }, + "SystemsForRule": { + "description": "The list of Inventory Host IDs that are (currently) affected by a given\nrule.", + "properties": { + "host_ids": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "host_ids" + ], + "type": "object" + }, + "Topic": { + "description": "Topics group rules by a tag shared by all the rules.", + "properties": { + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featured": { + "type": "boolean" + }, + "impacted_systems_count": { + "readOnly": true, + "type": "integer" + }, + "name": { + "maxLength": 80, + "type": "string" + }, + "slug": { + "description": "Rule topic slug", + "maxLength": 20, + "pattern": "^[-a-zA-Z0-9_]+$", + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": [ + "description", + "impacted_systems_count", + "name", + "slug", + "tag" + ], + "type": "object" + }, + "TopicEdit": { + "description": "Create or edit topics.", + "properties": { + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "featured": { + "type": "boolean" + }, + "name": { + "maxLength": 80, + "type": "string" + }, + "slug": { + "description": "Rule topic slug", + "maxLength": 20, + "pattern": "^[-a-zA-Z0-9_]+$", + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": [ + "description", + "name", + "slug", + "tag" + ], + "type": "object" + }, + "Usage": { + "description": "An approximation of the number of unique hits per day.", + "properties": { + "unique_hits": { + "type": "integer" + } + }, + "required": [ + "unique_hits" + ], + "type": "object" + }, + "WeeklyReportSubscription": { + "properties": { + "is_subscribed": { + "type": "boolean" + } + }, + "required": [ + "is_subscribed" + ], + "type": "object" + } + }, + "securitySchemes": { + "Authorization": { + "in": "header", + "name": "Authorization", + "type": "apiKey" + } + } }, "info": { - "description": "The API for managing and issuing Red Hat generated tasks on your infrastructure", - "title": "Insights Tasks API", + "description": "The API of the Advisor project in Insights", + "title": "Insights Advisor API", "version": "1.0.0" }, "openapi": "3.0.3", "paths": { - "/api/tasks/v1/executed_task": { + "/api/insights/v1/account/": { + "get": { + "description": "List all accounts by org_id we know about (through the host table).\n\nNo other information about the accounts is provided in this view.", + "operationId": "account_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedOrgIdList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "account" + ] + } + }, + "/api/insights/v1/account/{org_id}/": { + "get": { + "description": "List information relating to other accounts.\n\nThis allows us to collect data that requires the user to specify an\norg_id number, such as number of systems currently registered to that\norg.\n\nparam: org_id: Org ID number of a Red Hat customer.", + "operationId": "account_retrieve", + "parameters": [ + { + "in": "path", + "name": "org_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgId" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "account" + ] + } + }, + "/api/insights/v1/account/{org_id}/hosts/": { + "get": { + "description": "List details about the number of hosts in this account by org_id.\n\nAs well as the total number of hosts, we report on the number of hosts\nin various states of staleness:\n * fresh: hosts that have updated in the last 26 hours\n * stale: hosts not updated in the last 26 hours - we display the\n results for these hosts but a warning is shown to say they are\n not updating\n * warn: hosts not updated in the last week - these are not shown\n in any queries\n\nThis may have other aggregate data added in the future.", + "operationId": "account_hosts_retrieve", + "parameters": [ + { + "in": "path", + "name": "org_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgId" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "account" + ] + } + }, + "/api/insights/v1/ack/": { + "get": { + "description": "List acks from this account by org_id where the rule is active\n\nWill return an empty list if this account has no acks.", + "operationId": "ack_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedAckList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + }, + "post": { + "description": "Add an acknowledgement for a rule, by rule ID.\n\nIf there's already an acknowledgement of this rule by this\naccounts org_id, then return that. Otherwise, a new ack is created.", + "operationId": "ack_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/AckInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/AckInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ack" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + } + }, + "/api/insights/v1/ack/all/": { + "get": { + "description": "List acks from all accounts, with org_id.\n\nHas no pagination.", + "operationId": "ack_all_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AllAck" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + } + }, + "/api/insights/v1/ack/{rule_id}/": { + "delete": { + "description": "Delete an acknowledgement for a rule, by its rule ID.\n\nIf the ack existed, it is deleted and a 204 is returned. Otherwise,\na 404 is returned.", + "operationId": "ack_destroy", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + }, + "get": { + "description": "Acks acknowledge (and therefore hide) a rule from view in an account.\n\nThis view handles listing, retrieving, creating and deleting acks. Acks\nare created and deleted by Insights rule ID, not by their own ack ID.\n\nparam: rule_id: Rule ID defined by Insights ruleset", + "operationId": "ack_retrieve", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ack" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + }, + "put": { + "description": "Update an acknowledgement for a rule, by rule ID.\n\nA new justification can be supplied. The username is taken from the\nauthenticated request. The updated ack is returned.", + "operationId": "ack_update", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckJustification" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/AckJustification" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/AckJustification" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ack" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ack" + ] + } + }, + "/api/insights/v1/ackcount/": { + "get": { + "description": "Get the ack counts for all active rules\n\nReturn a list of rule_ids and their ack counts", + "operationId": "ackcount_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AckCount" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ackcount" + ] + } + }, + "/api/insights/v1/ackcount/{rule_id}/": { + "get": { + "description": "Get the ack count for the given rule_id\n\nReturns the rule_id and its ack count", + "operationId": "ackcount_retrieve", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AckCount" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "ackcount" + ] + } + }, + "/api/insights/v1/autosubexclusion/": { + "get": { + "description": "Returns all subscription exclusions for accounts\n\nThis returns a list of all subscription exclusions.\nThis contains exclusions and their account and org_id.\nThese are all accounts that are excluded from the autosub\nsubscription path for weekly report subscriptions.", + "operationId": "autosubexclusion_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedSubscriptionExcludedAccountList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "autosubexclusion" + ] + }, + "post": { + "description": "Create a new subscription exclusion for an account.\n\nThis creates a new subscription exclusion for an account.\nThis should contain an org_id and account. Only org_id is required.\nAccount is optional.", + "operationId": "autosubexclusion_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "autosubexclusion" + ] + } + }, + "/api/insights/v1/autosubexclusion/{org_id}/": { + "delete": { + "description": "Destroy an existing subscription exclusion in the system.\n\nThis will DELETE an existing subscription exclusion\nin the system. Existing subscription exclusions\nare identified and deleted by the \"org_id\" field.", + "operationId": "autosubexclusion_destroy", + "parameters": [ + { + "in": "path", + "name": "org_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "autosubexclusion" + ] + }, + "get": { + "description": "Returns an individual subscription exclusion based on org_id.\n\nThis returns an individual subscription exclusion\nbased on the org_id.", + "operationId": "autosubexclusion_retrieve", + "parameters": [ + { + "in": "path", + "name": "org_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionExcludedAccount" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "autosubexclusion" + ] + } + }, + "/api/insights/v1/export/hits/": { + "get": { + "description": "Get each host and all rules currently affecting it.\n\nWe also only present active, non-acked (on an account AND host level)\nrules. Inventory data may be requested if Advisor has not seen all\nthe hosts. The accepted content type supplied in the request headers\nis used to determine the supplied content type.", + "operationId": "export_hits_list", + "parameters": [ + { + "description": "Display rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display systems with this text in their display_name", + "in": "query", + "name": "display_name", + "schema": { + "type": "string" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "format", + "schema": { + "enum": [ + "csv", + "json" + ], + "type": "string" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that have a playbook", + "in": "query", + "name": "has_playbook", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules of this impact level (1..4)", + "in": "query", + "name": "impact", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only rules that cause an incident", + "in": "query", + "name": "incident", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display only rules of this likelihood level (1..4)", + "in": "query", + "name": "likelihood", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that require a reboot to fix", + "in": "query", + "name": "reboot", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules with this resolution risk level (1..4)", + "in": "query", + "name": "res_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules with this text in their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Display rules with this total risk level (1..4)", + "in": "query", + "name": "total_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display a system with this uuid", + "in": "query", + "name": "uuid", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExportHits" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExportHits" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "export" + ] + } + }, + "/api/insights/v1/export/reports/": { + "get": { + "description": "List the report details of each rule affecting each system.\n\nSystem and Rule are referred to by ID only, to be correlated with the\nRule and System export data. It's like the hits output but much\nless repetitive.", + "operationId": "export_reports_list", + "parameters": [ + { + "description": "Display rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display systems with this text in their display_name", + "in": "query", + "name": "display_name", + "schema": { + "type": "string" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that have a playbook", + "in": "query", + "name": "has_playbook", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules of this impact level (1..4)", + "in": "query", + "name": "impact", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only rules that cause an incident", + "in": "query", + "name": "incident", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display only rules of this likelihood level (1..4)", + "in": "query", + "name": "likelihood", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that require a reboot to fix", + "in": "query", + "name": "reboot", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules with this resolution risk level (1..4)", + "in": "query", + "name": "res_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules with this text in their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Display rules with this total risk level (1..4)", + "in": "query", + "name": "total_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display a system with this uuid", + "in": "query", + "name": "uuid", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReportExport" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "export" + ] + } + }, + "/api/insights/v1/export/rules/": { + "get": { + "description": "List the report details of each rule affecting each system.\n\nSystem and Rule are referred to by ID only, to be correlated with the\nRule and System export data. It's like the hits output but much\nless repetitive.", + "operationId": "export_rules_list", + "parameters": [ + { + "description": "Display rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display systems with this text in their display_name", + "in": "query", + "name": "display_name", + "schema": { + "type": "string" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that have a playbook", + "in": "query", + "name": "has_playbook", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules of this impact level (1..4)", + "in": "query", + "name": "impact", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only rules that cause an incident", + "in": "query", + "name": "incident", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display only rules of this likelihood level (1..4)", + "in": "query", + "name": "likelihood", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that require a reboot to fix", + "in": "query", + "name": "reboot", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules with this resolution risk level (1..4)", + "in": "query", + "name": "res_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules with this text in their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Display rules with this total risk level (1..4)", + "in": "query", + "name": "total_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display a system with this uuid", + "in": "query", + "name": "uuid", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RuleExport" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "export" + ] + } + }, + "/api/insights/v1/export/systems/": { + "get": { + "description": "List of systems with details and hit counts.\n\nSystems can be sorted and filtered by display name and rule id.", + "operationId": "export_systems_list", + "parameters": [ + { + "description": "Display systems with this text in their display_name", + "in": "query", + "name": "display_name", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "format", + "schema": { + "enum": [ + "csv", + "json" + ], + "type": "string" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display systems with this text in their rule_id", + "in": "query", + "name": "rule_id", + "schema": { + "type": "string" + } + }, + { + "description": "Order by this field", + "in": "query", + "name": "sort", + "schema": { + "default": "-hits", + "enum": [ + "-critical_hits", + "-display_name", + "-group_name", + "-hits", + "-important_hits", + "-last_seen", + "-low_hits", + "-moderate_hits", + "-rhel_version", + "critical_hits", + "display_name", + "group_name", + "hits", + "important_hits", + "last_seen", + "low_hits", + "moderate_hits", + "rhel_version" + ], + "type": "string" + } + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/System" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/System" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "export" + ] + } + }, + "/api/insights/v1/hostack/": { + "get": { + "description": "List host acks from this account for a system where the rule is active.\n\nHostacks are retrieved, edited and deleted by the 'id' field.", + "operationId": "hostack_list", + "parameters": [ + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Display host acknowledgement of this/these rules", + "in": "query", + "name": "rule_id", + "schema": { + "items": { + "format": "regex", + "pattern": "\\w+(,\\w+)*", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedHostAckList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "hostack" + ] + }, + "post": { + "description": "Add an acknowledgement for a rule, by rule ID, system, and account.\n\nReturn the new hostack. If there's already an acknowledgement of\nthis rule by this account for a system, then return that. This does\nnot take an 'id' number.", + "operationId": "hostack_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostAckInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/HostAckInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/HostAckInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostAck" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "hostack" + ] + } + }, + "/api/insights/v1/hostack/{id}/": { + "delete": { + "description": "Delete an acknowledgement for a rule, for a system, for an account, by its ID.\n\nTakes the hostack ID (given in the hostack list) as an identifier.", + "operationId": "hostack_destroy", + "parameters": [ + { + "description": "A unique integer value identifying this host ack.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "hostack" + ] + }, + "get": { + "description": "HostAcks acknowledge (and therefore hide) a rule from view in an account for a specific system.\n\nThis view handles listing, retrieving, creating and deleting hostacks.", + "operationId": "hostack_retrieve", + "parameters": [ + { + "description": "A unique integer value identifying this host ack.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostAck" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "hostack" + ] + }, + "put": { + "description": "Update the justification for this host acknowledgement.\n\nThe justification is taken from the request body. The created_by\nfield is taken from the username in the x-rh-identity field, and the\nupdated_at field is set to the current time.", + "operationId": "hostack_update", + "parameters": [ + { + "description": "A unique integer value identifying this host ack.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostAckJustification" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/HostAckJustification" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/HostAckJustification" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostAckJustification" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "hostack" + ] + } + }, + "/api/insights/v1/kcs/": { + "get": { + "description": "Looks for all active rules with KCS solutions\n\nReturns a list of dicts of the C.R.C rule URL and its KCS solution number", + "operationId": "kcs_list", + "parameters": [ + { + "description": "Display the rule urls for the given list of comma separated KCS solution node_ids", + "in": "query", + "name": "node_ids", + "schema": { + "items": { + "format": "regex", + "pattern": "\\d+", + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Kcs" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "tags": [ + "kcs" + ] + } + }, + "/api/insights/v1/kcs/{node_id}/": { + "get": { + "description": "Gets active rule(s) for a particular KCS solution (node_id)\n\nReturns a list of C.R.C rule url(s) for that KCS solution", + "operationId": "kcs_retrieve", + "parameters": [ + { + "in": "path", + "name": "node_id", + "required": true, + "schema": { + "description": "KCS solution number", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "description": "Rule URL on C.R.C.", + "format": "uri", + "type": "string" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "tags": [ + "kcs" + ] + } + }, + "/api/insights/v1/pathway/": { + "get": { + "description": "This returns a list of all Pathways. Will display the same\ninformation as is provided in the retrieve view, but has all Pathways\nlisted.", + "operationId": "pathway_list", + "parameters": [ + { + "description": "Filter rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only pathways where there are incidents.", + "in": "query", + "name": "has_incident", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display pathways even if they aren't impacting systems currently", + "in": "query", + "name": "impacting", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Display only pathways where reboot is required.", + "in": "query", + "name": "reboot_required", + "schema": { + "type": "boolean" + } + }, + { + "description": "Order by this field", + "in": "query", + "name": "sort", + "schema": { + "default": "name", + "enum": [ + "-impacted_systems_count", + "-name", + "-recommendation_level", + "impacted_systems_count", + "name", + "recommendation_level" + ], + "type": "string" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter pathway names with this text. If viewing details for a pathway for rules, reports and systems, additional filter on their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedPathwayList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Return all pathways", + "tags": [ + "pathway" + ] + }, + "post": { + "description": "This creates a new Pathway in the system.\nRequired fields are \"name,\" \"description,\"\n\"component,\" \"resolution_risk,\" and \"publish_date.\"\n\"name\" is a slug field and used to identify and\nretrieve Pathways for detailed analysis. The slug\nfor a Pathway is auto-generated by converting the\n\"name\" to lowercase and replacing all spaces with dashes.\n\"resolution_risk\" should be the \"name\" of the\nResolutionRisk to associate with this Pathway,\nnot the risk value.", + "operationId": "pathway_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Create a new Pathway in the system", + "tags": [ + "pathway" + ] + } + }, + "/api/insights/v1/pathway/{slug}/": { + "delete": { + "description": "This will DELETE an existing Pathway in the system.\nExisting pathways are identified and deleted by\nthe \"slug\" field.", + "operationId": "pathway_destroy", + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Destroy an existing Pathway in the system", + "tags": [ + "pathway" + ] + }, + "get": { + "description": "This returns an individual pathway based on slug.\nWill display the same information as is\nprovided in the list view.", + "operationId": "pathway_retrieve", + "parameters": [ + { + "description": "Filter rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter pathway names with this text. If viewing details for a pathway for rules, reports and systems, additional filter on their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pathway" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Returns an individual Pathway based on slug", + "tags": [ + "pathway" + ] + }, + "put": { + "description": "This updates an existing Pathway already\ndefined in the system. All fields that are\nrequired to define a Pathway initially\nmay be updated here as well. Pathways are\nidenfitied and updated by the \"slug\" field.", + "operationId": "pathway_update", + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PathwayInput" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Update an existing Pathway in the system", + "tags": [ + "pathway" + ] + } + }, + "/api/insights/v1/pathway/{slug}/reports/": { + "get": { + "description": "Each rule is listed once, with the systems currently reporting an\nincidence of that rule in a list.", + "operationId": "pathway_reports_retrieve", + "parameters": [ + { + "description": "Filter rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display Pathway Reports of this/these systems", + "in": "query", + "name": "host_id", + "schema": { + "items": { + "format": "regex", + "pattern": "\\w+(,\\w+)*", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display Pathway Reports of this/these rules", + "in": "query", + "name": "rule_id", + "schema": { + "items": { + "format": "regex", + "pattern": "\\w+(,\\w+)*", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Filter pathway names with this text. If viewing details for a pathway for rules, reports and systems, additional filter on their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleSystemsExport" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Get the list of systems for each rule in this pathway", + "tags": [ + "pathway" + ] + } + }, + "/api/insights/v1/pathway/{slug}/rules/": { + "get": { + "description": "This view will retrieve/list in paginated\nformat, all rules for a specific Pathway.\nThis does not take into account acks\nor host asks. The Specific Pathway\nis requested by its slug", + "operationId": "pathway_rules_list", + "parameters": [ + { + "description": "Filter rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Filter pathway names with this text. If viewing details for a pathway for rules, reports and systems, additional filter on their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedRuleForAccountList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Get all rules in a Pathway", + "tags": [ + "pathway" + ] + } + }, + "/api/insights/v1/pathway/{slug}/systems/": { + "get": { + "description": "This view will retrieve/list in paginated\nformat, all impacted systems for an account,\nfor a specific Pathway. The specific Pathway\nis requested by its slug.", + "operationId": "pathway_systems_list", + "parameters": [ + { + "description": "Filter rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter pathway names with this text. If viewing details for a pathway for rules, reports and systems, additional filter on their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedSystemList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Get all impacted systems for an account for a specific Pathway", + "tags": [ + "pathway" + ] + } + }, + "/api/insights/v1/rating/": { + "get": { + "description": "List all rules rated by the current user\n\nOnly the current user's ratings are listed here.", + "operationId": "rating_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedRuleRatingList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rating" + ] + }, + "post": { + "description": "Add or update a rating for a rule, by rule ID.\n\nReturn the new rating. Any previous rating for this rule by this\nuser is amended to the current value. This does not attempt to delete\na rating by this user of this rule if the rating is zero.", + "operationId": "rating_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rating" + ] + } + }, + "/api/insights/v1/rating/all_ratings/": { + "get": { + "description": "Show all ratings.\n\nAvailable only to internal users.", + "operationId": "rating_all_ratings_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedAllRuleRatingsList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rating" + ] + } + }, + "/api/insights/v1/rating/stats/": { + "get": { + "description": "Summarise the ratings for a rule.\n\nThis summarises the statistics for each rule. Available only to\ninternal users.", + "operationId": "rating_stats_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedRuleRatingStatsList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rating" + ] + } + }, + "/api/insights/v1/rating/{rule}/": { + "get": { + "description": "Retrieve the ratings for a single rule, by Insights Rule ID", + "operationId": "rating_retrieve", + "parameters": [ + { + "in": "path", + "name": "rule", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleRating" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "summary": "Retrieve the ratings for a single rule", + "tags": [ + "rating" + ] + } + }, + "/api/insights/v1/rule/": { + "get": { + "description": "List all active rules for this account.\n\nIf 'acked' is False or not given, then only rules that are not acked\nwill be shown. If acked is set and 'true' as a string or evaluates\nto a true value, then all rules including those that are acked will\nbe shown.", + "operationId": "rule_list", + "parameters": [ + { + "description": "Display rules of this category (number)", + "in": "query", + "name": "category", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules that have a playbook", + "in": "query", + "name": "has_playbook", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules that have (one or more) tags", + "in": "query", + "name": "has_tag", + "schema": { + "items": { + "pattern": "\\w+(?:,\\w+)*", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules of this impact level (1..4)", + "in": "query", + "name": "impact", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only rules that are impacting systems currently", + "in": "query", + "name": "impacting", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display only rules that cause an incident", + "in": "query", + "name": "incident", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display only rules of this likelihood level (1..4)", + "in": "query", + "name": "likelihood", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Display rules of this Pathway", + "in": "query", + "name": "pathway", + "schema": { + "type": "string" + } + }, + { + "description": "Display rules that require a reboot to fix", + "in": "query", + "name": "reboot", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules where reports are shown or not", + "in": "query", + "name": "reports_shown", + "schema": { + "type": "boolean" + } + }, + { + "description": "Display rules with this resolution risk level (1..4)", + "in": "query", + "name": "res_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules which are enabled, disabled (acked) by user, or disabled (acked) by Red Hat", + "in": "query", + "name": "rule_status", + "schema": { + "enum": [ + "all", + "disabled", + "enabled", + "rhdisabled" + ], + "type": "string" + } + }, + { + "description": "Order by this field", + "in": "query", + "name": "sort", + "schema": { + "default": [ + "rule_id" + ], + "items": { + "enum": [ + "-category", + "-description", + "-impact", + "-impacted_count", + "-likelihood", + "-playbook_count", + "-publish_date", + "-resolution_risk", + "-rule_id", + "-total_risk", + "category", + "description", + "impact", + "impacted_count", + "likelihood", + "playbook_count", + "publish_date", + "resolution_risk", + "rule_id", + "total_risk" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display rules with this text in their text fields", + "in": "query", + "name": "text", + "schema": { + "type": "string" + } + }, + { + "description": "Display rules in this topic (slug)", + "in": "query", + "name": "topic", + "schema": { + "format": "regex", + "pattern": "[\\w-]+", + "type": "string" + } + }, + { + "description": "Display rules with this total risk level (1..4)", + "in": "query", + "name": "total_risk", + "schema": { + "items": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedRuleForAccountList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/": { + "get": { + "description": "Retrieve a single rule and its associated details.\n\nThis includes the account-relevant details such as number of\nimpacted systems and host acknowledgements.", + "operationId": "rule_retrieve", + "parameters": [ + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleForAccount" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/ack_hosts/": { + "post": { + "description": "Add acknowledgements for one or more hosts to this rule.\n\nHost acknowledgements will be added to this rule in this account for\nthe system UUIDs supplied. The justification supplied will be given\nfor all host acks created. Any existing host acknowledgements for a\nhost on this rule will be updated. The count of created hosts\nacknowledgements, and the list of systems now impacted by this rule,\nwill be returned. Account-wide acks are unaffected.", + "operationId": "rule_ack_hosts_create", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MultiHostAck" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/MultiHostAck" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiHostAck" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MultiAckResponse" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/justifications/": { + "get": { + "description": "List all justifications given for disabling this rule.\n\nThis is an **internal-only** view that allows us to provide feedback\non why rules are disabled by our customers. It lists the\njustifications given in both account-wide acks and host-specific acks\nof a rule.", + "operationId": "rule_justifications_list", + "parameters": [ + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedJustificationCountList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/stats/": { + "get": { + "description": "Display usage and impact statistics for this rule.\n\nFor internal use only. This allows rule developers to see the number\nof systems and accounts impacted by a rule.", + "operationId": "rule_stats_retrieve", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleUsageStats" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/systems/": { + "get": { + "description": "List all systems affected by this rule.\n\nAll systems owned by the user's account, with a current upload\nreporting the given rule, are listed. Systems are simply listed by\nInsights Inventory UUID.", + "operationId": "rule_systems_retrieve", + "parameters": [ + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "format", + "schema": { + "enum": [ + "csv", + "json" + ], + "type": "string" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems that include this in their display name", + "in": "query", + "name": "name", + "schema": { + "type": "string" + } + }, + { + "description": "Display only systems with these versions of RHEL", + "in": "query", + "name": "rhel_version", + "schema": { + "items": { + "enum": [ + "6.0", + "6.1", + "6.10", + "6.2", + "6.3", + "6.4", + "6.5", + "6.6", + "6.7", + "6.8", + "6.9", + "7.0", + "7.1", + "7.10", + "7.2", + "7.3", + "7.4", + "7.5", + "7.6", + "7.7", + "7.8", + "7.9", + "8.0", + "8.1", + "8.10", + "8.2", + "8.3", + "8.4", + "8.5", + "8.6", + "8.7", + "8.8", + "8.9", + "9.0", + "9.1", + "9.2", + "9.3", + "9.4", + "9.5" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + }, + { + "description": "Order by this field", + "in": "query", + "name": "sort", + "schema": { + "default": [ + "system_uuid" + ], + "items": { + "enum": [ + "-display_name", + "-last_seen", + "-stale_at", + "-system_uuid", + "-updated", + "display_name", + "last_seen", + "stale_at", + "system_uuid", + "updated" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemsForRule" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/SystemsForRule" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/systems_detail/": { + "get": { + "description": "List systems affected by this rule with additional information about each system\n\nAll systems owned by the user's account, with a current upload\nreporting the given rule, are listed in a paginated format.\n\nAdditional information includes hit counts and upload/stale timestamps.", + "operationId": "rule_systems_detail_list", + "parameters": [ + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Number of results to return per page.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Search for systems that include this in their display name", + "in": "query", + "name": "name", + "schema": { + "type": "string" + } + }, + { + "description": "The initial index from which to return the results.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Display only systems with these versions of RHEL", + "in": "query", + "name": "rhel_version", + "schema": { + "items": { + "enum": [ + "6.0", + "6.1", + "6.10", + "6.2", + "6.3", + "6.4", + "6.5", + "6.6", + "6.7", + "6.8", + "6.9", + "7.0", + "7.1", + "7.10", + "7.2", + "7.3", + "7.4", + "7.5", + "7.6", + "7.7", + "7.8", + "7.9", + "8.0", + "8.1", + "8.10", + "8.2", + "8.3", + "8.4", + "8.5", + "8.6", + "8.7", + "8.8", + "8.9", + "9.0", + "9.1", + "9.2", + "9.3", + "9.4", + "9.5" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + }, + { + "description": "Order by this field", + "in": "query", + "name": "sort", + "schema": { + "default": "display_name", + "enum": [ + "-critical_hits", + "-display_name", + "-group_name", + "-hits", + "-impacted_date", + "-important_hits", + "-last_seen", + "-low_hits", + "-moderate_hits", + "-rhel_version", + "critical_hits", + "display_name", + "group_name", + "hits", + "impacted_date", + "important_hits", + "last_seen", + "low_hits", + "moderate_hits", + "rhel_version" + ], + "type": "string" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedSystemsDetailList" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rule/{rule_id}/unack_hosts/": { + "post": { + "description": "Delete acknowledgements for one or more hosts to this rule.\n\nAny host acknowledgements for this rule in this account for the given\nsystem are deleted. Hosts that do not have an acknowledgement for\nthis rule in this account are ignored. The count of deleted host\nacknowledgements, and the list of hosts now impacted by this rule,\nwill be returned. Account-wide acks are unaffected.", + "operationId": "rule_unack_hosts_create", + "parameters": [ + { + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "description": "Rule ID from Insights", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MultiHostUnAck" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/MultiHostUnAck" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiHostUnAck" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MultiAckResponse" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "rule" + ] + } + }, + "/api/insights/v1/rulecategory/": { + "get": { + "description": "Rules are divided into categories, the usual being Availability,\nStability, Security and Performance.\n\nCategories are listed in decreasing order of importance.", + "operationId": "rulecategory_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RuleCategory" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "tags": [ + "rulecategory" + ] + } + }, + "/api/insights/v1/rulecategory/{id}/": { + "get": { + "description": "Rules are divided into categories, the usual being Availability,\nStability, Security and Performance.\n\nCategories are listed in decreasing order of importance.", + "operationId": "rulecategory_retrieve", + "parameters": [ + { + "description": "A unique integer value identifying this rule category.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleCategory" + } + } + }, + "description": "" + } + }, + "tags": [ + "rulecategory" + ] + } + }, + "/api/insights/v1/settings/": { + "get": { + "description": "Describe the settings we have in a Data-Driven Forms way.\n\nThis simply compiles the 'show_satellite_hosts' account-wide setting\ninto a format compatible with Data-Driven Forms.", + "operationId": "settings_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SettingsDDF" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "settings" + ] + } + }, + "/api/insights/v1/stats/": { + "get": { + "description": "Provide a simple list of URLs contained here.\n\nA list of statistics views.", + "operationId": "stats_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "items": { + "format": "uri", + "type": "string" + }, + "type": "array" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "stats" + ] + } + }, + "/api/insights/v1/stats/overview/": { + "get": { + "description": "Show overview statistics for this user\n\nThis gives the number of pathways, and incident, critical and\nimportant recommendations, affecting systems that the user can see.", + "operationId": "stats_overview_retrieve", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "stats" + ] + } + }, + "/api/insights/v1/stats/reports/": { + "get": { + "description": "Show statistics of reports impacting across categories and risks.\n\nOnly current reports are considered.", + "operationId": "stats_reports_retrieve", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "stats" + ] + } + }, + "/api/insights/v1/stats/rules/": { + "get": { + "description": "Show statistics of rule usage across categories and risks.\n\nOnly current reports are considered.", + "operationId": "stats_rules_retrieve", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "stats" + ] + } + }, + "/api/insights/v1/stats/systems/": { + "get": { + "description": "Show statistics of systems being impacted across categories and risks.\n\nOnly current reports are considered.", + "operationId": "stats_systems_retrieve", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stats" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "stats" + ] + } + }, + "/api/insights/v1/status/": { + "get": { + "description": "Provide a simple list of URLs contained here.\n\nA list of statistics views.", + "operationId": "status_retrieve", + "responses": { + "200": { + "description": "No response body" + } + }, + "tags": [ + "status" + ] + } + }, + "/api/insights/v1/status/live/": { + "get": { + "description": "Is the Advisor API live and serving requests?\n\nThis returns a dictionary with properties defining the status of the\ncomponents Advisor relies on.\n\nAt the moment this is the same as the Readiness check (see `/ready/`).\nIn the future it may include other checks if we need to, but the\nproperties of `/ready/` will always be included.", + "operationId": "status_live_retrieve", + "responses": { + "200": { + "description": "No response body" + } + }, + "tags": [ + "status" + ] + } + }, + "/api/insights/v1/status/ready/": { + "get": { + "description": "Is the Advisor API ready to serve requests?\n\nThis returns a dictionary with properties defining the status of the\ncomponents Advisor relies on.\n\n* 'django' should always be True. If Django isn't ready, you can't\n get this information :-)\n* 'database' is True when a database access returns successfully with\n valid information.\n* 'rbac' is True when we can make a request to the RBAC API and get\n a valid response.\n* 'advisor' is True if all of the above are True.", + "operationId": "status_ready_retrieve", + "responses": { + "200": { + "description": "No response body" + } + }, + "tags": [ + "status" + ] + } + }, + "/api/insights/v1/system/": { "get": { - "description": "View a list of executed tasks, or a single executed task", - "operationId": "executed_task_list", + "description": "Returns systems with their hit count and last upload time.\n\nResults can be sorted and systems can be filtered by display name and hits", + "operationId": "system_list", "parameters": [ + { + "description": "Display systems with this text in their display_name", + "in": "query", + "name": "display_name", + "schema": { + "type": "string" + } + }, + { + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display systems with hits of the given total_risk value (1..4), or 0 to display all systems", + "in": "query", + "name": "hits", + "schema": { + "items": { + "enum": [ + "1", + "2", + "3", + "4", + "all", + "no", + "yes" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Display only systems reporting an incident", + "in": "query", + "name": "incident", + "schema": { + "type": "boolean" + } + }, { "description": "Number of results to return per page.", "in": "query", @@ -907,39 +6486,103 @@ } }, { + "description": "Display systems with rule hits for this Pathway", + "in": "query", + "name": "pathway", + "schema": { + "type": "string" + } + }, + { + "description": "Display only systems with these versions of RHEL", + "in": "query", + "name": "rhel_version", + "schema": { + "items": { + "enum": [ + "6.0", + "6.1", + "6.10", + "6.2", + "6.3", + "6.4", + "6.5", + "6.6", + "6.7", + "6.8", + "6.9", + "7.0", + "7.1", + "7.10", + "7.2", + "7.3", + "7.4", + "7.5", + "7.6", + "7.7", + "7.8", + "7.9", + "8.0", + "8.1", + "8.10", + "8.2", + "8.3", + "8.4", + "8.5", + "8.6", + "8.7", + "8.8", + "8.9", + "9.0", + "9.1", + "9.2", + "9.3", + "9.4", + "9.5" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Order by this field", "in": "query", "name": "sort", "schema": { - "default": "start_time", + "default": "-hits", "enum": [ - "-end_time", - "-name", - "-start_time", - "-status", - "-systems_count", - "-title", - "end_time", - "name", - "start_time", - "status", - "systems_count", - "title" + "-critical_hits", + "-display_name", + "-group_name", + "-hits", + "-important_hits", + "-last_seen", + "-low_hits", + "-moderate_hits", + "-rhel_version", + "critical_hits", + "display_name", + "group_name", + "hits", + "important_hits", + "last_seen", + "low_hits", + "moderate_hits", + "rhel_version" ], "type": "string" } }, { + "description": "Tags have a namespace, key and value in the form namespace/key=value", "in": "query", - "name": "status", + "name": "tags", "schema": { "items": { - "enum": [ - "Cancelled", - "Completed", - "Completed With Errors", - "Failure", - "Running" - ], + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", "type": "string" }, "type": "array" @@ -947,11 +6590,20 @@ "style": "form" }, { + "description": "Search for systems with this updater type", "in": "query", - "name": "text", + "name": "update_method", "schema": { - "type": "string" - } + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" } ], "responses": { @@ -959,7 +6611,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedExecutedTaskList" + "$ref": "#/components/schemas/PaginatedSystemList" } } }, @@ -972,38 +6624,32 @@ } ], "tags": [ - "executed_task" + "system" ] - }, - "post": { - "description": "Execute a task on one or more hosts.\n\nThis takes a task, a list of one or more hosts, and any parameters\nthe task may define, and creates a new executed task linked to a job\nfor each host. The jobs are then scheduled on those hosts by the\ndispatch mechanism defined by the task.", - "operationId": "executed_task_create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExecuteTask" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/ExecuteTask" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/ExecuteTask" - } + } + }, + "/api/insights/v1/system/{uuid}/": { + "get": { + "description": "Retrieve the reports for a single system by Insights Inventory UUID", + "operationId": "system_retrieve", + "parameters": [ + { + "description": "A UUID string identifying this inventory host.", + "in": "path", + "name": "uuid", + "required": true, + "schema": { + "format": "uuid", + "type": "string" } - }, - "required": true - }, + } + ], "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExecutedTaskOne" + "$ref": "#/components/schemas/System" } } }, @@ -1015,29 +6661,109 @@ "x-rh-identity": [] } ], + "summary": "Retrieve the reports for a single system", "tags": [ - "executed_task" + "system" ] } }, - "/api/tasks/v1/executed_task/{id}": { - "delete": { - "description": "Delete an existing execut(ing,ed) task. If the task is still\nexecuting (i.e. it is not yet cancelled or completed) then also\ncancel all running jobs. This also deletes the data for all of the\nexecuted task's jobs.", - "operationId": "executed_task_destroy", + "/api/insights/v1/system/{uuid}/rendered_reports/": { + "get": { + "description": "Returns the list of reports for an Inventory Host ID, with the\nrule templates filled in thanks to node.js and DoT and Markdown.\n\nIf the host ID is not found, return an empty list.", + "operationId": "system_rendered_reports_list", "parameters": [ { - "description": "A unique integer value identifying this executed task.", + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Is this a Microsoft SQL system?", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "A UUID string identifying this inventory host.", "in": "path", - "name": "id", + "name": "uuid", "required": true, "schema": { - "type": "integer" + "format": "uuid", + "type": "string" } } ], "responses": { - "204": { - "description": "No response body" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RenderedReport" + }, + "type": "array" + } + } + }, + "description": "" } }, "security": [ @@ -1046,38 +6772,102 @@ } ], "tags": [ - "executed_task" + "system" ] - }, + } + }, + "/api/insights/v1/system/{uuid}/reports/": { "get": { - "description": "Retrieve a single executed task, along with its list of jobs and the\nsystems they represent.", - "operationId": "executed_task_retrieve", + "description": "Returns the list of latest reports for an Inventory Host ID.\n\nReturns reports that:\n * are in the user's account\n * have an active, not-deleted rule\n * where the rule has not been acked by this account\n\nIf the host ID is not found, return an empty list.", + "operationId": "system_reports_list", "parameters": [ { - "description": "A unique integer value identifying this executed task.", - "in": "path", - "name": "id", - "required": true, + "description": "Is this an Ansible system?", + "in": "query", + "name": "filter[system_profile][ansible]", "schema": { - "type": "integer" + "type": "boolean" } }, { - "description": "Sort systems by this field", + "description": "Is this a Microsoft SQL system?", "in": "query", - "name": "sort", + "name": "filter[system_profile][mssql]", "schema": { - "default": "display_name", - "enum": [ - "-display_name", - "-last_seen", - "-os_version", - "-status", - "display_name", - "last_seen", - "os_version", - "status" - ], + "type": "boolean" + } + }, + { + "description": "Are there systems which contain these SAP SIDs?", + "in": "query", + "name": "filter[system_profile][sap_sids][contains]", + "schema": { + "items": { + "format": "regex", + "pattern": "^[A-Z]..$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Is this a SAP system?", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "boolean" + } + }, + { + "description": "List of Inventory host group names", + "in": "query", + "name": "groups", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Tags have a namespace, key and value in the form namespace/key=value", + "in": "query", + "name": "tags", + "schema": { + "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Search for systems with this updater type", + "in": "query", + "name": "update_method", + "schema": { + "items": { + "enum": [ + "dnfyum", + "ostree" + ], + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "A UUID string identifying this inventory host.", + "in": "path", + "name": "uuid", + "required": true, + "schema": { + "format": "uuid", "type": "string" } } @@ -1087,30 +6877,58 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExecutedTaskOne" + "items": { + "$ref": "#/components/schemas/Report" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "system" + ] + } + }, + "/api/insights/v1/systemtype/": { + "get": { + "description": "List all system types by role and product code", + "operationId": "systemtype_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SystemType" + }, + "type": "array" } } }, "description": "" } }, - "security": [ - { - "x-rh-identity": [] - } - ], + "summary": "List all system types", "tags": [ - "executed_task" + "systemtype" ] } }, - "/api/tasks/v1/executed_task/{id}/cancel": { - "post": { - "description": "Cancel an existing executed task, by ID.\n\nThis sends a signal to the Playbook Dispatcher to cancel all the jobs\nin this executed task. It updates the state of the executed task to\nbe CANCELLED. Jobs in this task will be updated as we receive\nmessages back from the Playbook Dispatcher.", - "operationId": "executed_task_cancel_create", + "/api/insights/v1/systemtype/{id}/": { + "get": { + "description": "Retrieve details of a single system type", + "operationId": "systemtype_retrieve", "parameters": [ { - "description": "A unique integer value identifying this executed task.", + "description": "A unique integer value identifying this system type.", "in": "path", "name": "id", "required": true, @@ -1119,67 +6937,37 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExecutedTask" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/ExecutedTask" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/ExecutedTask" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExecutedTask" + "$ref": "#/components/schemas/SystemType" } } }, "description": "" } }, - "security": [ - { - "x-rh-identity": [] - } - ], + "summary": "Retrieve a system type", "tags": [ - "executed_task" + "systemtype" ] } }, - "/api/tasks/v1/executed_task/{id}/jobs": { + "/api/insights/v1/topic/": { "get": { - "description": "List the jobs associated with the given executed task.", - "operationId": "executed_task_jobs_list", + "description": "List the rule topics and their impacted systems counts.\n\nNormally this only shows enabled topics, but if the 'show_disabled'\nparameter is set to True then this will show disabled topics as\nwell.", + "operationId": "topic_list", "parameters": [ { - "description": "Display systems with this text in their display_name", - "in": "query", - "name": "display_name", - "schema": { - "type": "string" - } - }, - { - "description": "List of Inventory host group names", + "description": "Are there systems which contain these SAP SIDs?", "in": "query", - "name": "groups", + "name": "filter[system_profile][sap_sids][contains]", "schema": { "items": { + "format": "regex", + "pattern": "^[A-Z]..$", "type": "string" }, "type": "array" @@ -1187,79 +6975,19 @@ "style": "form" }, { - "description": "A unique integer value identifying this executed task.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "description": "The initial index from which to return the results.", + "description": "Is this a SAP system?", "in": "query", - "name": "offset", - "required": false, + "name": "filter[system_profile][sap_system]", "schema": { - "type": "integer" + "type": "boolean" } }, { - "description": "Display only systems with these OS versions", + "description": "List of Inventory host group names", "in": "query", - "name": "os_version", + "name": "groups", "schema": { "items": { - "enum": [ - "6.0", - "6.1", - "6.10", - "6.2", - "6.3", - "6.4", - "6.5", - "6.6", - "6.7", - "6.8", - "6.9", - "7.0", - "7.1", - "7.10", - "7.2", - "7.3", - "7.4", - "7.5", - "7.6", - "7.7", - "7.8", - "7.9", - "8.0", - "8.1", - "8.10", - "8.2", - "8.3", - "8.4", - "8.5", - "8.6", - "8.7", - "8.8", - "8.9", - "9.0", - "9.1", - "9.2", - "9.3", - "9.4", - "9.5" - ], "type": "string" }, "type": "array" @@ -1267,36 +6995,22 @@ "style": "form" }, { - "description": "Sort systems by this field", + "description": "Display topics that are disabled as well as enabled", "in": "query", - "name": "sort", + "name": "show_disabled", "schema": { - "default": "display_name", - "enum": [ - "-display_name", - "-last_seen", - "-os_version", - "-status", - "display_name", - "last_seen", - "os_version", - "status" - ], - "type": "string" + "default": false, + "type": "boolean" } }, { + "description": "Tags have a namespace, key and value in the form namespace/key=value", "in": "query", - "name": "status", + "name": "tags", "schema": { "items": { - "enum": [ - "Cancelled", - "Failure", - "Running", - "Success", - "Timeout" - ], + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", "type": "string" }, "type": "array" @@ -1304,13 +7018,15 @@ "style": "form" }, { - "description": "Tags have a namespace, key and value in the form namespace/key=value", + "description": "Search for systems with this updater type", "in": "query", - "name": "tags", + "name": "update_method", "schema": { "items": { - "format": "regex", - "pattern": "^[^/=]+/[^/=]+=[^/=]+$", + "enum": [ + "dnfyum", + "ostree" + ], "type": "string" }, "type": "array" @@ -1323,7 +7039,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedJobList" + "items": { + "$ref": "#/components/schemas/Topic" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "x-rh-identity": [] + } + ], + "tags": [ + "topic" + ] + }, + "post": { + "description": "Create a new rule topic, along with its association to a rule tag", + "operationId": "topic_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" } } }, @@ -1335,94 +7098,54 @@ "x-rh-identity": [] } ], + "summary": "Create a new rule topic", "tags": [ - "executed_task" + "topic" ] } }, - "/api/tasks/v1/job": { - "get": { - "description": "View the jobs of running executed tasks.", - "operationId": "job_list", + "/api/insights/v1/topic/{slug}/": { + "delete": { + "description": "Delete a rule topic. Rules associated with the tag of this topic will be unaffected", + "operationId": "topic_destroy", "parameters": [ { - "description": "Display systems with this text in their display_name", - "in": "query", - "name": "display_name", + "in": "path", + "name": "slug", + "required": true, "schema": { + "description": "Rule topic slug", "type": "string" } - }, - { - "in": "query", - "name": "executed_task", - "schema": { - "type": "integer" - } - }, - { - "in": "query", - "name": "has_stdout", - "schema": { - "type": "boolean" - } - }, - { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, + } + ], + "responses": { + "204": { + "description": "No response body" + } + }, + "security": [ { - "description": "The initial index from which to return the results.", - "in": "query", - "name": "offset", - "required": false, - "schema": { - "type": "integer" - } - }, + "x-rh-identity": [] + } + ], + "summary": "Delete a rule topic", + "tags": [ + "topic" + ] + }, + "get": { + "description": "Retrieve a single topic by slug.\n\nThis also lists the topic's impacted systems count.", + "operationId": "topic_retrieve", + "parameters": [ { - "description": "Sort jobs by this field", - "in": "query", - "name": "sort", + "in": "path", + "name": "slug", + "required": true, "schema": { - "default": "-updated_on", - "enum": [ - "-display_name", - "-executed_task", - "-status", - "-system", - "-updated_on", - "display_name", - "executed_task", - "status", - "system", - "updated_on" - ], + "description": "Rule topic slug", "type": "string" } - }, - { - "in": "query", - "name": "status", - "schema": { - "items": { - "enum": [ - "Cancelled", - "Failure", - "Running", - "Success", - "Timeout" - ], - "type": "string" - }, - "type": "array" - }, - "style": "form" } ], "responses": { @@ -1430,7 +7153,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedJobList" + "$ref": "#/components/schemas/Topic" } } }, @@ -1443,31 +7166,48 @@ } ], "tags": [ - "job" + "topic" ] - } - }, - "/api/tasks/v1/job/{id}": { - "get": { - "description": "View the jobs of running executed tasks.", - "operationId": "job_retrieve", + }, + "patch": { + "description": "Update an existing rule topic. Only the fields being changed need to be supplied", + "operationId": "topic_partial_update", "parameters": [ { - "description": "A unique integer value identifying this job.", "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { - "type": "integer" + "description": "Rule topic slug", + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedTopicEdit" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PatchedTopicEdit" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PatchedTopicEdit" + } + } + } + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/TopicEdit" } } }, @@ -1479,50 +7219,51 @@ "x-rh-identity": [] } ], + "summary": "Partially update a rule topic", "tags": [ - "job" + "topic" ] - } - }, - "/api/tasks/v1/job/{id}/log": { - "get": { - "description": "Show the log lines for this job.", - "operationId": "job_log_list", + }, + "put": { + "description": "Update an existing rule topic. All fields need to be supplied", + "operationId": "topic_update", "parameters": [ { - "description": "A unique integer value identifying this job.", "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { - "type": "integer" - } - }, - { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "description": "The initial index from which to return the results.", - "in": "query", - "name": "offset", - "required": false, - "schema": { - "type": "integer" + "description": "Rule topic slug", + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/TopicEdit" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedJobLogList" + "$ref": "#/components/schemas/TopicEdit" } } }, @@ -1534,32 +7275,36 @@ "x-rh-identity": [] } ], + "summary": "Update a rule topic", "tags": [ - "job" + "topic" ] } }, - "/api/tasks/v1/job/{id}/stdout": { + "/api/insights/v1/topic/{slug}/rules_with_tag/": { "get": { - "description": "Show the stdout for this job", - "operationId": "job_stdout_retrieve", + "description": "Lists the available rules that have this tag.\n\nThis shows the rule information for rules with this tag.", + "operationId": "topic_rules_with_tag_list", "parameters": [ { - "description": "A unique integer value identifying this job.", "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { - "type": "integer" + "description": "Rule topic slug", + "type": "string" } } ], "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "items": { + "$ref": "#/components/schemas/Rule" + }, + "type": "array" } } }, @@ -1572,31 +7317,15 @@ } ], "tags": [ - "job" + "topic" ] } }, - "/api/tasks/v1/system": { + "/api/insights/v1/topic/{slug}/systems/": { "get": { - "description": "List the systems that can execute tasks, or the task-related details for\na single system.", - "operationId": "system_list", + "description": "List all systems affected by this rule topic.\n\nSystems are just listed by their UUID.", + "operationId": "topic_systems_retrieve", "parameters": [ - { - "in": "query", - "name": "all_systems", - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "description": "Display systems with this text in their display_name", - "in": "query", - "name": "display_name", - "schema": { - "type": "string" - } - }, { "description": "Are there systems which contain these SAP SIDs?", "in": "query", @@ -1632,29 +7361,35 @@ "style": "form" }, { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "description": "The initial index from which to return the results.", - "in": "query", - "name": "offset", - "required": false, + "in": "path", + "name": "slug", + "required": true, "schema": { - "type": "integer" + "description": "Rule topic slug", + "type": "string" } }, { - "description": "Filter on both operating system name and version. A pipe separates the values. For Example: RHEL|7.9", + "description": "Order by this field", "in": "query", - "name": "operating_system", + "name": "sort", "schema": { + "default": [ + "system_uuid" + ], "items": { + "enum": [ + "-display_name", + "-last_seen", + "-stale_at", + "-system_uuid", + "-updated", + "display_name", + "last_seen", + "stale_at", + "system_uuid", + "updated" + ], "type": "string" }, "type": "array" @@ -1662,11 +7397,13 @@ "style": "form" }, { - "description": "Filter on these (short) operating system names", + "description": "Tags have a namespace, key and value in the form namespace/key=value", "in": "query", - "name": "os_name", + "name": "tags", "schema": { "items": { + "format": "regex", + "pattern": "^[^/=]+/[^/=]+=[^/=]+$", "type": "string" }, "type": "array" @@ -1674,94 +7411,20 @@ "style": "form" }, { - "description": "Display only systems with these OS versions", + "description": "Search for systems with this updater type", "in": "query", - "name": "os_version", + "name": "update_method", "schema": { "items": { "enum": [ - "6.0", - "6.1", - "6.10", - "6.2", - "6.3", - "6.4", - "6.5", - "6.6", - "6.7", - "6.8", - "6.9", - "7.0", - "7.1", - "7.10", - "7.2", - "7.3", - "7.4", - "7.5", - "7.6", - "7.7", - "7.8", - "7.9", - "8.0", - "8.1", - "8.10", - "8.2", - "8.3", - "8.4", - "8.5", - "8.6", - "8.7", - "8.8", - "8.9", - "9.0", - "9.1", - "9.2", - "9.3", - "9.4", - "9.5" + "dnfyum", + "ostree" ], "type": "string" }, "type": "array" }, "style": "form" - }, - { - "description": "Sort systems by this field", - "in": "query", - "name": "sort", - "schema": { - "default": "display_name", - "enum": [ - "-display_name", - "-group_name", - "-last_seen", - "-os", - "-os_name", - "-os_version", - "display_name", - "group_name", - "last_seen", - "os", - "os_name", - "os_version" - ], - "type": "string" - } - }, - { - "description": "Tags have a namespace, key and value in the form namespace/key=value", - "in": "query", - "name": "tags", - "schema": { - "items": { - "format": "regex", - "pattern": "^[^/=]+/[^/=]+=[^/=]+$", - "type": "string" - }, - "type": "array" - }, - "style": "form" } ], "responses": { @@ -1769,7 +7432,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedHostList" + "$ref": "#/components/schemas/SystemsForRule" } } }, @@ -1782,22 +7445,50 @@ } ], "tags": [ - "system" + "topic" ] } }, - "/api/tasks/v1/system/{id}": { + "/api/insights/v1/usage/": { "get": { - "description": "List the systems that can execute tasks, or the task-related details for\na single system.", - "operationId": "system_retrieve", + "description": "List the unique rule hits for this account over the given time range\n\nThis uses a HashLogLog structure to record number of hits, and this is\ntherefore an approximation.", + "operationId": "usage_list", "parameters": [ { - "description": "A UUID string identifying this host.", - "in": "path", - "name": "id", - "required": true, + "description": "Allow `hydrauser` to view any account", + "in": "query", + "name": "account", "schema": { - "format": "uuid", + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "End date for statistics range", + "in": "query", + "name": "end", + "schema": { + "format": "date", + "type": "string" + } + }, + { + "description": "Allow `hydrauser` to view any org_id", + "in": "query", + "name": "org_id", + "schema": { + "type": "string" + } + }, + { + "description": "Start date for statistics range", + "in": "query", + "name": "start", + "schema": { + "format": "date", "type": "string" } } @@ -1807,7 +7498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Host" + "$ref": "#/components/schemas/Usage" } } }, @@ -1820,40 +7511,67 @@ } ], "tags": [ - "system" + "usage" ] } }, - "/api/tasks/v1/task": { + "/api/insights/v1/user-preferences/": { "get": { - "description": "View a list of tasks, or a single task", - "operationId": "task_list", - "parameters": [ - { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, + "description": "Describe the settings we have in a Data-Driven Forms way.\n\nThis simply compiles the 'show_satellite_hosts' account-wide setting\nand the weekly report 'is_subscribed' user-specific setting into one\nhandy view, with the description metadata necessary to use Data-Driven\nForms to display it.", + "operationId": "user_preferences_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SettingsDDF" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ { - "description": "The initial index from which to return the results.", - "in": "query", - "name": "offset", - "required": false, - "schema": { - "type": "integer" - } + "x-rh-identity": [] } ], + "tags": [ + "user-preferences" + ] + }, + "post": { + "description": "Accept the settings as input, and adjust the actual models accordingly.\n\nThe current account settings will be updated, or one will be created,\nwith the", + "operationId": "user_preferences_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreferencesInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PreferencesInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PreferencesInput" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedTaskList" + "$ref": "#/components/schemas/PreferencesInput" } } }, @@ -1866,30 +7584,23 @@ } ], "tags": [ - "task" + "user-preferences" ] } }, - "/api/tasks/v1/task/{slug}": { + "/api/insights/v1/weeklyreportautosubscribe/": { "get": { - "description": "View a list of tasks, or a single task", - "operationId": "task_retrieve", - "parameters": [ - { - "in": "path", - "name": "slug", - "required": true, - "schema": { - "type": "string" - } - } - ], + "description": "Show the user's current subscription status.\n\nThis shows the presence of a weekly report subscription by the user\nin this account.", + "operationId": "weeklyreportautosubscribe_list", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Task" + "items": { + "$ref": "#/components/schemas/AutoSubscribe" + }, + "type": "array" } } }, @@ -1902,46 +7613,38 @@ } ], "tags": [ - "task" + "weeklyreportautosubscribe" ] - } - }, - "/api/tasks/v1/task/{slug}/playbook": { - "get": { - "description": "Return the playbook for this task.\n\nPlaybook generally do not change per task.", - "operationId": "task_playbook_retrieve", - "parameters": [ - { - "in": "query", - "name": "format", - "schema": { - "enum": [ - "json", - "yaml" - ], - "type": "string" + }, + "post": { + "description": "Set the auto-subscription status of the current user to the supplied\n`is_auto_subscribed` value.\n\nIf 'is_auto_subscribed' is true, an auto-subscription is added if it doesn't\nalready exist. If it is false, the auto-subscription is removed if it\nexists.\n\nCheck if ENABLE_AUTOSUB enviroment variable is set to allow the method.", + "operationId": "weeklyreportautosubscribe_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoSubscribeInput" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/AutoSubscribeInput" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/AutoSubscribeInput" + } } }, - { - "in": "path", - "name": "slug", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Task" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/Task" + "$ref": "#/components/schemas/AutoSubscribe" } } }, @@ -1954,212 +7657,67 @@ } ], "tags": [ - "task" + "weeklyreportautosubscribe" ] } }, - "/api/tasks/v1/task/{slug}/systems": { + "/api/insights/v1/weeklyreportsubscription/": { "get": { - "description": "List all systems, with an extra 'requirements' field that is a list\nof reasons why the system cannot run this task. If that list is\nempty, the system can run this task; otherwise the reasons should be\ndisplayed.", - "operationId": "task_systems_list", - "parameters": [ - { - "in": "query", - "name": "all_systems", - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "description": "Display systems with this text in their display_name", - "in": "query", - "name": "display_name", - "schema": { - "type": "string" - } - }, - { - "description": "Are there systems which contain these SAP SIDs?", - "in": "query", - "name": "filter[system_profile][sap_sids][contains]", - "schema": { - "items": { - "format": "regex", - "pattern": "^[A-Z]..$", - "type": "string" - }, - "type": "array" - }, - "style": "form" - }, - { - "description": "Is this a SAP system?", - "in": "query", - "name": "filter[system_profile][sap_system]", - "schema": { - "type": "boolean" - } - }, - { - "description": "List of Inventory host group names", - "in": "query", - "name": "groups", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - }, - "style": "form" - }, - { - "description": "Number of results to return per page.", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "description": "The initial index from which to return the results.", - "in": "query", - "name": "offset", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "description": "Filter on both operating system name and version. A pipe separates the values. For Example: RHEL|7.9", - "in": "query", - "name": "operating_system", - "schema": { - "items": { - "type": "string" - }, - "type": "array" + "description": "Show the user's current subscription status.\n\nThis shows the presence of a weekly report subscription by the user\nin this account.", + "operationId": "weeklyreportsubscription_list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WeeklyReportSubscription" + }, + "type": "array" + } + } }, - "style": "form" - }, + "description": "" + } + }, + "security": [ { - "description": "Filter on these (short) operating system names", - "in": "query", - "name": "os_name", - "schema": { - "items": { - "type": "string" - }, - "type": "array" + "x-rh-identity": [] + } + ], + "tags": [ + "weeklyreportsubscription" + ] + }, + "post": { + "description": "Set the subscription status of the current user to the supplied\n`is_subscribed` value.\n\nIf 'is_subscribed' is true, a subscription is added if it doesn't\nalready exist. If it is false, the subscription is removed if it\nexists.", + "operationId": "weeklyreportsubscription_create", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WeeklyReportSubscription" + } }, - "style": "form" - }, - { - "description": "Display only systems with these OS versions", - "in": "query", - "name": "os_version", - "schema": { - "items": { - "enum": [ - "6.0", - "6.1", - "6.10", - "6.2", - "6.3", - "6.4", - "6.5", - "6.6", - "6.7", - "6.8", - "6.9", - "7.0", - "7.1", - "7.10", - "7.2", - "7.3", - "7.4", - "7.5", - "7.6", - "7.7", - "7.8", - "7.9", - "8.0", - "8.1", - "8.10", - "8.2", - "8.3", - "8.4", - "8.5", - "8.6", - "8.7", - "8.8", - "8.9", - "9.0", - "9.1", - "9.2", - "9.3", - "9.4", - "9.5" - ], - "type": "string" - }, - "type": "array" + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/WeeklyReportSubscription" + } }, - "style": "form" - }, - { - "in": "path", - "name": "slug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Sort systems by this field", - "in": "query", - "name": "sort", - "schema": { - "default": "display_name", - "enum": [ - "-display_name", - "-group_name", - "-last_seen", - "-os", - "-os_name", - "-os_version", - "display_name", - "group_name", - "last_seen", - "os", - "os_name", - "os_version" - ], - "type": "string" + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/WeeklyReportSubscription" + } } }, - { - "description": "Tags have a namespace, key and value in the form namespace/key=value", - "in": "query", - "name": "tags", - "schema": { - "items": { - "format": "regex", - "pattern": "^[^/=]+/[^/=]+=[^/=]+$", - "type": "string" - }, - "type": "array" - }, - "style": "form" - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedTaskHostList" + "$ref": "#/components/schemas/WeeklyReportSubscription" } } }, @@ -2172,7 +7730,7 @@ } ], "tags": [ - "task" + "weeklyreportsubscription" ] } }