From 444bf494ce0749fe5b8dcf619005572860824204 Mon Sep 17 00:00:00 2001 From: GitHub Date: Wed, 9 Oct 2024 00:09:17 +0000 Subject: [PATCH] Syncing API --- .../hcc-insights/automation-hub/content.json | 2 +- .../apis/hcc-insights/patch/content.json | 875 +++++++++++++++++- 2 files changed, 841 insertions(+), 36 deletions(-) diff --git a/packages/common/config/apis/hcc-insights/automation-hub/content.json b/packages/common/config/apis/hcc-insights/automation-hub/content.json index 45f011dd..385858ba 100644 --- a/packages/common/config/apis/hcc-insights/automation-hub/content.json +++ b/packages/common/config/apis/hcc-insights/automation-hub/content.json @@ -7936,7 +7936,7 @@ "Purge": { "properties": { "finished_before": { - "default": "2024-08-25", + "default": "2024-08-19", "description": "Purge tasks completed earlier than this timestamp. Format '%Y-%m-%d[T%H:%M:%S]'", "format": "date-time", "type": "string" diff --git a/packages/common/config/apis/hcc-insights/patch/content.json b/packages/common/config/apis/hcc-insights/patch/content.json index 3b0313ad..dd64af0d 100644 --- a/packages/common/config/apis/hcc-insights/patch/content.json +++ b/packages/common/config/apis/hcc-insights/patch/content.json @@ -5121,6 +5121,215 @@ "summary": "Show me details about a system packages by given inventory id" } }, + "/export/templates/{template_id}/systems": { + "get": { + "description": "Export systems applicable to a template. Export endpoints are not paginated.", + "operationId": "exportTemplateSystems", + "parameters": [ + { + "description": "Template ID", + "in": "path", + "name": "template_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Find matching text", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[display_name]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[os]", + "schema": { + "type": "string" + } + }, + { + "description": "Tag filter", + "explode": true, + "in": "query", + "name": "tags", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter systems by inventory groups", + "explode": true, + "in": "query", + "name": "filter[group_name]", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter only SAP systems", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by their SAP SIDs", + "explode": true, + "in": "query", + "name": "filter[system_profile][sap_sids]", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter systems by ansible", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by ansible version", + "in": "query", + "name": "filter[system_profile][ansible][controller_version]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by mssql version", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by mssql version", + "in": "query", + "name": "filter[system_profile][mssql][version]", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/controllers.TemplateSystemsDBLookup" + }, + "type": "array" + } + }, + "text/csv": { + "schema": { + "items": { + "$ref": "#/components/schemas/controllers.TemplateSystemsDBLookup" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "415": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Unsupported Media Type" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Export systems belonging to a template" + } + }, "/ids/advisories": { "get": { "description": "Show me all applicable advisories for all my systems", @@ -6628,11 +6837,20 @@ "summary": "Show me advisories for a system by given inventory id" } }, - "/packages/": { + "/ids/templates/{template_id}/systems": { "get": { - "description": "Show me all installed packages across my systems", - "operationId": "listPackages", + "description": "Show me all systems applicable to a template", + "operationId": "listTemplateSystemsIds", "parameters": [ + { + "description": "Template ID", + "in": "path", + "name": "template_id", + "required": true, + "schema": { + "type": "string" + } + }, { "description": "Limit for paging", "in": "query", @@ -6656,10 +6874,17 @@ "schema": { "enum": [ "id", - "name", - "systems_installed", - "systems_installable", - "systems_applicable" + "display_name", + "os", + "installable_rhsa_count", + "installable_rhba_count", + "installable_rhea_count", + "installable_other_count", + "applicable_rhsa_count", + "applicable_rhba_count", + "applicable_rhea_count", + "applicable_other_count", + "last_upload" ], "type": "string" } @@ -6675,31 +6900,7 @@ { "description": "Filter", "in": "query", - "name": "filter[name]", - "schema": { - "type": "string" - } - }, - { - "description": "Filter", - "in": "query", - "name": "filter[systems_installed]", - "schema": { - "type": "string" - } - }, - { - "description": "Filter", - "in": "query", - "name": "filter[systems_installable]", - "schema": { - "type": "string" - } - }, - { - "description": "Filter", - "in": "query", - "name": "filter[systems_applicable]", + "name": "filter[display_name]", "schema": { "type": "string" } @@ -6707,7 +6908,7 @@ { "description": "Filter", "in": "query", - "name": "filter[summary]", + "name": "filter[os]", "schema": { "type": "string" } @@ -6724,8 +6925,156 @@ "type": "array" }, "style": "form" - }, - { + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.IDsPlainResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Show me all systems belonging to a template" + } + }, + "/packages/": { + "get": { + "description": "Show me all installed packages across my systems", + "operationId": "listPackages", + "parameters": [ + { + "description": "Limit for paging", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + }, + { + "description": "Offset for paging", + "in": "query", + "name": "offset", + "schema": { + "type": "integer" + } + }, + { + "description": "Sort field", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "id", + "name", + "systems_installed", + "systems_installable", + "systems_applicable" + ], + "type": "string" + } + }, + { + "description": "Find matching text", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[name]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[systems_installed]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[systems_installable]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[systems_applicable]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[summary]", + "schema": { + "type": "string" + } + }, + { + "description": "Tag filter", + "explode": true, + "in": "query", + "name": "tags", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { "description": "Filter systems by inventory groups", "explode": true, "in": "query", @@ -8230,6 +8579,462 @@ "summary": "Show me systems tags applicable to this application" } }, + "/templates": { + "get": { + "description": "Show all templates for an account", + "operationId": "listTemplate", + "parameters": [ + { + "description": "Limit for paging", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + }, + { + "description": "Offset for paging", + "in": "query", + "name": "offset", + "schema": { + "type": "integer" + } + }, + { + "description": "Sort field", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "id", + "name", + "systems", + "published", + "last_edited" + ], + "type": "string" + } + }, + { + "description": "Find matching text", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Filter ", + "in": "query", + "name": "filter[id]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[name]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[systems]", + "schema": { + "type": "string" + } + }, + { + "description": "Tag filter", + "explode": true, + "in": "query", + "name": "tags", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.TemplatesResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Show all templates for an account" + } + }, + "/templates/systems": { + "delete": { + "description": "Remove systems from template", + "operationId": "removeTemplateSystems", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.TemplateSystemsUpdateRequest" + } + } + }, + "description": "Request body", + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Remove systems from template", + "x-codegen-request-body-name": "body" + } + }, + "/templates/{template_id}/systems": { + "get": { + "description": "Show me all systems applicable to a template", + "operationId": "listTemplateSystems", + "parameters": [ + { + "description": "Template ID", + "in": "path", + "name": "template_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Limit for paging", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + }, + { + "description": "Offset for paging", + "in": "query", + "name": "offset", + "schema": { + "type": "integer" + } + }, + { + "description": "Sort field", + "in": "query", + "name": "sort", + "schema": { + "enum": [ + "id", + "display_name", + "os", + "installable_rhsa_count", + "installable_rhba_count", + "installable_rhea_count", + "installable_other_count", + "applicable_rhsa_count", + "applicable_rhba_count", + "applicable_rhea_count", + "applicable_other_count", + "last_upload", + "groups" + ], + "type": "string" + } + }, + { + "description": "Find matching text", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[display_name]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter", + "in": "query", + "name": "filter[os]", + "schema": { + "type": "string" + } + }, + { + "description": "Tag filter", + "explode": true, + "in": "query", + "name": "tags", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter systems by inventory groups", + "explode": true, + "in": "query", + "name": "filter[group_name]", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter only SAP systems", + "in": "query", + "name": "filter[system_profile][sap_system]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by their SAP SIDs", + "explode": true, + "in": "query", + "name": "filter[system_profile][sap_sids]", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Filter systems by ansible", + "in": "query", + "name": "filter[system_profile][ansible]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by ansible version", + "in": "query", + "name": "filter[system_profile][ansible][controller_version]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by mssql version", + "in": "query", + "name": "filter[system_profile][mssql]", + "schema": { + "type": "string" + } + }, + { + "description": "Filter systems by mssql version", + "in": "query", + "name": "filter[system_profile][mssql][version]", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.TemplateSystemsResponse" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Show me all systems belonging to a template" + }, + "put": { + "description": "Add systems to a template", + "operationId": "updateTemplateSystems", + "parameters": [ + { + "description": "Template ID", + "in": "path", + "name": "template_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.TemplateSystemsUpdateRequest" + } + } + }, + "description": "Request body", + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/utils.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "security": [ + { + "RhIdentity": [] + } + ], + "summary": "Add systems to a template", + "x-codegen-request-body-name": "body" + } + }, "/views/advisories/systems": { "post": { "description": "View advisory-system pairs for selected systems and installable advisories",