From a1337a09e655d80968f45782e9bc5009b31b7a5c Mon Sep 17 00:00:00 2001 From: michal-dagan <109464765+michal-dagan@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:07:32 +0200 Subject: [PATCH] Deprecate demisto-api-* commands (#31388) * deprecate all the demisto-api-* commands. Replace their usage in OOB scripts and playbooks. * pre-commit * update rn * demisto-sdk format * demisto-sdk format + update rn * format * fixed Mypy and Pylint errors * Bump pack from version CommonScripts to 1.12.57. * updated dockers * validation fixes * validation fixes * updated rn dockers * updated rn 1_3_41.md * updated rn+integration name * updated rn+bc * fixed * fixed * Bump pack from version CommonScripts to 1.12.58. * fixed * fixed * fixed * Bump pack from version CommonScripts to 1.13.1. * cr updates * cr updates * fixed * Bump pack from version DeveloperTools to 1.3.7. * Bump pack from version CommonScripts to 1.13.2. * Bump pack from version CommonScripts to 1.13.6. * Bump pack from version CommonScripts to 1.13.7. * Bump pack from version CommonPlaybooks to 2.4.42. * fixed * fixed * changed to test_data * fixed * Bump pack from version CommonScripts to 1.13.9. * Bump pack from version CommonPlaybooks to 2.4.43. * Bump pack from version DeveloperTools to 1.3.8. --------- Co-authored-by: Content Bot --- .../Playbooks/playbook-Dedup_-_Generic_v2.yml | 6 +- .../Playbooks/playbook-Dedup_-_Generic_v3.yml | 6 +- .../CommonPlaybooks/ReleaseNotes/2_4_43.json | 4 + Packs/CommonPlaybooks/ReleaseNotes/2_4_43.md | 9 ++ Packs/CommonPlaybooks/pack_metadata.json | 2 +- Packs/CommonScripts/ReleaseNotes/1_13_9.json | 4 + Packs/CommonScripts/ReleaseNotes/1_13_9.md | 33 +++++++ .../ContentPackInstaller.py | 22 ++--- .../ContentPackInstaller.yml | 2 +- .../EditServerConfig/EditServerConfig.py | 8 +- .../EditServerConfig/EditServerConfig.yml | 2 +- .../ExportAuditLogsToFile.py | 8 +- .../ExportAuditLogsToFile.yml | 6 +- .../ExportAuditLogsToFile_test.py | 2 +- .../Scripts/ExportAuditLogsToFile/README.md | 9 +- .../ExportIncidentsToCSV.py | 6 +- .../ExportIncidentsToCSV.yml | 6 +- .../Scripts/ExportIncidentsToCSV/README.md | 11 ++- .../ExportIndicatorsToCSV.py | 6 +- .../ExportIndicatorsToCSV.yml | 6 +- .../Scripts/ExportIndicatorsToCSV/README.md | 11 ++- .../GenerateAsBuilt/GenerateAsBuilt.py | 7 +- .../GetFieldsByIncidentType.py | 2 +- .../GetFieldsByIncidentType.yml | 2 +- .../GetFieldsByIncidentType_test.py | 6 +- .../Scripts/IncidentFields/IncidentFields.py | 2 +- .../Scripts/IncidentFields/IncidentFields.yml | 2 +- .../IncidentFields/IncidentFields_test.py | 8 +- .../Scripts/IncidentFields/README.md | 12 ++- .../ListUsedDockerImages_test.py | 2 +- .../ProvidesCommand/ProvidesCommand.py | 4 +- .../ProvidesCommand/ProvidesCommand.yml | 6 +- .../ProvidesCommand/ProvidesCommand_test.py | 8 +- .../Scripts/ProvidesCommand/README.md | 12 ++- .../playbook-EditServerConfig-Test.yml | 24 +++-- Packs/CommonScripts/pack_metadata.json | 2 +- .../ReleaseNotes/1_1_3.json | 4 + .../ReleaseNotes/1_1_3.md | 26 ++++++ .../CreateEDLInstance/CreateEDLInstance.py | 2 +- .../CreateEDLInstance/CreateEDLInstance.yml | 10 +-- .../Scripts/CreatePlbkDoc/CreatePlbkDoc.py | 14 +-- .../Scripts/CreatePlbkDoc/CreatePlbkDoc.yml | 4 +- .../Scripts/CreatePlbkDoc/README.md | 2 +- .../DeleteIncidentsByQuery.py | 6 +- .../DeleteIncidentsByQuery.yml | 4 +- .../RemoveEmptyEvidence.py | 4 +- .../RemoveEmptyEvidence.yml | 4 +- .../RetrievePlaybookDependencies.py | 34 +++---- .../RetrievePlaybookDependencies.yml | 2 +- .../RetrievePlaybooksAndIntegrations.py | 2 +- .../CommunityCommonScripts/pack_metadata.json | 2 +- .../playbook-Configuration_Setup.yml | 2 +- .../playbook-Configuration_Setup_README.md | 2 +- .../ReleaseNotes/1_2_15.json | 4 + .../ContentManagement/ReleaseNotes/1_2_15.md | 24 +++++ .../CustomPackInstaller.py | 2 +- .../CustomPackInstaller.yml | 2 +- .../Scripts/DeleteContent/DeleteContent.py | 90 +++++++++---------- .../Scripts/DeleteContent/DeleteContent.yml | 8 +- .../DeleteContent/DeleteContent_test.py | 62 ++++++------- .../Scripts/JobCreator/JobCreator.py | 6 +- .../Scripts/JobCreator/JobCreator.yml | 2 +- .../MarketplacePackInstaller.py | 8 +- Packs/ContentManagement/pack_metadata.json | 2 +- Packs/ContentTesting/ReleaseNotes/2_1_2.json | 4 + Packs/ContentTesting/ReleaseNotes/2_1_2.md | 39 ++++++++ .../Scripts/ChangeHistory/ChangeHistory.py | 13 ++- .../Scripts/ChangeHistory/ChangeHistory.yml | 2 +- .../ContentDependencies.py | 45 +++++----- .../ContentDependencies.yml | 12 +-- .../ListPlaybookAutomationsCommands.py | 18 ++-- .../ListPlaybookAutomationsCommands.yml | 6 +- .../Scripts/UnitTest/UnitTest.py | 43 +++++---- .../Scripts/UnitTest/UnitTest.yml | 12 +-- .../UnitTestCoverage/UnitTestCoverage.py | 10 +-- .../UnitTestCoverage/UnitTestCoverage.yml | 2 +- .../UnitTestPlaybookAnalyzer.py | 12 +-- .../UnitTestPlaybookAnalyzer.yml | 12 +-- .../UnitTestSaveContextList.py | 2 +- .../UnitTestSaveContextList.yml | 4 +- .../UnitTestSaveFieldsList.py | 2 +- .../UnitTestSaveFieldsList.yml | 4 +- .../Scripts/UpgradeCheck/UpgradeCheck.py | 42 +++++---- .../Scripts/UpgradeCheck/UpgradeCheck.yml | 8 +- Packs/ContentTesting/pack_metadata.json | 2 +- .../Integrations/CoreRESTAPI/CoreRESTAPI.yml | 24 +++-- Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.json | 4 + Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.md | 52 +++++++++++ .../DemistoCreateList/DemistoCreateList.js | 2 +- .../DemistoCreateList/DemistoCreateList.yml | 10 +-- .../Scripts/DemistoCreateList/README.md | 7 +- .../DemistoGetIncidentTasksByState.js | 2 +- .../DemistoLeaveAllInvestigations.js | 2 +- .../DemistoLeaveAllInvestigations.yml | 2 +- .../DemistoLeaveAllInvestigations/README.md | 10 ++- .../DemistoLinkIncidents.js | 2 +- .../DemistoLinkIncidents.yml | 10 +-- .../Scripts/DemistoLinkIncidents/README.md | 7 +- .../DemistoLogsBundle/DemistoLogsBundle.js | 2 +- .../DemistoLogsBundle/DemistoLogsBundle.yml | 2 +- .../Scripts/DemistoLogsBundle/README.md | 7 +- .../DemistoSendInvite/DemistoSendInvite.js | 4 +- .../DemistoSendInvite/DemistoSendInvite.yml | 8 +- .../Scripts/DemistoSendInvite/README.md | 9 +- .../DemistoUploadFile/DemistoUploadFile.js | 2 +- .../DemistoUploadFile/DemistoUploadFile.yml | 8 +- .../Scripts/DemistoUploadFile/README.md | 8 +- .../DemistoUploadFileV2.py | 2 +- .../DemistoUploadFileV2.yml | 12 +-- .../DemistoUploadFileV2_test.py | 20 ++--- .../Scripts/DemistoUploadFileV2/README.md | 8 +- .../GetIncidentTasksByState.js | 2 +- .../Scripts/UploadFile/README.md | 8 +- .../Scripts/UploadFile/UploadFile.py | 5 +- .../Scripts/UploadFile/UploadFile.yml | 12 +-- .../Scripts/UploadFile/UploadFile_test.py | 20 ++--- .../script-DemistoUploadFileToIncident.yml | 12 +-- ...ript-DemistoUploadFileToIncident_README.md | 7 +- .../playbook-DemistoUploadFileV2-test.yml | 6 +- .../playbook-TestDemistoRestAPI_Test.yml | 7 +- Packs/DemistoRESTAPI/pack_metadata.json | 2 +- Packs/DeveloperTools/ReleaseNotes/1_3_8.json | 4 + Packs/DeveloperTools/ReleaseNotes/1_3_8.md | 6 ++ .../VerifyIntegrationHealth.py | 8 +- .../VerifyIntegrationHealth.yml | 2 +- .../playbook-Fetch_Incidents_Test.yml | 13 +-- .../playbook-Fetch_Indicators_Test.yml | 10 ++- Packs/DeveloperTools/pack_metadata.json | 2 +- .../ReleaseNotes/2_0_17.json | 4 + .../EmailCommunication/ReleaseNotes/2_0_17.md | 6 ++ .../Scripts/SendEmailReply/SendEmailReply.py | 4 +- Packs/EmailCommunication/pack_metadata.json | 2 +- .../ReleaseNotes/1_0_2.json | 4 + .../ReleaseNotes/1_0_2.md | 7 ++ .../ForwardAuditLogsToSplunkHEC.py | 2 +- .../ForwardAuditLogsToSplunkHEC.yml | 4 +- .../ForwardAuditLogsToSplunkHEC_test.py | 2 +- .../ForwardAuditLogsToSplunkHEC/README.md | 2 +- .../pack_metadata.json | 2 +- .../Health_Check_-_Collect_Log_Bundle.yml | 4 +- ...ealth_Check_-_Collect_Log_Bundle_README.md | 10 ++- Packs/HealthCheck/README.md | 6 +- Packs/HealthCheck/ReleaseNotes/2_0_14.json | 4 + Packs/HealthCheck/ReleaseNotes/2_0_14.md | 85 ++++++++++++++++++ .../HealthCheckAPIvalidation.py | 8 +- .../HealthCheckAPIvalidation.yml | 2 +- .../Scripts/HealthCheckCPU/HealthCheckCPU.py | 2 +- .../Scripts/HealthCheckCPU/HealthCheckCPU.yml | 2 +- .../HealthCheckCommonIndicators.py | 2 +- .../HealthCheckCommonIndicators.yml | 4 +- .../HealthCheckContainersStatus.py | 2 +- .../HealthCheckContainersStatus.yml | 6 +- .../HealthCheckDiskUsage.py | 3 +- .../HealthCheckDiskUsage.yml | 2 +- .../HealthCheckDiskUsageLine.py | 4 +- .../HealthCheckDiskUsageLine.yml | 4 +- .../HealthCheckFields/HealthCheckFields.py | 12 ++- .../HealthCheckFields/HealthCheckFields.yml | 4 +- .../HealthCheckIncidentTypes.py | 2 +- .../HealthCheckIncidentTypes.yml | 4 +- .../HealthCheckIncidentsCreatedDaily.py | 2 +- .../HealthCheckIncidentsCreatedDaily.yml | 4 +- .../HealthCheckIncidentsCreatedMonthly.py | 2 +- .../HealthCheckIncidentsCreatedMonthly.yml | 4 +- .../HealthCheckIncidentsCreatedWeekly.py | 2 +- .../HealthCheckIncidentsCreatedWeekly.yml | 4 +- .../HealthCheckInstalledPacks.py | 2 +- .../HealthCheckInstalledPacks.yml | 6 +- .../HealthCheckIntegrations.py | 2 +- .../HealthCheckIntegrations.yml | 4 +- .../HealthCheckMemory/HealthCheckMemory.py | 7 +- .../HealthCheckMemory/HealthCheckMemory.yml | 4 +- .../HealthCheckNumberOfDroppedIncidents.py | 2 +- .../HealthCheckNumberOfDroppedIncidents.yml | 10 +-- .../HealthCheckPlaybookAnalysis.py | 10 +-- .../HealthCheckPlaybookAnalysis.yml | 8 +- .../HealthCheckServerConfiguration.py | 2 +- .../HealthCheckServerConfiguration.yml | 6 +- .../HealthCheckSystemDiagnostics.py | 16 ++-- .../HealthCheckSystemDiagnostics.yml | 4 +- .../HealthCheckWorkers/HealthCheckWorkers.py | 6 +- .../HealthCheckWorkers/HealthCheckWorkers.yml | 8 +- Packs/HealthCheck/pack_metadata.json | 2 +- .../ReleaseNotes/1_3_16.json | 4 + .../ReleaseNotes/1_3_16.md | 11 +++ .../Scripts/GetFailedTasks/GetFailedTasks.py | 19 ++-- .../Scripts/GetFailedTasks/GetFailedTasks.yml | 4 +- .../GetFailedTasks/GetFailedTasks_test.py | 9 +- .../GetFailedTasks/test_data/constants.py | 10 +-- ...grationsCheck_Widget_NumberChecked_test.py | 2 +- .../Scripts/RestartFailedTasks/README.md | 8 +- .../RestartFailedTasks/RestartFailedTasks.py | 2 +- .../RestartFailedTasks/RestartFailedTasks.yml | 22 ++--- .../pack_metadata.json | 2 +- .../MobileIronCLOUD_description.md | 4 +- .../Integrations/MobileIronCLOUD/README.md | 32 ++++++- .../MobileIronCORE_description.md | 4 +- .../Integrations/MobileIronCORE/README.md | 50 ++++++++++- Packs/MobileIronUEM/ReleaseNotes/1_0_14.json | 4 + Packs/MobileIronUEM/ReleaseNotes/1_0_14.md | 9 ++ Packs/MobileIronUEM/pack_metadata.json | 2 +- ...ks_-_Endpoint_Malware_Investigation_v3.yml | 2 +- .../ReleaseNotes/1_3_21.json | 4 + .../ReleaseNotes/1_3_21.md | 4 + .../pack_metadata.json | 2 +- .../playbook-SymantecEDR_Test.yml | 2 +- Packs/Tidy/TestPlaybooks/Tidy_-_Test.yml | 23 ++--- ...ng_Layout-Integration_Troubleshooting.json | 2 +- ...container-Integration_Troubleshooting.json | 2 +- .../playbook-Integration_Troubleshooting.yml | 31 +++---- ...book-Integration_Troubleshooting_README.md | 47 ++++++++++ Packs/Troubleshoot/README.md | 2 +- Packs/Troubleshoot/ReleaseNotes/2_0_13.json | 4 + Packs/Troubleshoot/ReleaseNotes/2_0_13.md | 29 ++++++ .../TroubleshootGetInstanceParameters.py | 11 ++- .../TroubleshootGetInstanceParameters.yml | 4 +- .../TroubleshootIsDockerImageExists.py | 2 +- .../TroubleshootIsDockerImageExists.yml | 4 +- .../TroubleshootTestInstance.py | 6 +- .../TroubleshootTestInstance.yml | 7 +- Packs/Troubleshoot/pack_metadata.json | 2 +- .../Playbooks/Use_Case_Builder.yml | 4 +- .../Use_Case_Builder/ReleaseNotes/1_0_5.json | 4 + Packs/Use_Case_Builder/ReleaseNotes/1_0_5.md | 14 +++ .../UseCasePlaybookAutoGenerator.py | 2 +- .../UseCasePlaybookAutoGenerator.yml | 2 +- Packs/Use_Case_Builder/pack_metadata.json | 4 +- ...XSOAR_-_Export_Selected_Custom_Content.yml | 6 +- ...-_Export_Selected_Custom_Content_README.md | 4 +- ...ybook-JOB_-_XSOAR_-_Simple_Dev_to_Prod.yml | 30 +++---- ...JOB_-_XSOAR_-_Simple_Dev_to_Prod_README.md | 8 +- Packs/XSOAR-SimpleDevToProd/README.md | 6 +- .../ReleaseNotes/1_0_7.json | 4 + .../ReleaseNotes/1_0_7.md | 9 ++ .../XSOAR-SimpleDevToProd/pack_metadata.json | 2 +- ...laybook-Check_For_Content_Installation.yml | 15 ++-- ...k-Check_For_Content_Installation_README.md | 9 +- .../playbook-Content_Update_Check.yml | 43 +++------ .../playbook-Content_Update_Check_README.md | 9 +- .../playbook-Content_Update_Manager.yml | 64 +++++-------- .../playbook-Content_Update_Manager_README.md | 15 +++- .../ReleaseNotes/1_0_7.json | 4 + .../ReleaseNotes/1_0_7.md | 19 ++++ .../ListInstalledContentPacks.py | 4 +- .../ListInstalledContentPacks.yml | 10 +-- .../ListInstalledContentPacks/README.md | 8 +- .../pack_metadata.json | 2 +- 247 files changed, 1444 insertions(+), 821 deletions(-) create mode 100644 Packs/CommonPlaybooks/ReleaseNotes/2_4_43.json create mode 100644 Packs/CommonPlaybooks/ReleaseNotes/2_4_43.md create mode 100644 Packs/CommonScripts/ReleaseNotes/1_13_9.json create mode 100644 Packs/CommonScripts/ReleaseNotes/1_13_9.md create mode 100644 Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.json create mode 100644 Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.md create mode 100644 Packs/ContentManagement/ReleaseNotes/1_2_15.json create mode 100644 Packs/ContentManagement/ReleaseNotes/1_2_15.md create mode 100644 Packs/ContentTesting/ReleaseNotes/2_1_2.json create mode 100644 Packs/ContentTesting/ReleaseNotes/2_1_2.md create mode 100644 Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.json create mode 100644 Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.md create mode 100644 Packs/DeveloperTools/ReleaseNotes/1_3_8.json create mode 100644 Packs/DeveloperTools/ReleaseNotes/1_3_8.md create mode 100644 Packs/EmailCommunication/ReleaseNotes/2_0_17.json create mode 100644 Packs/EmailCommunication/ReleaseNotes/2_0_17.md create mode 100644 Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.json create mode 100644 Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.md create mode 100644 Packs/HealthCheck/ReleaseNotes/2_0_14.json create mode 100644 Packs/HealthCheck/ReleaseNotes/2_0_14.md create mode 100644 Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.json create mode 100644 Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.md create mode 100644 Packs/MobileIronUEM/ReleaseNotes/1_0_14.json create mode 100644 Packs/MobileIronUEM/ReleaseNotes/1_0_14.md create mode 100644 Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.json create mode 100644 Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.md create mode 100644 Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting_README.md create mode 100644 Packs/Troubleshoot/ReleaseNotes/2_0_13.json create mode 100644 Packs/Troubleshoot/ReleaseNotes/2_0_13.md create mode 100644 Packs/Use_Case_Builder/ReleaseNotes/1_0_5.json create mode 100644 Packs/Use_Case_Builder/ReleaseNotes/1_0_5.md create mode 100644 Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.json create mode 100644 Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.md create mode 100644 Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.json create mode 100644 Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.md diff --git a/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v2.yml b/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v2.yml index 1dacfbd3701c..ae527ba751a2 100644 --- a/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v2.yml +++ b/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v2.yml @@ -537,8 +537,8 @@ tasks: task: id: 04d3848d-57da-47ab-827d-8950c9063c32 version: -1 - name: Is Demisto REST API enabled? - description: Checks whether the Demisto REST API integration is enabled. + name: Is Core REST API enabled? + description: Checks whether the Core REST API integration is enabled. type: condition iscommand: false brand: "" @@ -564,7 +564,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API - - operator: isEqualString left: value: diff --git a/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v3.yml b/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v3.yml index db42506f24c4..633f4848fcf3 100644 --- a/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v3.yml +++ b/Packs/CommonPlaybooks/Playbooks/playbook-Dedup_-_Generic_v3.yml @@ -495,8 +495,8 @@ tasks: task: id: 04d3848d-57da-47ab-827d-8950c9063c32 version: -1 - name: Is Demisto REST API enabled? - description: Checks whether the Demisto REST API integration is enabled. + name: Is Core REST API enabled? + description: Checks whether the Core REST API integration is enabled. type: condition iscommand: false brand: "" @@ -522,7 +522,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API - - operator: isEqualString left: value: diff --git a/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.json b/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.md b/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.md new file mode 100644 index 000000000000..a6585e110229 --- /dev/null +++ b/Packs/CommonPlaybooks/ReleaseNotes/2_4_43.md @@ -0,0 +1,9 @@ + +#### Playbooks + +##### Dedup - Generic v2 + +Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. +##### Dedup - Generic v3 + +Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. diff --git a/Packs/CommonPlaybooks/pack_metadata.json b/Packs/CommonPlaybooks/pack_metadata.json index e2d2cdea9579..646de06180d9 100644 --- a/Packs/CommonPlaybooks/pack_metadata.json +++ b/Packs/CommonPlaybooks/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Common Playbooks", "description": "Frequently used playbooks pack.", "support": "xsoar", - "currentVersion": "2.4.42", + "currentVersion": "2.4.43", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CommonScripts/ReleaseNotes/1_13_9.json b/Packs/CommonScripts/ReleaseNotes/1_13_9.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/CommonScripts/ReleaseNotes/1_13_9.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/CommonScripts/ReleaseNotes/1_13_9.md b/Packs/CommonScripts/ReleaseNotes/1_13_9.md new file mode 100644 index 000000000000..089f84563fc9 --- /dev/null +++ b/Packs/CommonScripts/ReleaseNotes/1_13_9.md @@ -0,0 +1,33 @@ + +#### Scripts + +##### IncidentFields + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ExportIndicatorsToCSV + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ExportIncidentsToCSV + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### GetFieldsByIncidentType + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### EditServerConfig + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### GenerateAsBuilt + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ExportAuditLogsToFile + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ContentPackInstaller + +- Updated the Docker image to: *demisto/xsoar-tools:1.0.0.83431*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ProvidesCommand + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.py b/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.py index 66edb8ccee95..a48eb0d84bda 100644 --- a/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.py +++ b/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.py @@ -1,7 +1,7 @@ import demistomock as demisto from CommonServerPython import * -from packaging.version import parse, Version, LegacyVersion +from packaging.version import parse, Version SCRIPT_NAME = 'ContentPackInstaller' @@ -12,12 +12,12 @@ class ContentPackInstaller: PACK_ID_VERSION_FORMAT = '{}::{}' def __init__(self, instance_name: str = None): - self.installed_packs: Dict[str, Union[Version, LegacyVersion]] = dict() - self.newly_installed_packs: Dict[str, Version] = dict() - self.already_on_machine_packs: Dict[str, Union[Version, LegacyVersion]] = dict() - self.packs_data: Dict[str, Dict[str, str]] = dict() - self.packs_dependencies: Dict[str, Dict[str, Dict[str, str]]] = dict() - self.packs_failed: Dict[str, str] = dict() + self.installed_packs: Dict[str, Version] = {} + self.newly_installed_packs: Dict[str, Version] = {} + self.already_on_machine_packs: Dict[str, Version] = {} + self.packs_data: Dict[str, Dict[str, str]] = {} + self.packs_dependencies: Dict[str, Dict[str, Dict[str, str]]] = {} + self.packs_failed: Dict[str, str] = {} self.instance_name: Optional[str] = instance_name self.get_installed_packs() @@ -33,7 +33,7 @@ def get_installed_packs(self) -> None: args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-get', + 'core-api-get', args, fail_on_error=False, ) @@ -73,7 +73,7 @@ def get_pack_data_from_marketplace(self, pack_id: str) -> Dict[str, str]: args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-get', + 'core-api-get', args, fail_on_error=False, ) @@ -111,7 +111,7 @@ def get_pack_dependencies_from_marketplace(self, pack_data: Dict[str, str]) -> D args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-post', + 'core-api-post', args, fail_on_error=False, ) @@ -186,7 +186,7 @@ def install_packs(self, packs_to_install: List[Dict[str, str]]) -> None: args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-install-packs', + 'core-api-install-packs', args, fail_on_error=False, ) diff --git a/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.yml b/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.yml index 2b348edc0997..2f4c2408290a 100644 --- a/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.yml +++ b/Packs/CommonScripts/Scripts/ContentPackInstaller/ContentPackInstaller.yml @@ -38,7 +38,7 @@ tags: - Content Management timeout: 600ns type: python -dockerimage: demisto/xsoar-tools:1.0.0.46482 +dockerimage: demisto/xsoar-tools:1.0.0.83431 tests: - ContentPackInstaller_Test fromversion: 6.0.0 diff --git a/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.py b/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.py index 6e63af6b7955..f0c2f0839272 100644 --- a/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.py +++ b/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.py @@ -1,6 +1,6 @@ from CommonServerPython import * -from typing import Dict, Any +from typing import Any import traceback SERVER_SYSTEM_CONFIG_PATH = '/system/config' @@ -8,14 +8,14 @@ def get_current_server_config() -> dict: - res = execute_command("demisto-api-get", {"uri": SERVER_SYSTEM_CONFIG_PATH}) + res = execute_command("core-api-get", {"uri": SERVER_SYSTEM_CONFIG_PATH}) config_json = res['response'] return config_json.get('sysConf', {}) def set_system_config(server_config: dict): execute_command( - "demisto-api-post", + "core-api-post", { "uri": SERVER_SYSTEM_CONFIG_PATH, "body": {"data": server_config, @@ -37,7 +37,7 @@ def update_server_config(key: str, value: str, server_config: dict): set_system_config(server_config) -def edit_server_config(args: Dict[str, Any]) -> CommandResults: +def edit_server_config(args: dict[str, Any]) -> CommandResults: action = args.get('action', "") key = args.get('key', "") value = args.get('value', "") diff --git a/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.yml b/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.yml index 17c5066921ee..ec3b16197f02 100644 --- a/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.yml +++ b/Packs/CommonScripts/Scripts/EditServerConfig/EditServerConfig.yml @@ -20,7 +20,7 @@ script: '-' timeout: '0' type: python subtype: python3 -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 fromversion: 6.0.0 tests: - TestEditServerConfig diff --git a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.py b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.py index 9ff021e6dbc5..5bec8c862fbd 100644 --- a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.py +++ b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.py @@ -68,8 +68,8 @@ def main(): # pragma: no cover } args = {"uri": uri, "body": body} - res = demisto.executeCommand("demisto-api-post", args) - demisto.debug(f'demisto-api-post with {args} returned {res}') + res = demisto.executeCommand("core-api-post", args) + demisto.debug(f'core-api-post with {args} returned {res}') if is_error(res): raise DemistoException(f'error occurred when trying to retrieve the audit logs using {args=}, error: {res}') @@ -87,8 +87,8 @@ def main(): # pragma: no cover else: # pagination for xsoar-8 body["request_data"]["search_from"] = page_num # type: ignore[index] args = {"uri": uri, "body": body} - res = demisto.executeCommand("demisto-api-post", args) - demisto.debug(f'demisto-api-post with {args} returned {res}') + res = demisto.executeCommand("core-api-post", args) + demisto.debug(f'core-api-post with {args} returned {res}') if is_error(res): raise DemistoException(f'error occurred when trying to retrieve the audit logs using {args=}, error: {res}') response = res[0]["Contents"]["response"] diff --git a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.yml b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.yml index 1fa956b541ee..c1e6c4698f19 100644 --- a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.yml +++ b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile.yml @@ -15,7 +15,7 @@ args: predefined: - csv - json -comment: Uses the Demisto REST API integration to query the server audit trail logs, and return back a CSV or JSON file. +comment: Uses the Core REST API integration to query the server audit trail logs, and return back a CSV or JSON file. commonfields: id: ExportAuditLogsToFile version: -1 @@ -24,8 +24,8 @@ contentitemexportablefields: fromServerVersion: "" dependson: must: - - demisto-api-post -dockerimage: demisto/python3:3.10.13.74666 + - core-api-post +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ExportAuditLogsToFile runas: DBotWeakRole diff --git a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile_test.py b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile_test.py index 6bd4a4401c83..49b713c6c921 100644 --- a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile_test.py +++ b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/ExportAuditLogsToFile_test.py @@ -8,7 +8,7 @@ def execute_command_side_effect(command: str, args: Dict): if command == "splunk-submit-event-hec": return [{'Contents': {'response': ["result1"]}}] - if command == "demisto-api-post": + if command == "core-api-post": if args["uri"] == '/settings/audits': return [{'Contents': {'response': {'total': 2, "audits": ["audit1", "audit2"]}}, "Type": entryTypes["note"]}] return [{'Contents': {'response': {'total': 2, "reply": {"data": ["audit1", "audit2"]}}}, "Type": entryTypes["note"]}] diff --git a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/README.md b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/README.md index b9b0ffbde2e1..035bd8a9a9ca 100644 --- a/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/README.md +++ b/Packs/CommonScripts/Scripts/ExportAuditLogsToFile/README.md @@ -1,6 +1,7 @@ -Uses the Demisto REST API integration to query the server audit trail logs, and return back a CSV or JSON file. +Uses the Core REST API integration to query the server audit trail logs, and return back a CSV or JSON file. ## Script Data + --- | **Name** | **Description** | @@ -9,11 +10,14 @@ Uses the Demisto REST API integration to query the server audit trail logs, and | Tags | Utility | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post + +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -22,5 +26,6 @@ This script uses the following commands and scripts. | output | Type of File to return, either JSON, or CSV | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.py b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.py index 20d9ecd33e59..1e659b9633d7 100644 --- a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.py +++ b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.py @@ -30,11 +30,11 @@ def main(): } # generate the file - res = demisto.executeCommand("demisto-api-post", {"uri": "/incident/batch/exportToCsv", - "body": incident_body})[0]["Contents"]["response"] + res = demisto.executeCommand("core-api-post", {"uri": "/incident/batch/exportToCsv", + "body": incident_body})[0]["Contents"]["response"] # download the file and return to the war room - file = demisto.executeCommand("demisto-api-get", {"uri": f"/incident/csv/{res}"})[0]["Contents"]["response"] + file = demisto.executeCommand("core-api-get", {"uri": f"/incident/csv/{res}"})[0]["Contents"]["response"] demisto.results(fileResult(res, file)) diff --git a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.yml b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.yml index a88a7b9abec6..ae583b97bb25 100644 --- a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.yml +++ b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/ExportIncidentsToCSV.yml @@ -7,7 +7,7 @@ args: name: fetchdays - description: 'Comma separated list of columns (fields) for the CSV. (Default is: id,name,type,severity,status,owner,roles,playbookId,occurred,created,modified,closed).' name: columns -comment: This automation uses the Demisto REST API Integration to batch export Incidents to CSV and return the resulting CSV file to the war room. +comment: This automation uses the Core REST API Integration to batch export Incidents to CSV and return the resulting CSV file to the war room. commonfields: id: ExportIncidentsToCSV version: -1 @@ -16,8 +16,8 @@ contentitemexportablefields: fromServerVersion: "" dependson: must: - - demisto-api-post - - demisto-api-get + - core-api-post + - core-api-get dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ExportIncidentsToCSV diff --git a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/README.md b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/README.md index 504735224643..c25a2fc98b3f 100644 --- a/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/README.md +++ b/Packs/CommonScripts/Scripts/ExportIncidentsToCSV/README.md @@ -1,6 +1,7 @@ -This automation uses the Demisto REST API Integration to batch export Incidents to CSV and return the resulting CSV file to the war room. +This automation uses the Core REST API Integration to batch export Incidents to CSV and return the resulting CSV file to the war room. ## Script Data + --- | **Name** | **Description** | @@ -9,12 +10,15 @@ This automation uses the Demisto REST API Integration to batch export Incidents | Tags | Utility | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-get -* demisto-api-post + +* core-api-get +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -24,5 +28,6 @@ This script uses the following commands and scripts. | columns | Comma separated list of columns \(fields\) for the CSV. \(Default is: id,name,type,severity,status,owner,roles,playbookId,occurred,created,modified,closed\) | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.py b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.py index 636702ecc3f8..b8b9a4d886da 100644 --- a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.py +++ b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.py @@ -30,11 +30,11 @@ def main(): } # generate the file - res = demisto.executeCommand("demisto-api-post", {"uri": "/indicators/batch/exportToCsv", - "body": indicator_body})[0]["Contents"]["response"] + res = demisto.executeCommand("core-api-post", {"uri": "/indicators/batch/exportToCsv", + "body": indicator_body})[0]["Contents"]["response"] # download the file and return to the war room - file = demisto.executeCommand("demisto-api-get", {"uri": f"/indicators/csv/{res}"})[0]["Contents"]["response"] + file = demisto.executeCommand("core-api-get", {"uri": f"/indicators/csv/{res}"})[0]["Contents"]["response"] demisto.results(fileResult(res, file)) diff --git a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.yml b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.yml index 3bfa060469af..64a8dc75b03c 100644 --- a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.yml +++ b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/ExportIndicatorsToCSV.yml @@ -7,7 +7,7 @@ args: name: seenDays - description: 'Comma separated list of columns (fields) for the CSV. (Default is: id,indicator_type,value,source,score,relatedIncCount,setBy,sourceBrands,modified).' name: columns -comment: This automation uses the Demisto REST API Integration to batch export Indicators to CSV and return the resulting CSV file to the war room. +comment: This automation uses the Core REST API Integration to batch export Indicators to CSV and return the resulting CSV file to the war room. commonfields: id: ExportIndicatorsToCSV version: -1 @@ -16,8 +16,8 @@ contentitemexportablefields: fromServerVersion: "" dependson: must: - - demisto-api-post - - demisto-api-get + - core-api-post + - core-api-get dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ExportIndicatorsToCSV diff --git a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/README.md b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/README.md index c91f92856685..1b28d5c46723 100644 --- a/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/README.md +++ b/Packs/CommonScripts/Scripts/ExportIndicatorsToCSV/README.md @@ -1,6 +1,7 @@ -This automation uses the Demisto REST API Integration to batch export Indicators to CSV and return the resulting CSV file to the war room. +This automation uses the Core REST API Integration to batch export Indicators to CSV and return the resulting CSV file to the war room. ## Script Data + --- | **Name** | **Description** | @@ -9,12 +10,15 @@ This automation uses the Demisto REST API Integration to batch export Indicators | Tags | Utility | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-get -* demisto-api-post + +* core-api-get +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -24,5 +28,6 @@ This script uses the following commands and scripts. | columns | Comma separated list of columns \(fields\) for the CSV. \(Default is: id,indicator_type,value,source,score,relatedIncCount,setBy,sourceBrands,modified\) | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/CommonScripts/Scripts/GenerateAsBuilt/GenerateAsBuilt.py b/Packs/CommonScripts/Scripts/GenerateAsBuilt/GenerateAsBuilt.py index 492e7e556419..c5bf4e8831dc 100644 --- a/Packs/CommonScripts/Scripts/GenerateAsBuilt/GenerateAsBuilt.py +++ b/Packs/CommonScripts/Scripts/GenerateAsBuilt/GenerateAsBuilt.py @@ -376,12 +376,13 @@ def search(self, search_key, search_value): value = row.get(search_key) if value == search_value: return row + return None class SortedTableData(TableData): def __init__(self, data, name, sort_key): sorted_data = sorted(data, key=lambda i: i[sort_key].lower()) - super(SortedTableData, self).__init__(sorted_data, name) + super().__init__(sorted_data, name) class SingleFieldData: @@ -555,7 +556,7 @@ def post_api_request(url, body): "uri": url, "body": body } - raw_res = demisto.executeCommand("demisto-api-post", api_args) + raw_res = demisto.executeCommand("core-api-post", api_args) try: res = raw_res[0]['Contents']['response'] return res @@ -577,7 +578,7 @@ def get_api_request(url): api_args = { "uri": url } - raw_res = demisto.executeCommand("demisto-api-get", api_args) + raw_res = demisto.executeCommand("core-api-get", api_args) try: res = raw_res[0]['Contents']['response'] diff --git a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.py b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.py index 22e75926ae2d..0868afe1fb44 100644 --- a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.py +++ b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.py @@ -5,7 +5,7 @@ def main(): # get incident fields - res = demisto.executeCommand('demisto-api-get', {'uri': '/incidentfields'}) + res = demisto.executeCommand('core-api-get', {'uri': '/incidentfields'}) if is_error(res): return_error(res[0]['Contents']) diff --git a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.yml b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.yml index 7ca38119a1b5..730ddf5afa26 100644 --- a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.yml +++ b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType.yml @@ -43,7 +43,7 @@ scripttarget: 0 subtype: python3 dependson: must: - - '|||demisto-api-get' + - '|||core-api-get' dockerimage: demisto/python3:3.10.13.83255 runas: DBotWeakRole tests: diff --git a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType_test.py b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType_test.py index dd79e1288300..b76185cf4dad 100644 --- a/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType_test.py +++ b/Packs/CommonScripts/Scripts/GetFieldsByIncidentType/GetFieldsByIncidentType_test.py @@ -3,12 +3,12 @@ def executeCommand(name, args=None): - if name == 'demisto-api-get' and args and 'uri' in args and args['uri'] == "/incidentfields": + if name == 'core-api-get' and args and 'uri' in args and args['uri'] == "/incidentfields": file_name = 'TestData/integration_incidentfields.json' else: - raise ValueError('Unimplemented command called: {}'.format(name)) + raise ValueError(f'Unimplemented command called: {name}') - with open(file_name, 'r') as f: + with open(file_name) as f: raw_data = f.read() data = json.loads(raw_data) return data diff --git a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.py b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.py index 0bf50b25bfb8..53c25a2c4c17 100644 --- a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.py +++ b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.py @@ -23,7 +23,7 @@ def build_field_context_data(field): def main(): # get incident fields - res = demisto.executeCommand('demisto-api-get', {'uri': '/incidentfields'}) + res = demisto.executeCommand('core-api-get', {'uri': '/incidentfields'}) if is_error(res): return_error(res[0]['Contents']) diff --git a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.yml b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.yml index c708f824ee47..b97ee39ac3f0 100644 --- a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.yml +++ b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields.yml @@ -27,7 +27,7 @@ scripttarget: 0 subtype: python3 dependson: must: - - '|||demisto-api-get' + - '|||core-api-get' dockerimage: demisto/python3:3.10.13.83255 runas: DBotWeakRole tests: diff --git a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields_test.py b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields_test.py index 76656ee52e59..55cbee6e6d77 100644 --- a/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields_test.py +++ b/Packs/CommonScripts/Scripts/IncidentFields/IncidentFields_test.py @@ -3,19 +3,19 @@ def executeCommand(name, args=None): - if name == 'demisto-api-get' and args and 'uri' in args and args['uri'] == "/incidentfields": + if name == 'core-api-get' and args and 'uri' in args and args['uri'] == "/incidentfields": file_name = 'TestData/integration_incidentfields.json' else: - raise ValueError('Unimplemented command called: {}'.format(name)) + raise ValueError(f'Unimplemented command called: {name}') - with open(file_name, 'r') as f: + with open(file_name) as f: raw_data = f.read() data = json.loads(raw_data) return data def parseJsonFile(file_name): - with open(file_name, 'r') as f: + with open(file_name) as f: raw_data = f.read() data = json.loads(raw_data) return data diff --git a/Packs/CommonScripts/Scripts/IncidentFields/README.md b/Packs/CommonScripts/Scripts/IncidentFields/README.md index 45f0bb50c012..1833fdfc20e5 100644 --- a/Packs/CommonScripts/Scripts/IncidentFields/README.md +++ b/Packs/CommonScripts/Scripts/IncidentFields/README.md @@ -1,6 +1,7 @@ Returns a dict of all incident fields that exist in the system. ## Script Data + --- | **Name** | **Description** | @@ -9,11 +10,14 @@ Returns a dict of all incident fields that exist in the system. | Cortex XSOAR Version | 5.0.0 | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-get + +* core-api-get ## Inputs + --- | **Argument Name** | **Description** | @@ -22,14 +26,19 @@ This script uses the following commands and scripts. | short_names | Whether to shorten the incident field names. If "true", will cause output to use shortened field names. The default value is "true". | ## Outputs + --- There are no outputs for this script. ## Script Examples + ### Example command + ```!IncidentFields exclude_system_fields="false" short_names="true"``` + ### Context Example + ```json {} ``` @@ -135,6 +144,7 @@ There are no outputs for this script. >``` ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py b/Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py index 4797e2f96a00..89835e9b0f9a 100644 --- a/Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py +++ b/Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py @@ -193,7 +193,7 @@ "scriptTarget": 0, "dependsOn": { "must": [ - "demisto-api-multipart" + "core-api-multipart" ] }, "deprecated": true, diff --git a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.py b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.py index 33bab96a79c3..f1a455d1f2b7 100644 --- a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.py +++ b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.py @@ -16,7 +16,7 @@ def main(): ENABLED = False integration_commands_args = {"uri": "/settings/integration-commands"} - integration_commands_res = demisto.executeCommand("demisto-api-get", integration_commands_args) + integration_commands_res = demisto.executeCommand("core-api-get", integration_commands_args) integration_search = None if ENABLED is not None: @@ -25,7 +25,7 @@ def main(): "uri": "/settings/integration/search", "body": {"size": 1000} } - integration_search_res = demisto.executeCommand("demisto-api-post", integration_search_args) + integration_search_res = demisto.executeCommand("core-api-post", integration_search_args) try: integration_search = integration_search_res[0]['Contents']['response'] except KeyError: diff --git a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.yml b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.yml index 08111d135814..6d91a8cce9ca 100644 --- a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.yml +++ b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand.yml @@ -8,7 +8,7 @@ subtype: python3 tags: - general comment: |- - Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Demisto REST API" integration must first be enabled. + Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Core REST API" integration must first be enabled. enabled: true args: - name: command @@ -23,8 +23,8 @@ args: scripttarget: 0 dependson: must: - - demisto-api-post - - demisto-api-get + - core-api-post + - core-api-get dockerimage: demisto/python3:3.10.13.83255 runas: DBotWeakRole tests: diff --git a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand_test.py b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand_test.py index 6fa53fe43b6e..6ff2f07cdf10 100644 --- a/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand_test.py +++ b/Packs/CommonScripts/Scripts/ProvidesCommand/ProvidesCommand_test.py @@ -3,14 +3,14 @@ def executeCommand(name, args=None): - if name == 'demisto-api-get' and args and 'uri' in args and args['uri'] == "/settings/integration-commands": + if name == 'core-api-get' and args and 'uri' in args and args['uri'] == "/settings/integration-commands": file_name = 'TestData/integration_commands.json' - elif name == 'demisto-api-post' and args and 'uri' in args and args['uri'] == "/settings/integration/search": + elif name == 'core-api-post' and args and 'uri' in args and args['uri'] == "/settings/integration/search": file_name = 'TestData/integration_search.json' else: - raise ValueError('Unimplemented command called: {}'.format(name)) + raise ValueError(f'Unimplemented command called: {name}') - with open(file_name, 'r') as f: + with open(file_name) as f: raw_data = f.read() data = json.loads(raw_data) return data diff --git a/Packs/CommonScripts/Scripts/ProvidesCommand/README.md b/Packs/CommonScripts/Scripts/ProvidesCommand/README.md index 83f5ed7f9610..3cf67ce1a331 100644 --- a/Packs/CommonScripts/Scripts/ProvidesCommand/README.md +++ b/Packs/CommonScripts/Scripts/ProvidesCommand/README.md @@ -1,6 +1,7 @@ -Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Demisto REST API" integration must first be enabled. +Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Core REST API" integration must first be enabled. ## Script Data + --- | **Name** | **Description** | @@ -10,12 +11,15 @@ Finds which integrations implement a specific Demisto command. The results will | Cortex XSOAR Version | 5.0.0 | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post -* demisto-api-get + +* core-api-post +* core-api-get ## Inputs + --- | **Argument Name** | **Description** | @@ -24,10 +28,12 @@ This script uses the following commands and scripts. | enabled | Filters results to integrations that are enabled or disabled. 'true' or 'false'. Will return both types by default. False means that an integration instance is either not defined or not enabled. True means that an integration instance is both defined and enabled. | ## Outputs + --- There are no outputs for this script. ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/CommonScripts/TestPlaybooks/playbook-EditServerConfig-Test.yml b/Packs/CommonScripts/TestPlaybooks/playbook-EditServerConfig-Test.yml index 17d9457ce01b..eaeaac50cabb 100644 --- a/Packs/CommonScripts/TestPlaybooks/playbook-EditServerConfig-Test.yml +++ b/Packs/CommonScripts/TestPlaybooks/playbook-EditServerConfig-Test.yml @@ -40,8 +40,7 @@ tasks: id: 2350d695-cdd4-4ab3-8e6e-ff8e164b9d86 version: -1 name: Add a new server config - description: Edit the server configuration (under *settings/troubleshooting*). - You can either add a new configuration or update and remove an existing one. + description: Edit the server configuration (under *settings/troubleshooting*). You can either add a new configuration or update and remove an existing one. scriptName: EditServerConfig type: regular iscommand: false @@ -80,7 +79,7 @@ tasks: version: -1 name: Get server config description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -182,8 +181,7 @@ tasks: id: bf7fa05f-7184-4df0-89da-20770d338ca6 version: -1 name: Remove server config - description: Edit the server configuration (under *settings/troubleshooting*). - You can either add a new configuration or update and remove an existing one. + description: Edit the server configuration (under *settings/troubleshooting*). You can either add a new configuration or update and remove an existing one. scriptName: EditServerConfig type: regular iscommand: false @@ -220,7 +218,7 @@ tasks: version: -1 name: Get server config description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -292,8 +290,7 @@ tasks: id: ddf0e02f-560d-4331-8f66-0eadcdd7e335 version: -1 name: Update an existing server config - description: Edit the server configuration (under *settings/troubleshooting*). - You can either add a new configuration or update and remove an existing one. + description: Edit the server configuration (under *settings/troubleshooting*). You can either add a new configuration or update and remove an existing one. scriptName: EditServerConfig type: regular iscommand: false @@ -332,7 +329,7 @@ tasks: version: -1 name: Get server config description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -478,9 +475,8 @@ tasks: task: id: 05bcecfa-4041-45c8-869d-35bb3b6e88a4 version: -1 - name: Is Demisto Rest API Instance Available - description: Returns 'yes' if integration brand is available. Otherwise returns - 'no' + name: Is Core REST API Instance Available + description: Returns 'yes' if integration brand is available. Otherwise returns 'no' scriptName: IsIntegrationAvailable type: condition iscommand: false @@ -492,7 +488,7 @@ tasks: - "1" scriptarguments: brandname: - simple: Demisto REST API + simple: Core REST API results: - brandInstances separatecontext: false @@ -525,4 +521,4 @@ view: |- inputs: [] outputs: [] fromversion: 6.0.0 -description: Test EditServerConfig script +description: Test EditServerConfig script. diff --git a/Packs/CommonScripts/pack_metadata.json b/Packs/CommonScripts/pack_metadata.json index 34e6b31ce1eb..5869e46836ac 100644 --- a/Packs/CommonScripts/pack_metadata.json +++ b/Packs/CommonScripts/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Common Scripts", "description": "Frequently used scripts pack.", "support": "xsoar", - "currentVersion": "1.13.8", + "currentVersion": "1.13.9", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.json b/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.md b/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.md new file mode 100644 index 000000000000..4246696b9c96 --- /dev/null +++ b/Packs/CommunityCommonScripts/ReleaseNotes/1_1_3.md @@ -0,0 +1,26 @@ + +#### Scripts + +##### RemoveEmptyEvidence + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### CreatePlbkDoc + +- Updated the Docker image to: *demisto/sane-doc-reports:1.0.0.82656*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### RetrievePlaybooksAndIntegrations + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### CreateEDLInstance + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### RetrievePlaybookDependencies + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DeleteIncidentsByQuery + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated ***demisto-delete-incidents*** command and replaced with the ***core-delete-incidents*** command. (Commands are identical, no effect is expected) diff --git a/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.py b/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.py index f50c53d5063d..958645a24523 100644 --- a/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.py +++ b/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.py @@ -645,7 +645,7 @@ def main(): parameters = {'uri': '/settings/integration', 'body': body} try: - results = demisto.executeCommand('demisto-api-put', parameters) + results = demisto.executeCommand('core-api-put', parameters) except Exception as e: return_error(e) diff --git a/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.yml b/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.yml index 317460d79372..560e51a605a7 100644 --- a/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.yml +++ b/Packs/CommunityCommonScripts/Scripts/CreateEDLInstance/CreateEDLInstance.yml @@ -1,21 +1,21 @@ args: - defaultValue: EDL_PORT_LIST - description: The Listname in XSOAR of ports in use + description: The Listname in XSOAR of ports in use. name: PortListName required: true -- description: The Name of the EDL instance to create +- description: The Name of the EDL instance to create. name: InstanceName required: true -- description: The indicator query used to populate the EDL +- description: The indicator query used to populate the EDL. name: Query required: true - name: Port - description: Specify specific port to use when creating the EDL instance., else it will be random (3000-50000) + description: Specify specific port to use when creating the EDL instance., else it will be random (3000-50000). comment: Use this automation to create an EDL instance on XSOAR. commonfields: id: CreateEDLInstance version: -1 -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: CreateEDLInstance runas: DBotWeakRole diff --git a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.py b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.py index 5efba09e2401..d16610fe23cf 100644 --- a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.py +++ b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.py @@ -16,7 +16,7 @@ # Input2: Format type needed. Table or Paragraph. Paragraph is default. # Input3: Name of the docx file that will be produced. Give the full name including the ".docx" # extension. (Mandatory) -# Requirements: This automation requires "Demisto REST API" integration enabled and connected to the XSOAR itself. +# Requirements: This automation requires "Core REST API" integration enabled and connected to the XSOAR itself. # Automation uses it to read the objects of the playbook. retVal: dict = {} @@ -43,7 +43,7 @@ def post_api_request(url, body): "body": body } - raw_res = demisto.executeCommand("demisto-api-post", api_args) + raw_res = demisto.executeCommand("core-api-post", api_args) try: res = raw_res[0]['Contents']['response'] return res @@ -56,7 +56,6 @@ def post_api_request(url, body): def EnterHeader(HeaderStr): document.add_heading(HeaderStr, level=1) - return def StartParagraph(Name, Description): @@ -69,7 +68,6 @@ def StartParagraph(Name, Description): Paragraph = document.add_paragraph(Description) Paragraph.paragraph_format.left_indent = Inches(0.25) # type: ignore - return def StartTable(): @@ -81,8 +79,6 @@ def StartTable(): hdr_cells[0].text = 'Name' hdr_cells[1].text = 'Description' - return - def TraverseTasks(TaskID): @@ -109,11 +105,7 @@ def TraverseTasks(TaskID): curTask = retVal[PlaybookIndex]['tasks'][str(TaskID)] - if 'description' in curTask['task'].keys(): - taskDescription = curTask['task']['description'] - - else: - taskDescription = "[Blank]" + taskDescription = curTask["task"].get("description", "[Blank]") Description = taskDescription Type = curTask['type'] diff --git a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.yml b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.yml index ad031cd4f234..39d5f9aca371 100644 --- a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.yml +++ b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/CreatePlbkDoc.yml @@ -20,14 +20,14 @@ comment: |- Input2: Format type needed. Table or Paragraph. Paragraph is default. Input3: Name of the docx file that will be produced. Give the full name including the ".docx" extension. (Mandatory) - Requirements: This automation requires "Demisto REST API" integration enabled and connected to the XSOAR itself. Automation uses it to read the objects of the playbook. + Requirements: This automation requires "Core REST API" integration enabled and connected to the XSOAR itself. Automation uses it to read the objects of the playbook. commonfields: id: CreatePlbkDoc version: -1 contentitemexportablefields: contentitemfields: fromServerVersion: "6.0.0" -dockerimage: demisto/sane-doc-reports:1.0.0.27897 +dockerimage: demisto/sane-doc-reports:1.0.0.82656 enabled: true name: CreatePlbkDoc runas: DBotWeakRole diff --git a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/README.md b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/README.md index 3d9073745be2..746b313bf40d 100644 --- a/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/README.md +++ b/Packs/CommunityCommonScripts/Scripts/CreatePlbkDoc/README.md @@ -6,7 +6,7 @@ Input1: Name of the playbook (Mandatory) Input2: Format type needed. Table or Paragraph. Paragraph is default. Input3: Name of the docx file that will be produced. Give the full name including the ".docx" extension. (Mandatory) -Requirements: This automation requires "Demisto REST API" integration enabled and connected to the XSOAR itself. Automation uses it to read the objects of the playbook. +Requirements: This automation requires "Core REST API" integration enabled and connected to the XSOAR itself. Automation uses it to read the objects of the playbook. ## Script Data --- diff --git a/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.py b/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.py index e37bddaf4dde..fe06431fd3ad 100644 --- a/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.py +++ b/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.py @@ -20,13 +20,13 @@ def main(): ids.append(i) text_ids = ','.join(ids) - demisto.executeCommand('demisto-delete-incidents', {'ids': text_ids}) + demisto.executeCommand('core-delete-incidents', {'ids': text_ids}) except TypeError: demisto.results("No incidents to delete according to the query") except ValueError as err: - if "demisto-delete-incidents" in str(err): - raise Exception("Please enable Demisto REST API integration") + if "core-delete-incidents" in str(err): + raise Exception("Please enable Core REST API integration") if __name__ in ['__main__', 'builtin', 'builtins']: diff --git a/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.yml b/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.yml index f9538224a366..c99ec5feb36a 100644 --- a/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.yml +++ b/Packs/CommunityCommonScripts/Scripts/DeleteIncidentsByQuery/DeleteIncidentsByQuery.yml @@ -4,7 +4,7 @@ args: - description: The query should be in the same format as used in incident page. name: query required: true -comment: Use this automation to delete incidents using query parameter with the same format as used in incidents search. Demisto REST API integration instance should be created. +comment: Use this automation to delete incidents using query parameter with the same format as used in incidents search. Core REST API integration instance should be created. commonfields: id: DeleteIncidentsByQuery version: -1 @@ -13,7 +13,7 @@ contentitemexportablefields: fromServerVersion: "" dependson: must: [] -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: DeleteIncidentsByQuery runas: DBotWeakRole diff --git a/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.py b/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.py index e8e04a0928b0..2ffb72b1bfec 100644 --- a/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.py +++ b/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.py @@ -5,7 +5,7 @@ incID = demisto.incidents()[0]["id"] bodyGet = {"incidentID": incID} -res = demisto.executeCommand("demisto-api-post", {"uri": "/evidence/search", "body": bodyGet})[0]["Contents"]["response"] +res = demisto.executeCommand("core-api-post", {"uri": "/evidence/search", "body": bodyGet})[0]["Contents"]["response"] entries = res["entries"] evidences = res["evidences"] evidencesDict = {} @@ -16,5 +16,5 @@ for entry in entries: if removeIfContains in entry["contents"]: bodyDelete = {"evidenceID": evidencesDict[entry["id"]]} - demisto.executeCommand("demisto-api-post", {"uri": "/evidence/delete", "body": bodyDelete}) + demisto.executeCommand("core-api-post", {"uri": "/evidence/delete", "body": bodyDelete}) demisto.results("Done removing empty evidence") diff --git a/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.yml b/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.yml index 5a4e49acc3a5..a20601a205b7 100644 --- a/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.yml +++ b/Packs/CommunityCommonScripts/Scripts/RemoveEmptyEvidence/RemoveEmptyEvidence.yml @@ -1,6 +1,6 @@ args: - defaultValue: No entries - description: String that if found in the entry of an evidence- the evidence will be removed. The default value is "No entries" + description: String that if found in the entry of an evidence- the evidence will be removed. The default value is "No entries". name: removeIfContains comment: |- The automation removes evidence based on a query performed on the evidence content, @@ -11,7 +11,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: RemoveEmptyEvidence runas: DBotWeakRole diff --git a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.py b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.py index 1efa14034a74..975775fc9bff 100644 --- a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.py +++ b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.py @@ -1,6 +1,6 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 -from typing import List, Dict, Any +from typing import Any import traceback import re from json import dumps @@ -23,7 +23,7 @@ def perform_rest_call(method: str, endpoint: str, body=None): if body: args['body'] = dumps(body) - result = demisto.executeCommand(f"demisto-api-{method}", args) + result = demisto.executeCommand(f"core-api-{method}", args) if len(result) < 1 or 'Contents' not in result[0] or 'response' not in result[0].get('Contents'): raise Exception(f"Error with REST call to endpoint {endpoint}") @@ -33,7 +33,7 @@ def perform_rest_call(method: str, endpoint: str, body=None): def get_tasks_list(tasks): # {'1':{'id': '1'}, ...} -> [{'id':'1'}, ...] tasks_list = [] - for task_number in tasks.keys(): + for task_number in tasks: tasks_list.append(tasks[task_number]) return tasks_list @@ -46,7 +46,7 @@ def append_commands(commands, subplaybook_name, subplaybook_json): key = task.get('scriptId', '').replace('|||', '') # These are base commands and should be excluded from brandless list if key not in ["domain", "file", "ip", "url"]: - if key in commands.keys(): + if key in commands: if subplaybook_name not in commands[key]: commands[key].append(subplaybook_name) else: @@ -118,7 +118,7 @@ def create_markdown_list(lists, scripts, integrations, playbooks, parent_playboo def get_xsoar_list_name(task): # Search for lists in tasks - if 'scriptArguments' in task.keys(): + if 'scriptArguments' in task: r = re.search(r'\${lists\.(.*?)(\..*?)?}', str(task.get('scriptArguments'))) if r: xsoar_list_name = r.group(1) @@ -129,12 +129,12 @@ def get_xsoar_list_name(task): ''' COMMAND FUNCTION ''' -def retrieve_playbook_dependencies(args: Dict[str, Any]) -> CommandResults: - playbooks: List[str] = [] - integrations: List[str] = [] - script_ids: List[str] = [] - commands: Dict[str, Any] = {} # commands not using brand - lists: List[str] = [] # XSOAR List names +def retrieve_playbook_dependencies(args: dict[str, Any]) -> CommandResults: + playbooks: list[str] = [] + integrations: list[str] = [] + script_ids: list[str] = [] + commands: dict[str, Any] = {} # commands not using brand + lists: list[str] = [] # XSOAR List names # Call parent playbook's data, then recursivley call all subplaybooks' data playbooks_json = perform_rest_call('post', 'playbook/search', {'query': f'''name:"{args.get('playbook_name')}"'''}) @@ -161,8 +161,8 @@ def retrieve_playbook_dependencies(args: Dict[str, Any]) -> CommandResults: # Sort scripts into base scripts and custom scripts, and get the displayname for custom scripts script_ids = list(set(script_ids)) - custom_scripts: List[str] = [] - base_scripts: List[str] = [] + custom_scripts: list[str] = [] + base_scripts: list[str] = [] for script_id in script_ids: if '-' in script_id: custom_scripts.append(perform_rest_call('post', f'automation/load/{script_id}').get('name')) @@ -172,11 +172,11 @@ def retrieve_playbook_dependencies(args: Dict[str, Any]) -> CommandResults: # Sort, format and display brandless commands' possible integrations and the playbooks they were located in if len(commands) > 0: integration_result = perform_rest_call('get', "settings/integration-commands") - integration_commands: Dict[str, List[str]] = {} + integration_commands: dict[str, list[str]] = {} # Find the integrations connected to brand-less commands for integration in integration_result: for command in integration.get('commands', []): - if command.get('name') and command.get('name') in commands.keys(): + if command.get('name') and command.get('name') in commands: integration_commands.setdefault(integration.get('display'), []).append(command.get('name')) # Format into markdown table displaying integration, command, and playbook it was found in @@ -207,8 +207,8 @@ def retrieve_playbook_dependencies(args: Dict[str, Any]) -> CommandResults: markdown_string = create_markdown_list(lists, custom_scripts, integrations, playbooks, args.get('playbook_name')) # Format results for output - integrations = sorted(list(set(integrations))) - lists = sorted(list(set(lists))) + integrations = sorted(set(integrations)) + lists = sorted(set(lists)) playbooks.sort() custom_scripts.sort() base_scripts.sort() diff --git a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.yml b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.yml index e1896d9464d8..973f5e3de2d6 100644 --- a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.yml +++ b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybookDependencies/RetrievePlaybookDependencies.yml @@ -18,7 +18,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.78960 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: RetrievePlaybookDependencies outputs: diff --git a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybooksAndIntegrations/RetrievePlaybooksAndIntegrations.py b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybooksAndIntegrations/RetrievePlaybooksAndIntegrations.py index 2e5a7fb54d66..f6b5f578f617 100644 --- a/Packs/CommunityCommonScripts/Scripts/RetrievePlaybooksAndIntegrations/RetrievePlaybooksAndIntegrations.py +++ b/Packs/CommunityCommonScripts/Scripts/RetrievePlaybooksAndIntegrations/RetrievePlaybooksAndIntegrations.py @@ -21,7 +21,7 @@ def perform_rest_call(method: str, endpoint: str, body=None): if body: args['body'] = json.dumps(body) - result = demisto.executeCommand(f"demisto-api-{method}", args) + result = demisto.executeCommand(f"core-api-{method}", args) if len(result) < 1 or 'Contents' not in result[0] or 'response' not in result[0].get('Contents'): raise Exception(f"Error with REST call to endpoint {endpoint}") diff --git a/Packs/CommunityCommonScripts/pack_metadata.json b/Packs/CommunityCommonScripts/pack_metadata.json index 9859c1a897b1..6305b151ed52 100644 --- a/Packs/CommunityCommonScripts/pack_metadata.json +++ b/Packs/CommunityCommonScripts/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Community Common Scripts", "description": "A pack that contains community scripts", "support": "community", - "currentVersion": "1.1.2", + "currentVersion": "1.1.3", "author": "", "url": "https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/bd-p/Cortex_XSOAR_Discussions", "email": "", diff --git a/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup.yml b/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup.yml index 23e8f546ff80..13fef4925e0e 100644 --- a/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup.yml +++ b/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup.yml @@ -1231,7 +1231,7 @@ inputs: - key: InstanceName value: {} required: false - description: Demisto REST API instance name to use. + description: Core REST API instance name to use. playbookInputQuery: outputs: [] tests: diff --git a/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup_README.md b/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup_README.md index 41212f3c6c4e..59eb7d066827 100644 --- a/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup_README.md +++ b/Packs/ContentManagement/Playbooks/playbook-Configuration_Setup_README.md @@ -26,7 +26,7 @@ Playbook for the Cֹonfiguration Setup incident type. | **Name** | **Description** | **Default Value** | **Required** | | --- | --- | --- | --- | -| InstanceName | Demisto REST API instance name to use. | | Optional | +| InstanceName | Core REST API instance name to use. | | Optional | ## Playbook Outputs --- diff --git a/Packs/ContentManagement/ReleaseNotes/1_2_15.json b/Packs/ContentManagement/ReleaseNotes/1_2_15.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/ContentManagement/ReleaseNotes/1_2_15.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/ContentManagement/ReleaseNotes/1_2_15.md b/Packs/ContentManagement/ReleaseNotes/1_2_15.md new file mode 100644 index 000000000000..4ab72ed1c0c1 --- /dev/null +++ b/Packs/ContentManagement/ReleaseNotes/1_2_15.md @@ -0,0 +1,24 @@ + +#### Scripts + +##### MarketplacePackInstaller + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### JobCreator + +- Updated the Docker image to: *demisto/xsoar-tools:1.0.0.83431*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DeleteContent + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### CustomPackInstaller + +- Updated the Docker image to: *demisto/xsoar-tools:1.0.0.83431*. +- Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. + +#### Playbooks + +##### Configuration Setup + +- Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. diff --git a/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.py b/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.py index fb2ab7703147..111da046727b 100644 --- a/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.py +++ b/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.py @@ -12,7 +12,7 @@ def install_custom_pack(pack_id: str, skip_verify: bool, skip_validation: bool, pack_id (str): The ID of the pack to install. skip_verify (bool): If true will skip pack signature validation. skip_validation (bool) if true will skip all pack validations. - instance_name (str) Demisto REST API instance name. + instance_name (str) Core REST API instance name. Returns: - bool. Whether the installation of the pack was successful or not. diff --git a/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.yml b/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.yml index 50591fb99660..ada39aefb8ad 100644 --- a/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.yml +++ b/Packs/ContentManagement/Scripts/CustomPackInstaller/CustomPackInstaller.yml @@ -33,7 +33,7 @@ tags: - Content Management timeout: '0' type: python -dockerimage: demisto/xsoar-tools:1.0.0.69232 +dockerimage: demisto/xsoar-tools:1.0.0.83431 tests: - No tests (auto formatted) fromversion: 6.0.0 diff --git a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.py b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.py index da2bc1e772b7..184b57338d83 100644 --- a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.py +++ b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.py @@ -72,20 +72,20 @@ class PlaybookAPI(EntityAPI): name = 'playbook' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/playbook/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/playbook/search', 'body': {'page': 0, 'size': 100}, 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/playbook/delete', 'body': {'id': specific_id}, 'using': INSTANCE_NAME}, @@ -105,21 +105,21 @@ class IntegrationAPI(EntityAPI): name = 'integration' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/settings/integration/search', 'body': {'page': 0, 'size': 100, 'query': f'name:"{specific_id}"'}, 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/settings/integration/search', 'body': {'page': 0, 'size': 100}, 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/settings/integration-conf/delete', 'body': {'id': specific_id}, 'using': INSTANCE_NAME}, @@ -143,21 +143,21 @@ class ScriptAPI(EntityAPI): always_excluded = ['CommonServerUserPowerShell', 'CommonServerUserPython', 'CommonUserServer', SCRIPT_NAME] def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/automation/search', 'body': {'page': 0, 'size': 1, 'query': f'id:"{specific_id}"'}, 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/automation/search', 'body': {'page': 0, 'size': 100}, 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/automation/delete', 'body': {'script': {'id': specific_id}}, 'using': INSTANCE_NAME}, @@ -179,19 +179,19 @@ class IncidentFieldAPI(EntityAPI): name = 'incidentfield' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/incidentfields', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/incidentfields', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/incidentfield/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -207,19 +207,19 @@ class PreProcessingRuleAPI(EntityAPI): name = 'pre-process-rule' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/preprocess/rules', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/preprocess/rules', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/preprocess/rule/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -235,19 +235,19 @@ class WidgetAPI(EntityAPI): name = 'widget' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/widgets/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/widgets', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/widgets/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -268,19 +268,19 @@ class DashboardAPI(EntityAPI): name = 'dashboard' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/dashboards/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/dashboards', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/dashboards/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -301,19 +301,19 @@ class ReportAPI(EntityAPI): name = 'report' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/reports/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/reports', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/report/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -329,19 +329,19 @@ class IncidentTypeAPI(EntityAPI): name = 'incidenttype' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/incidenttypes/export', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/incidenttypes/export', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/incidenttype/delete', 'body': {'id': specific_id}, 'using': INSTANCE_NAME}, @@ -358,20 +358,20 @@ class ClassifierAPI(EntityAPI): name = 'classifier' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/classifier/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/classifier/search', 'body': {'page': 0, 'size': 100}, 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/classifier/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -395,19 +395,19 @@ class ReputationAPI(EntityAPI): name = 'reputation' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/reputation/export', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/reputation/export', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/reputation/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -423,19 +423,19 @@ class LayoutAPI(EntityAPI): name = 'layoutscontainer' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/layout/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/layouts', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': f'/layout/{specific_id}/remove', 'body': {}, 'using': INSTANCE_NAME}, @@ -452,21 +452,21 @@ class JobAPI(EntityAPI): name = 'job' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/jobs/search', 'body': {'page': 0, 'size': 1, 'query': f'name:"{specific_id}"'}, 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/jobs/search', 'body': {'page': 0, 'size': 100}, 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'jobs/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) @@ -492,19 +492,19 @@ class ListAPI(EntityAPI): name = 'list' def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/lists/download/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/lists/names', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-post', + return execute_command('core-api-post', {'uri': '/lists/delete', 'body': {'id': specific_id}, 'using': INSTANCE_NAME}, @@ -531,19 +531,19 @@ def __init__(self, proxy_skip=True, verify=True): self.always_excluded = json.loads(core_packs_response.text).get("core_packs_list") + self.always_excluded def search_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': f'/contentpacks/installed/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) def search_all(self) -> tuple[bool, dict | str]: - return execute_command('demisto-api-get', + return execute_command('core-api-get', {'uri': '/contentpacks/installed-expired', 'using': INSTANCE_NAME}, fail_on_error=False) def delete_specific_id(self, specific_id: str) -> tuple[bool, dict | str]: - return execute_command('demisto-api-delete', + return execute_command('core-api-delete', {'uri': f'/contentpacks/installed/{specific_id}', 'using': INSTANCE_NAME}, fail_on_error=False) diff --git a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.yml b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.yml index 71d49f0017c7..13301f10aaa8 100644 --- a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.yml +++ b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent.yml @@ -33,13 +33,13 @@ name: DeleteContent comment: Delete content to keep XSOAR tidy. outputs: - contextPath: ConfigurationSetup.Deletion.successfully_deleted - description: Deleted ids + description: Deleted ids. type: String - contextPath: ConfigurationSetup.Deletion.not_deleted - description: Not deleted ids + description: Not deleted ids. type: String - contextPath: ConfigurationSetup.Deletion.status - description: Deletion status + description: Deletion status. type: String script: '-' tags: @@ -48,7 +48,7 @@ tags: timeout: 3600 type: python subtype: python3 -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 tests: - No tests (auto formatted) fromversion: 6.0.0 diff --git a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent_test.py b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent_test.py index 414c479673c5..d1ac66ea0c06 100644 --- a/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent_test.py +++ b/Packs/ContentManagement/Scripts/DeleteContent/DeleteContent_test.py @@ -2,7 +2,7 @@ from DeleteContent import get_and_delete_needed_ids, CORE_PACKS_LIST_URL from abc import ABC, abstractmethod -from typing import Tuple, Any +from typing import Any XSOAR_IDS_FULL_STATE = { @@ -31,11 +31,11 @@ def __init__(self, xsoar_state): self.xsoar_state_ids = xsoar_state.get(self.entity_name) @abstractmethod - def search_response(self, command_name, command_args) -> Tuple[bool, Any]: + def search_response(self, command_name, command_args) -> tuple[bool, Any]: pass @abstractmethod - def delete_response(self, command_name, command_args) -> Tuple[bool, Any]: + def delete_response(self, command_name, command_args) -> tuple[bool, Any]: pass @@ -60,7 +60,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('jobs/') and command_name == 'demisto-api-delete': + if command_uri.startswith('jobs/') and command_name == 'core-api-delete': job_name = command_uri.split('jobs/')[1] if job_name in self.xsoar_state_ids: return True, {'data': [{'name': job_name, 'id': job_name}]} @@ -99,18 +99,18 @@ class MockPackResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_name == 'demisto-api-get' and command_uri.startswith('/contentpacks/installed/'): + if command_name == 'core-api-get' and command_uri.startswith('/contentpacks/installed/'): pack_name = command_uri.split('/contentpacks/installed/')[1] return (True, {'id': pack_name}) if pack_name in self.xsoar_state_ids else (False, 'Id not found') - if command_name == 'demisto-api-get' and command_uri.startswith('/contentpacks/installed-expired'): + if command_name == 'core-api-get' and command_uri.startswith('/contentpacks/installed-expired'): return True, [{'id': pack_name} for pack_name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_name == 'demisto-api-delete' and command_uri.startswith('/contentpacks/installed/'): + if command_name == 'core-api-delete' and command_uri.startswith('/contentpacks/installed/'): pack_name = command_uri.split('/contentpacks/installed/')[1] return (True, {'id': pack_name}) if pack_name in self.xsoar_state_ids else (False, 'Id not found') return False, False @@ -137,7 +137,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri == '/automation/delete' and command_name == 'demisto-api-post': + if command_uri == '/automation/delete' and command_name == 'core-api-post': script_name = command_args.get('body', {}).get('script', {}).get('id', '') if script_name in self.xsoar_state_ids: return True, {'scripts': [{'id': script_name}]} @@ -150,13 +150,13 @@ class MockPlaybookResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_name == 'demisto-api-get' and command_uri.startswith('/playbook/'): + if command_name == 'core-api-get' and command_uri.startswith('/playbook/'): name = command_uri.split('/playbook/')[1] if name in self.xsoar_state_ids: return True, {'id': name} return False, 'Id not found' - if command_name == 'demisto-api-post' and command_uri == '/playbook/search': + if command_name == 'core-api-post' and command_uri == '/playbook/search': return True, {'playbooks': [{'id': name} for name in self.xsoar_state_ids]} return False, False @@ -176,13 +176,13 @@ class MockIncidentFieldResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri == '/incidentfields' and command_name == 'demisto-api-get': + if command_uri == '/incidentfields' and command_name == 'core-api-get': return True, [{'id': name} for name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/incidentfield/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/incidentfield/') and command_name == 'core-api-delete': name = command_uri.split('/incidentfield/')[1] if name in self.xsoar_state_ids: return True, None @@ -211,7 +211,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri == '/settings/integration-conf/delete' and command_name == 'demisto-api-post': + if command_uri == '/settings/integration-conf/delete' and command_name == 'core-api-post': name = command_args.get('body', {}).get('id') if name in self.xsoar_state_ids: return True, {'configurations': [{'id': name}]} @@ -224,13 +224,13 @@ class MockPreprocessRuleResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri == '/preprocess/rules' and command_name == 'demisto-api-get': + if command_uri == '/preprocess/rules' and command_name == 'core-api-get': return True, [{'id': name} for name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/preprocess/rule/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/preprocess/rule/') and command_name == 'core-api-delete': name = command_uri.split('/preprocess/rule/')[1] if name in self.xsoar_state_ids: return True, None @@ -243,7 +243,7 @@ class MockWidgetResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/widgets') and command_name == 'demisto-api-get': + if command_uri.startswith('/widgets') and command_name == 'core-api-get': if command_uri.startswith('/widgets/'): name = command_uri.split('/widgets/')[1] if name in self.xsoar_state_ids: @@ -254,7 +254,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/widgets/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/widgets/') and command_name == 'core-api-delete': name = command_uri.split('/widgets/')[1] if name in self.xsoar_state_ids: return True, None @@ -267,7 +267,7 @@ class MockDashboardResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/dashboards') and command_name == 'demisto-api-get': + if command_uri.startswith('/dashboards') and command_name == 'core-api-get': if command_uri.startswith('/dashboards/'): name = command_uri.split('/dashboards/')[1] if name in self.xsoar_state_ids: @@ -278,7 +278,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/dashboards/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/dashboards/') and command_name == 'core-api-delete': name = command_uri.split('/dashboards/')[1] if name in self.xsoar_state_ids: return True, None @@ -291,7 +291,7 @@ class MockReportResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/reports') and command_name == 'demisto-api-get': + if command_uri.startswith('/reports') and command_name == 'core-api-get': if command_uri.startswith('/reports/'): name = command_uri.split('/reports/')[1] if name in self.xsoar_state_ids: @@ -302,7 +302,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/report/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/report/') and command_name == 'core-api-delete': name = command_uri.split('/report/')[1] if name in self.xsoar_state_ids: return True, None @@ -315,13 +315,13 @@ class MockIncidentTypeResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/incidenttypes/export') and command_name == 'demisto-api-get': + if command_uri.startswith('/incidenttypes/export') and command_name == 'core-api-get': return True, [{'id': name} for name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/incidenttype/delete') and command_name == 'demisto-api-post': + if command_uri.startswith('/incidenttype/delete') and command_name == 'core-api-post': name = command_args.get('body', {}).get('id') if name in self.xsoar_state_ids: return True, None @@ -334,9 +334,9 @@ class MockClassifierResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri == '/classifier/search' and command_name == 'demisto-api-post': + if command_uri == '/classifier/search' and command_name == 'core-api-post': return True, {'classifiers': [{'id': name} for name in self.xsoar_state_ids]} - if command_uri.startswith('/classifier/') and command_name == 'demisto-api-get': + if command_uri.startswith('/classifier/') and command_name == 'core-api-get': name = command_uri.split('/classifier/')[1] if name in self.xsoar_state_ids: return True, {'id': name} @@ -345,7 +345,7 @@ def search_response(self, command_name, command_args): def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/classifier/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/classifier/') and command_name == 'core-api-delete': name = command_uri.split('/classifier/')[1] if name in self.xsoar_state_ids: return True, None @@ -358,13 +358,13 @@ class MockReputationResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/reputation/export') and command_name == 'demisto-api-get': + if command_uri.startswith('/reputation/export') and command_name == 'core-api-get': return True, [{'id': name} for name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/reputation/') and command_name == 'demisto-api-delete': + if command_uri.startswith('/reputation/') and command_name == 'core-api-delete': name = command_uri.split('/reputation/')[1] if name in self.xsoar_state_ids: return True, None @@ -377,18 +377,18 @@ class MockLayoutResponses(MockEntityResponses): def search_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/layout/') and command_name == 'demisto-api-get': + if command_uri.startswith('/layout/') and command_name == 'core-api-get': name = command_uri.split('/layout/')[1] if name in self.xsoar_state_ids: return True, {'id': name} return False, 'Id not Found' - if command_uri == '/layouts' and command_name == 'demisto-api-get': + if command_uri == '/layouts' and command_name == 'core-api-get': return True, [{'id': name} for name in self.xsoar_state_ids] return False, False def delete_response(self, command_name, command_args): command_uri = command_args.get('uri') - if command_uri.startswith('/layout/') and command_uri.endswith('/remove') and command_name == 'demisto-api-post': + if command_uri.startswith('/layout/') and command_uri.endswith('/remove') and command_name == 'core-api-post': name = command_uri.split('/layout/')[1] name = name.split('/remove')[0] if name in self.xsoar_state_ids: diff --git a/Packs/ContentManagement/Scripts/JobCreator/JobCreator.py b/Packs/ContentManagement/Scripts/JobCreator/JobCreator.py index cd1f043dca17..a242c32fddd8 100644 --- a/Packs/ContentManagement/Scripts/JobCreator/JobCreator.py +++ b/Packs/ContentManagement/Scripts/JobCreator/JobCreator.py @@ -28,7 +28,7 @@ def configure_job(job_name: str, existing_job: Optional[Dict[str, Any]] = None, args['using'] = instance_name status, res = execute_command( - 'demisto-api-post', + 'core-api-post', args, fail_on_error=False, ) @@ -46,7 +46,7 @@ def search_existing_job(job_name: str, instance_name: str = None) -> Dict[str, A Args: job_name (str): The name of the job to update it's past configurations. - instance_name (str): Demisto REST API instance name. + instance_name (str): Core REST API instance name. Returns: Dict[str, Any]. The job data as configured on the machine. @@ -63,7 +63,7 @@ def search_existing_job(job_name: str, instance_name: str = None) -> Dict[str, A args['using'] = instance_name status, res = execute_command( - 'demisto-api-post', + 'core-api-post', args, fail_on_error=False, ) diff --git a/Packs/ContentManagement/Scripts/JobCreator/JobCreator.yml b/Packs/ContentManagement/Scripts/JobCreator/JobCreator.yml index ed114b3f7307..ff9218317242 100644 --- a/Packs/ContentManagement/Scripts/JobCreator/JobCreator.yml +++ b/Packs/ContentManagement/Scripts/JobCreator/JobCreator.yml @@ -19,7 +19,7 @@ tags: - Content Management timeout: '0' type: python -dockerimage: demisto/xsoar-tools:1.0.0.42327 +dockerimage: demisto/xsoar-tools:1.0.0.83431 tests: - No tests (auto formatted) fromversion: 6.0.0 diff --git a/Packs/ContentManagement/Scripts/MarketplacePackInstaller/MarketplacePackInstaller.py b/Packs/ContentManagement/Scripts/MarketplacePackInstaller/MarketplacePackInstaller.py index 9adf0f442971..1d8ebf8b8b81 100644 --- a/Packs/ContentManagement/Scripts/MarketplacePackInstaller/MarketplacePackInstaller.py +++ b/Packs/ContentManagement/Scripts/MarketplacePackInstaller/MarketplacePackInstaller.py @@ -32,7 +32,7 @@ def get_installed_packs(self) -> None: args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-get', + 'core-api-get', args, fail_on_error=False, ) @@ -68,7 +68,7 @@ def get_pack_data_from_marketplace(self, pack_id: str) -> Dict[str, str]: args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-get', + 'core-api-get', args, fail_on_error=False, ) @@ -108,7 +108,7 @@ def get_pack_dependencies_from_marketplace(self, pack_data: Dict[str, str]) -> D args['using'] = self.instance_name status, res = execute_command( - 'demisto-api-post', + 'core-api-post', args, fail_on_error=False, ) @@ -184,7 +184,7 @@ def install_packs(self, packs_to_install: List[Dict[str, str]]) -> None: args['using'] = self.instance_name execute_command( - 'demisto-api-post', + 'core-api-post', args, extract_contents=False ) diff --git a/Packs/ContentManagement/pack_metadata.json b/Packs/ContentManagement/pack_metadata.json index 5e1896f1c408..2ac7be55d176 100644 --- a/Packs/ContentManagement/pack_metadata.json +++ b/Packs/ContentManagement/pack_metadata.json @@ -2,7 +2,7 @@ "name": "XSOAR CI/CD", "description": "This pack enables you to orchestrate your XSOAR system configuration.", "support": "xsoar", - "currentVersion": "1.2.14", + "currentVersion": "1.2.15", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/ContentTesting/ReleaseNotes/2_1_2.json b/Packs/ContentTesting/ReleaseNotes/2_1_2.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/ContentTesting/ReleaseNotes/2_1_2.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/ContentTesting/ReleaseNotes/2_1_2.md b/Packs/ContentTesting/ReleaseNotes/2_1_2.md new file mode 100644 index 000000000000..b3f8568ff60c --- /dev/null +++ b/Packs/ContentTesting/ReleaseNotes/2_1_2.md @@ -0,0 +1,39 @@ + +#### Scripts + +##### UnitTestPlaybookAnalyzer + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UnitTestCoverage + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UnitTestSaveContextList + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ContentDependencies + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ListPlaybookAutomationsCommands + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UnitTest + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UpgradeCheck + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### ChangeHistory + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UnitTestSaveFieldsList + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.py b/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.py index 200b41ba25d0..ec0e5874ee19 100644 --- a/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.py +++ b/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.py @@ -1,7 +1,7 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 -from typing import Dict, Any +from typing import Any vcuris = [ "/vc/history/list/all/-1", @@ -20,20 +20,17 @@ def main(): try: # Get the local, uncommitted changed objects - changes = demisto.executeCommand("demisto-api-get", { + changes = demisto.executeCommand("core-api-get", { 'uri': "/vc/changes/uncommitted" })[0]['Contents']['response'] # Build the changed object dictionary - itypes: Dict[str, Dict[str, Dict[str, Any]]] + itypes: dict[str, dict[str, dict[str, Any]]] itypes = {} if changes is not None: for item in changes: - if "message" in item: - msg = item['message'] - else: - msg = "no message" + msg = item.get("message", "no message") if item['type'] not in itypes: itypes[item['type']] = {} itypes[item['type']][item['name']] = {"action": item['action'], "message": msg, "history": []} @@ -41,7 +38,7 @@ def main(): # Get all the commit histories commits = [] for uri in vcuris: - commits.append(demisto.executeCommand("demisto-api-get", { + commits.append(demisto.executeCommand("core-api-get", { "uri": uri })[0]['Contents']['response']['commits']) diff --git a/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.yml b/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.yml index e39546de4c4b..113620fc297d 100644 --- a/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.yml +++ b/Packs/ContentTesting/Scripts/ChangeHistory/ChangeHistory.yml @@ -4,7 +4,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ChangeHistory comment: "" diff --git a/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.py b/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.py index 9fc8dd799d7b..881c843e4def 100644 --- a/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.py +++ b/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.py @@ -16,7 +16,7 @@ def GetAutomation(scriptid: str): - results = demisto.executeCommand("demisto-api-post", { + results = demisto.executeCommand("core-api-post", { "uri": f"/automation/load/{scriptid}" }) if is_error(results): @@ -29,7 +29,7 @@ def GetAutomationName(scriptid: str) -> str: octets = scriptid.split('-') if len(octets) == 5: if len(octets[0]) == 8 and len(octets[1]) == 4 and len(octets[2]) == 4 and len(octets[3]) == 4 and len(octets[4]) == 12: - results = demisto.executeCommand("demisto-api-post", { + results = demisto.executeCommand("core-api-post", { "uri": f"/automation/load/{scriptid}" }) if is_error(results): @@ -70,26 +70,23 @@ def CalledAutomation(scrname: str, script: str) -> list: if 'func=Attribute' in lin: watchatt = True continue - if watchatt: - if 'attr=' in lin: - name = lin.split("'")[1] - watchatt = False - if name == "executeCommand": - watcharg = True - continue - if watcharg: - if "args=[" in lin: - watcharg = False - watchval = True + if watchatt and 'attr=' in lin: + name = lin.split("'")[1] + watchatt = False + if name == "executeCommand": + watcharg = True continue - if watchval: - if "Constant(value=" in lin: - parts = lin.split("'") - if len(parts) > 1: - name = parts[1] - watchval = False - watchname = False - names.append(name) + if watcharg and "args=[" in lin: + watcharg = False + watchval = True + continue + if watchval and "Constant(value=" in lin: + parts = lin.split("'") + if len(parts) > 1: + name = parts[1] + watchval = False + watchname = False + names.append(name) final = [] names = list(set(names)) @@ -102,7 +99,7 @@ def CalledAutomation(scrname: str, script: str) -> list: def GetPlaybooks(query: str) -> list: if query != "": query = " AND " + query - playbooks = demisto.executeCommand("demisto-api-post", { + playbooks = demisto.executeCommand("core-api-post", { "uri": "/playbook/search", "body": {"query": f"hidden:F AND deprecated:F {query}"} })[0]['Contents']['response']['playbooks'] @@ -115,14 +112,14 @@ def GetEntities(playbooks: list) -> dict: for p in playbooks: pbname = p['name'] entities[pbname] = {'etype': "playbook", 'pcalled': [], 'pcalls': [], 'scalled': [], 'scalls': []} - for key, t in p['tasks'].items(): + for _key, t in p['tasks'].items(): if t['type'] == "playbook": spbname = t['task'].get('name', "notaskname") if spbname not in entities: entities[spbname] = {'etype': "playbook", 'pcalled': [], 'pcalls': [], 'scalled': [], 'scalls': []} entities[pbname]['pcalls'].append(spbname) # type: ignore entities[spbname]['pcalled'].append(pbname) # type: ignore - elif "scriptId" in t['task'].keys(): + elif "scriptId" in t['task']: scrname = GetAutomationName(t['task']['scriptId']) if scrname != "": scrname, script, stype = GetAutomation(scrname) diff --git a/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.yml b/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.yml index fd224b28a6ad..6116f93137ce 100644 --- a/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.yml +++ b/Packs/ContentTesting/Scripts/ContentDependencies/ContentDependencies.yml @@ -1,26 +1,26 @@ args: - default: true defaultValue: markdown - description: '"markdown" or "csv"' + description: 'markdown" or "csv.' name: format -- description: File name for CSV data +- description: File name for CSV data. name: filename -- description: 'Playbook search query to limit scope. For example: "name:Cortex*" to limit scope playbook names starting with "Cortex"' +- description: 'Playbook search query to limit scope. For example: "name:Cortex*" to limit scope playbook names starting with "Cortex".' name: query -- description: Incident field to update markdown for display or blank to return results to war room +- description: Incident field to update markdown for display or blank to return results to war room. name: fieldname comment: |- Searches a set of playbooks, or all playbooks if no playbook query is provided, and identifies all dependencies between playbooks and automations and outputs either CSV or markdown. WARNING: Should be run on DEV since it may consume 100% CPU for 10 or more minutes if all playbooks are searched. This automation should be run in dev environments. It will consume 100% CPU for 10 minutes or more - depending on the amount of playbook and automation content. It is set to timeout at 15 minutes in Advanced settings. This may need to be increased if content amount is large. It only parses python scripts to see if additional automations/commands are invoked via demisto.executeCommand or execute_command. Javascript automations are not parsed. Command names passed in a variable to demisto.executeCommand or execute_command are not reported. If a python automation fails to parse, an error is reported in the war room: any automations it calls are not reported. - Integration commands and builtins are not parsed + Integration commands and builtins are not parsed. commonfields: id: ContentDependencies version: -1 contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ContentDependencies runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.py b/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.py index 31750f03498a..09c06042acd2 100644 --- a/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.py +++ b/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.py @@ -2,21 +2,19 @@ from CommonServerPython import * # noqa: F401 # Final Test: 6.10 import uuid -from typing import Dict def GetAutomationName(id): - results = demisto.executeCommand("demisto-api-post", { + results = demisto.executeCommand("core-api-post", { "uri": f"/automation/load/{id}" })[0]['Contents'] - if 'response' in results: - if 'name' in results['response']: - return results['response']['name'] + if 'response' in results and 'name' in results['response']: + return results['response']['name'] return "" def GetPlaybooks(): - response = demisto.executeCommand("demisto-api-post", { + response = demisto.executeCommand("core-api-post", { "uri": "/playbook/search", "body": {"query": "hidden:F AND deprecated:F"} })[0]['Contents']['response']['playbooks'] @@ -28,11 +26,11 @@ def GetPlaybooks(): def GetAutomationsUsed(playbooks): - automations: Dict[str, Dict[str, str]] + automations: dict[str, dict[str, str]] automations = {} for p in playbooks: - for key, t in p['tasks'].items(): - if "scriptId" in t['task'].keys(): + for _key, t in p['tasks'].items(): + if "scriptId" in t['task']: s = t['task']['scriptId'] try: uuid.UUID(s) @@ -52,7 +50,7 @@ def main(): output = "" for key, val in scripts.items(): output += f"### {key}\n" - for akey, aval in val.items(): + for akey, _aval in val.items(): output += f"{akey}\n" demisto.executeCommand("setIncident", {'customFields': json.dumps({"contenttestingcontentautomations": output})}) except Exception as ex: diff --git a/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.yml b/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.yml index 92c7df0e4869..90a5d454a56a 100644 --- a/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.yml +++ b/Packs/ContentTesting/Scripts/ListPlaybookAutomationsCommands/ListPlaybookAutomationsCommands.yml @@ -1,12 +1,12 @@ -comment: | - Check Upgrade and Display Changes +comment: |- + Check Upgrade and Display Changes. commonfields: id: ListPlaybookAutomationsCommands version: -1 contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.12.68300 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ListPlaybookAutomationsCommands runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py index 3d81fd978d95..2ace8d3b9fc1 100644 --- a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py +++ b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py @@ -5,14 +5,14 @@ def GetAutomationId(name): - autoId = demisto.executeCommand("demisto-api-post", { + autoId = demisto.executeCommand("core-api-post", { 'uri': f"/automation/load/{name}" })[0]['Contents']['response']['id'] return autoId def GetPlaybookId(name): - playbook = demisto.executeCommand("demisto-api-post", { + playbook = demisto.executeCommand("core-api-post", { 'uri': "/playbook/search", "body": {"query": "name:" + f'"{name}"'} })[0]['Contents']['response']['playbooks'] @@ -56,7 +56,7 @@ def RunUTResults(args): # Add the task to display unit test results attempts = 0 while attempts < 5: - results = demisto.executeCommand("demisto-api-post", { + results = demisto.executeCommand("core-api-post", { 'uri': f"/inv-playbook/task/add/{incid}", 'body': task })[0]['Contents'] @@ -71,7 +71,7 @@ def RunUTResults(args): new_id = "0" task_id = "0" if attempts < 5: - for key, val in tasks.items(): + for _key, val in tasks.items(): if "scriptId" in val['task']: if val['task']['scriptId'] == scriptid and val['task']['name'] == "DisplayUnitTestResults": new_id = val['id'] @@ -85,7 +85,7 @@ def RunUTResults(args): contents = demisto.executeCommand("demisto-lock-get", {'name': gridfld, 'timeout': 60})[0]['Contents'] if "Lock acquired successfully" in contents: while attempts < 5: - start_response = demisto.executeCommand("demisto-api-post", { + start_response = demisto.executeCommand("core-api-post", { 'uri': "/inv-playbook/task/execute", 'body': { 'taskinfo': { @@ -130,29 +130,28 @@ def RunAdhocPlaybook(playbookname, taskname, addafter, incid): 'version': -1 } # Add the playbook as a task - tasks = demisto.executeCommand("demisto-api-post", { + tasks = demisto.executeCommand("core-api-post", { 'uri': f"/inv-playbook/task/add/{incid}", 'body': task })[0]['Contents']['response']['tasks'] # Find the new task ID in the updated playbook and execute the task for key, task in tasks.items(): - if "name" in task['task']: - if task['task']['name'] == taskname: - demisto.executeCommand("demisto-api-post", { - 'uri': "/inv-playbook/task/execute", - 'body': { - 'taskinfo': { - 'invId': incid, - 'inTaskID': key, - 'version': -1, - 'args': {}, - 'loopArgs': {} - }, - 'playbooksdebuginfo': {}, - 'pageSize': 50 - } - }) + if "name" in task['task'] and task['task']['name'] == taskname: + demisto.executeCommand("core-api-post", { + 'uri': "/inv-playbook/task/execute", + 'body': { + 'taskinfo': { + 'invId': incid, + 'inTaskID': key, + 'version': -1, + 'args': {}, + 'loopArgs': {} + }, + 'playbooksdebuginfo': {}, + 'pageSize': 50 + } + }) except Exception as ex: demisto.error(traceback.format_exc()) return_error(f"RunAdhocPlaybook: Exception failed to execute. Error: {str(ex)}") diff --git a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml index cbde00587eca..401bbc49f83e 100644 --- a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml +++ b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml @@ -1,17 +1,17 @@ args: -- description: Playbook to Execute +- description: Playbook to Execute. name: playbook -- description: Playbook Task to Add This Task After +- description: Playbook Task to Add This Task After. name: addAfter - auto: PREDEFINED - description: Type of Test to Run + description: Type of Test to Run. name: testType predefined: - Playbook - Subplaybook - Automation - Multiselect -- description: List to Read Subplaybooks or Automations From +- description: List to Read Subplaybooks or Automations From. name: listName commonfields: id: UnitTest @@ -19,10 +19,10 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UnitTest -comment: "Provides for automated testing of automations, playbooks, and sub-playbooks" +comment: "Provides for automated testing of automations, playbooks, and sub-playbooks." runas: DBotWeakRole script: '' scripttarget: 0 diff --git a/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.py b/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.py index 239db336e486..fc53e7a027cd 100644 --- a/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.py +++ b/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.py @@ -3,15 +3,15 @@ def GetTasks(incid: str, playbookname: str) -> dict: - response = execute_command("demisto-api-get", { + response = execute_command("core-api-get", { "uri": f"/inv-playbook/{incid}"}) tasks = {} - for key, t in response['response']['tasks'].items(): + for _key, t in response['response']['tasks'].items(): if t['type'] == "playbook": sub = t['subPlaybook'] if sub['name'] == playbookname: - for key, task in sub['tasks'].items(): + for _key, task in sub['tasks'].items(): if task['type'] == "regular" or task['type'] == "playbook" or task['type'] == "condition": completed = 0 if 'state' in task: @@ -34,14 +34,14 @@ def TaskCoverageMarkdown(tasks: Dict) -> str: if len(tasks) == 0: markdown += "|No Tasks Found||||\n" return markdown - for key, val in tasks.items(): + for _key, val in tasks.items(): markdown += f"|{val['name']}|{val['count']}|{val['completed']}|{val['completed']/val['count']*100}%|\n" return markdown def GetAutomationName(scriptid) -> str: - results = demisto.executeCommand("demisto-api-post", { + results = demisto.executeCommand("core-api-post", { "uri": f"/automation/load/{scriptid}" })[0] if "response" not in results.keys(): diff --git a/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.yml b/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.yml index beafb6ebc47d..d1a542d8012c 100644 --- a/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.yml +++ b/Packs/ContentTesting/Scripts/UnitTestCoverage/UnitTestCoverage.yml @@ -9,7 +9,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UnitTestCoverage runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.py b/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.py index ff0b13ae443b..a07138b75985 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.py +++ b/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.py @@ -30,8 +30,8 @@ def BuildTask(t) -> dict: def GetSubpbTasks(subplaybook, t, tasks): - if "subPlaybook" in t.keys(): - for k, ts in t['subPlaybook']['tasks'].items(): + if "subPlaybook" in t: + for _k, ts in t['subPlaybook']['tasks'].items(): if subplaybook == t['subPlaybook']['name']: if (ts['type'] in ["regular", "condition", "playbook", "collection"]): tasks.append(BuildTask(ts)) @@ -41,11 +41,11 @@ def GetSubpbTasks(subplaybook, t, tasks): def GetTasks(incid: str, subplaybook: str) -> list: - resp = execute_command("demisto-api-get", { + resp = execute_command("core-api-get", { "uri": f"/inv-playbook/{incid}"}) tasks: list = [] - for key, t in resp['response']['tasks'].items(): + for _key, t in resp['response']['tasks'].items(): if (t['type'] in ["regular", "condition", "playbook", "collection"]): if t['type'] == "playbook" and subplaybook != "": tasks = GetSubpbTasks(subplaybook, t, tasks) @@ -90,7 +90,7 @@ def TaskStats(task: list, taskstat: dict) -> dict: taskstat[taskid]['notexecuted'] += t['notexecuted'] taskstat[taskid]['count'] += 1 - for key, ts in taskstat.items(): + for _key, ts in taskstat.items(): ts['avgdur'] = int(ts['totdur'] / ts['count']) return taskstat @@ -128,7 +128,7 @@ def StatsInfoMarkdown(stats: dict) -> str: markdown += "|Task Name|Minimum Duration(ms)|Average Duration(ms)|Maximum Duration(ms)|\n" markdown += "|---|:---:|:---:|:---:|\n" - for key, val in stats.items(): + for _key, val in stats.items(): if val['mindur'] is None: val['mindur'] = 0 markdown += f"|{val['name']}|{val['mindur']}|{val['avgdur']}|{val['maxdur']}|\n" diff --git a/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.yml b/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.yml index e457a016011c..d632948ad117 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.yml +++ b/Packs/ContentTesting/Scripts/UnitTestPlaybookAnalyzer/UnitTestPlaybookAnalyzer.yml @@ -1,16 +1,16 @@ args: -- description: Name of the playbook to analyze +- description: Name of the playbook to analyze. name: playbook required: true -- description: Sub-playbook for analysis versus the parent playbook +- description: Sub-playbook for analysis versus the parent playbook. name: subplaybook -- description: 'First day to find incident occurrences using the playbook. Example: "2023-03-01"' +- description: 'First day to find incident occurrences using the playbook. Example: "2023-03-01".' name: firstday required: true -- description: 'Last day to find incident occurrences using the playbook: Example: "2023-03-31"' +- description: 'Last day to find incident occurrences using the playbook: Example: "2023-03-31".' name: lastday required: true -- description: Maximum number of incidents to analyze +- description: Maximum number of incidents to analyze. name: maxinc required: false comment: | @@ -21,7 +21,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UnitTestPlaybookAnalyzer runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.py b/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.py index e717ea1ae184..20daae59c339 100644 --- a/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.py +++ b/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.py @@ -6,7 +6,7 @@ def main(): try: listname = demisto.args()['list'] context = demisto.context() - res = demisto.executeCommand('demisto-api-post', { + res = demisto.executeCommand('core-api-post', { "uri": '/lists/save', "body": { 'name': listname, diff --git a/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.yml b/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.yml index 117dc894e901..c4c7d6f6daad 100644 --- a/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.yml +++ b/Packs/ContentTesting/Scripts/UnitTestSaveContextList/UnitTestSaveContextList.yml @@ -1,5 +1,5 @@ args: -- description: List to Save Context To +- description: List to Save Context To. name: list required: true commonfields: @@ -8,7 +8,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UnitTestSaveContextList comment: '' diff --git a/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.py b/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.py index 492824b039e6..a78cf9d67512 100644 --- a/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.py +++ b/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.py @@ -6,7 +6,7 @@ def main(): try: listname = demisto.args()['list'] incident = demisto.incident() - res = demisto.executeCommand('demisto-api-post', { + res = demisto.executeCommand('core-api-post', { "uri": '/lists/save', "body": { 'name': listname, diff --git a/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.yml b/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.yml index d786355f9bad..301caf5851e9 100644 --- a/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.yml +++ b/Packs/ContentTesting/Scripts/UnitTestSaveFieldsList/UnitTestSaveFieldsList.yml @@ -1,5 +1,5 @@ args: -- description: List to Save Incident Fields To +- description: List to Save Incident Fields To. name: list required: true commonfields: @@ -9,7 +9,7 @@ contentitemexportablefields: contentitemfields: fromServerVersion: "" comment: '' -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UnitTestSaveFieldsList runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.py b/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.py index d68988cc3305..50eef8710808 100644 --- a/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.py +++ b/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.py @@ -1,7 +1,6 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 -from typing import Dict, List INDENT = "##### " @@ -55,7 +54,7 @@ def CheckUpdates(packs, types, playbook, layout): def GetUpgradedPacks(): - response = demisto.executeCommand("demisto-api-get", { + response = demisto.executeCommand("core-api-get", { 'uri': "/contentpacks/installed-expired", 'body': "" })[0]['Contents']['response'] @@ -70,15 +69,15 @@ def GetUpgradedPacks(): breaking = "" newver = NewVersion(r['currentVersion']) - if newver in r['changelog'].keys(): + if newver in r['changelog']: changes = r['changelog'][newver]['releaseNotes'] breaking = r['changelog'][newver]['breakingChangesNotes'] newver = NewMinVersion(r['currentVersion']) - if newver in r['changelog'].keys(): + if newver in r['changelog']: changes = r['changelog'][newver]['releaseNotes'] breaking = r['changelog'][newver]['breakingChangesNotes'] newver = NewMajVersion(r['currentVersion']) - if newver in r['changelog'].keys(): + if newver in r['changelog']: changes = r['changelog'][newver]['releaseNotes'] breaking = r['changelog'][newver]['breakingChangesNotes'] @@ -93,7 +92,7 @@ def FilterPacks(packs, upgradePacks, changesPacks): return upgradePacks, changesPacks upgrade = upgradePacks.copy() - for packid, pack in upgrade.items(): + for packid, _pack in upgrade.items(): if packid.lower().replace(" ", "") in packlist: continue else: @@ -104,7 +103,7 @@ def FilterPacks(packs, upgradePacks, changesPacks): def GetUpgradedIntegrations(packs): - response = demisto.executeCommand("demisto-api-post", { + response = demisto.executeCommand("core-api-post", { 'uri': "/settings/integration/search", "body": {} })[0]['Contents']['response'] @@ -123,7 +122,7 @@ def GetUpgradedIntegrations(packs): instid = c['id'] if c['packName'] == "Palo Alto Networks Cortex XDR - Investigation and Response": instid = "Palo Alto Networks Cortex XDR - Investigation and Response" - if instid in integmap.keys(): + if instid in integmap: packid = integmap[instid] integrations[packid] = { "classifier": c.get('defaultClassifier', ""), @@ -137,7 +136,7 @@ def GetUpgradedIntegrations(packs): name = i['name'] if instid == "Cortex XDR - IR": instid = "Palo Alto Networks Cortex XDR - Investigation and Response" - if instid in integmap.keys(): + if instid in integmap: packid = integmap[instid] integrations[packid]['instance'] = name @@ -145,7 +144,7 @@ def GetUpgradedIntegrations(packs): def GetCustomPlaybooks(): - response = demisto.executeCommand("demisto-api-post", { + response = demisto.executeCommand("core-api-post", { 'uri': "/playbook/search", "body": {'query': "system:F AND hidden:F AND deprecated:F"} })[0]['Contents']['response']['playbooks'] @@ -174,7 +173,7 @@ def GetFieldKey(inoutfield): def GetFieldsUsed(playbooks): - usedfields: Dict[str, List[str]] + usedfields: dict[str, list[str]] usedfields = {} regex = re.compile("\$\{incident\.[^}]+\}") @@ -186,8 +185,8 @@ def GetFieldsUsed(playbooks): if p['outputs'] is not None: usedfields[name].append(GetFieldKey(p['outputs'])) - for key, t in p['tasks'].items(): - if "scriptArguments" in t.keys(): + for _key, t in p['tasks'].items(): + if "scriptArguments" in t: for m in regex.findall(json.dumps(t)): usedfields[name].append(GetFieldKey(m)) @@ -197,10 +196,9 @@ def GetFieldsUsed(playbooks): def GetSubplaybooksUsed(playbooks): usedplaybooks = [] for p in playbooks: - for key, t in p['tasks'].items(): - if t['type'] == 'playbook': - if 'name' in p and 'name' in t['task']: - usedplaybooks.append({"parent": p['name'], "child": t['task']['name']}) + for _key, t in p['tasks'].items(): + if t['type'] == 'playbook' and 'name' in p and 'name' in t['task']: + usedplaybooks.append({"parent": p['name'], "child": t['task']['name']}) return (usedplaybooks) @@ -218,12 +216,12 @@ def GetAutomationsUsed(playbooks): def GetUpgradedScripts(packs, scripts): scriptdict = {} - for index, value in enumerate(scripts): + for _index, value in enumerate(scripts): scriptdict[value['scripts']] = value upgscripts = [] for p in packs: - response = demisto.executeCommand("demisto-api-get", { + response = demisto.executeCommand("core-api-get", { "uri": f"/contentpacks/marketplace/{p}", "body": "" } @@ -232,7 +230,7 @@ def GetUpgradedScripts(packs, scripts): if automations is not None: for a in automations: - if a['name'] in scriptdict.keys(): + if a['name'] in scriptdict: s = scriptdict[a['name']] upgscripts.append({"playbook": s['playbook'], "pack": p, "script": s['scripts']}) @@ -240,7 +238,7 @@ def GetUpgradedScripts(packs, scripts): def GetUpgradedIncidentTypes(packs): - response = demisto.executeCommand("demisto-api-get", { + response = demisto.executeCommand("core-api-get", { 'uri': "/incidenttype", 'body': "" } @@ -254,7 +252,7 @@ def GetUpgradedIncidentTypes(packs): custype = {'id': r['id'], 'playbook': pb, 'layout': lo, 'packid': ""} custtypes.append(custype) pi = r.get('packID', "") - if pi in packs.keys(): + if pi in packs: uptypes[pi] = {'playbook': pb, 'layout': lo, 'packid': pi} return (uptypes, custtypes) diff --git a/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.yml b/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.yml index c49c3a12e942..9374d3a80118 100644 --- a/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.yml +++ b/Packs/ContentTesting/Scripts/UpgradeCheck/UpgradeCheck.yml @@ -1,12 +1,12 @@ -comment: | - Check content pack upgrade impacts and display changes. Packs argument is comma separated list of content pack names, or blank for all content packs to assess +comment: |- + Check content pack upgrade impacts and display changes. Packs argument is comma separated list of content pack names, or blank for all content packs to assess. commonfields: id: UpgradeCheck version: -1 contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.10.13.72123 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UpgradeCheck runas: DBotWeakRole @@ -20,6 +20,6 @@ tests: - No tests (auto formatted) timeout: 1.2µs args: -- description: Comma separated list of packs that should be analyzed +- description: Comma separated list of packs that should be analyzed. name: packs runonce: false diff --git a/Packs/ContentTesting/pack_metadata.json b/Packs/ContentTesting/pack_metadata.json index 31b6eedd3800..ea7f0124ae1a 100644 --- a/Packs/ContentTesting/pack_metadata.json +++ b/Packs/ContentTesting/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Content Testing", "description": "Supports assessment of upgraded Marketplace content packs against custom content and enables content testing within XSOAR. Dynamically select and test automations, playbooks, and sub-playbooks as required prior to push to production. Create a \"UnitTesting\" incident type and review the \"Help\" tab in the layout for description of the tools available and the examples using the testing tools.", "support": "community", - "currentVersion": "2.1.1", + "currentVersion": "2.1.2", "author": "rurhrlaub", "url": "", "email": "", diff --git a/Packs/DemistoRESTAPI/Integrations/CoreRESTAPI/CoreRESTAPI.yml b/Packs/DemistoRESTAPI/Integrations/CoreRESTAPI/CoreRESTAPI.yml index 4fba720d4106..e16516df6901 100644 --- a/Packs/DemistoRESTAPI/Integrations/CoreRESTAPI/CoreRESTAPI.yml +++ b/Packs/DemistoRESTAPI/Integrations/CoreRESTAPI/CoreRESTAPI.yml @@ -56,15 +56,17 @@ script: description: Request endpoint (e.g. /incident or /public_api/v1/incidents/update_incident). - name: body description: Body of HTTP POST. - description: send HTTP POST request. + description: Deprecated. Use core-api-post instead. execution: true + deprecated: true - name: demisto-api-get arguments: - name: uri required: true default: true description: Request endpoint (e.g. /user or /public_api/v1/rbac/get_users). - description: send HTTP GET requests. + description: Deprecated. Use core-api-get instead. + deprecated: true - name: demisto-api-put arguments: - name: uri @@ -73,16 +75,18 @@ script: description: Request endpoint (e.g. /user). - name: body description: Request body. - description: send HTTP PUT request. + description: Deprecated. Use core-api-put instead. execution: true + deprecated: true - name: demisto-api-delete arguments: - name: uri required: true default: true description: Request endpoint (e.g. /user). - description: send HTTP DELETE request. + description: Deprecated. Use core-api-delete instead. execution: true + deprecated: true - name: demisto-api-download arguments: - name: uri @@ -92,7 +96,8 @@ script: description: File name of download. - name: description description: Description of file entry. - description: Download files from Demisto server. + description: Deprecated. Use core-api-download instead. + deprecated: true - name: demisto-api-multipart arguments: - name: uri @@ -103,7 +108,8 @@ script: description: File entry ID. - name: body description: Request body. - description: Send HTTP Multipart request to upload files to Demisto server. + description: Deprecated. Use core-api-multipart instead. + deprecated: true - name: demisto-delete-incidents arguments: - name: ids @@ -114,8 +120,9 @@ script: description: 'Comma separated list of fields to return, case sensitive. Set "all" for all fields. WARNING: Setting all fields may result in big results.' isArray: true defaultValue: id,name,type,severity,status - description: Delete Demisto incidents. + description: Deprecated. Use core-delete-incidents instead. execution: true + deprecated: true - name: demisto-api-install-packs arguments: - name: packs_to_install @@ -139,7 +146,8 @@ script: predefined: - 'true' - 'false' - description: Upload packs to Demisto server from url or the marketplace. + description: Deprecated. Use core-api-install-packs instead. + deprecated: true - name: core-api-post arguments: - name: uri diff --git a/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.json b/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.md b/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.md new file mode 100644 index 000000000000..f15cd8e4e8d3 --- /dev/null +++ b/Packs/DemistoRESTAPI/ReleaseNotes/1_3_42.md @@ -0,0 +1,52 @@ + +#### Integrations + +##### Core REST API + +- Command ***demisto-api-multipart*** is deprecated. Use ***core-api-multipart*** instead. +- Command ***demisto-api-post*** is deprecated. Use ***core-api-post*** instead. +- Command ***demisto-api-put*** is deprecated. Use ***core-api-put*** instead. +- Command ***demisto-api-get*** is deprecated. Use ***core-api-get*** instead. +- Command ***demisto-api-delete*** is deprecated. Use ***core-api-delete*** instead. +- Command ***demisto-api-download*** is deprecated. Use ***core-api-download*** instead. +- Command ***demisto-api-install-packs*** is deprecated. Use ***core-api-install-packs*** instead. +- Command ***demisto-delete-incidents*** is deprecated. Use ***core-delete-incidents*** instead. + +#### Scripts + +##### DemistoUploadFile + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoGetIncidentTasksByState + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoUploadFileToIncident + +- Updated the Docker image to: *demisto/python:2.7.18.76921*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoLinkIncidents + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoLeaveAllInvestigations + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoUploadFileV2 + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoLogsBundle + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### UploadFile + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoSendInvite + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### DemistoCreateList + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### GetIncidentTasksByState + +Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.js b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.js index 1c4acb2b3f53..9822a356baa9 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.js @@ -3,7 +3,7 @@ var body = { data: args.listData, }; -var res = executeCommand('demisto-api-post', {uri: '/lists/save', body: body}); +var res = executeCommand('core-api-post', {uri: '/lists/save', body: body}); if (isError(res[0])) { throw res[0].Contents; diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.yml b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.yml index 285402859dd9..418737f99ba8 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/DemistoCreateList.yml @@ -6,21 +6,21 @@ script: '' type: javascript tags: - DemistoAPI -comment: Create a new list +comment: Create a new list. enabled: true args: - name: listName required: true default: true - description: Name of list to create + description: Name of list to create. - name: listData - description: Initial data of list + description: Initial data of list. scripttarget: 0 dependson: must: - - demisto-api-post + - core-api-post fromversion: 5.0.0 marketplaces: - xsoar tests: -- no test \ No newline at end of file +- no test diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/README.md index 5a76c0393e2d..218d0e5743cd 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoCreateList/README.md @@ -1,6 +1,7 @@ Creates a new list. ## Script Data + --- | **Name** | **Description** | @@ -10,11 +11,14 @@ Creates a new list. ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post + +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -23,5 +27,6 @@ This script uses the following commands and scripts. | listData | The initial data of the list. | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoGetIncidentTasksByState/DemistoGetIncidentTasksByState.js b/Packs/DemistoRESTAPI/Scripts/DemistoGetIncidentTasksByState/DemistoGetIncidentTasksByState.js index 69a766280bfe..d744b788aa2e 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoGetIncidentTasksByState/DemistoGetIncidentTasksByState.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoGetIncidentTasksByState/DemistoGetIncidentTasksByState.js @@ -56,7 +56,7 @@ function getStates(states) { var states = getStates(args.states || ''); var incidentId = args.incidentId; -var res = executeCommand('demisto-api-get', {'uri': '/investigation/' + incidentId + '/workplan'}); +var res = executeCommand('core-api-get', {'uri': '/investigation/' + incidentId + '/workplan'}); if (isError(res[0])) { return res; } diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.js b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.js index bdd3d1fe4c73..88db4ddd06ce 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.js @@ -24,7 +24,7 @@ if (ids && ids.length > 0) { ids.forEach(function(id) { var uri = account + '/investigation/' + id + '/deleteuser/' + username; addEntry('Leaving investigation ' + id + '...'); - var res = executeCommand('demisto-api-post', {uri: uri, body: {}}); + var res = executeCommand('core-api-post', {uri: uri, body: {}}); if (isError(res[0])) { errors.push(res[0]); } diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.yml b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.yml index cd47d6a4dede..3642179f6a96 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/DemistoLeaveAllInvestigations.yml @@ -12,7 +12,7 @@ scripttarget: 0 runas: DBotWeakRole dependson: must: - - demisto-api-post + - core-api-post tests: - No test fromversion: 5.0.0 diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/README.md index c1041a921419..3c0f7f976d5d 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLeaveAllInvestigations/README.md @@ -1,5 +1,7 @@ -Leaves all investigations that the user is part of (clears out the incidents in the left pane). The incidents owner by the user will remain in the left pane. This requires Demisto REST API integration to be configured for the server. +Leaves all investigations that the user is part of (clears out the incidents in the left pane). The incidents owner by the user will remain in the left pane. This requires Core REST API integration to be configured for the server. + ## Script Data + --- | **Name** | **Description** | @@ -9,14 +11,18 @@ Leaves all investigations that the user is part of (clears out the incidents in ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post + +* core-api-post ## Inputs + --- There are no inputs for this script. ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.js b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.js index 4088240d8b7d..e893cf3d02ef 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.js @@ -4,7 +4,7 @@ var body = { removeLink: (args.unlink === 'yes') }; -var res = executeCommand('demisto-api-post', {uri: '/incident/links', body: body}); +var res = executeCommand('core-api-post', {uri: '/incident/links', body: body}); if (isError(res[0])) { throw res[0].Contents; diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.yml b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.yml index 8b0550a887a6..f8615725ec94 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/DemistoLinkIncidents.yml @@ -12,24 +12,24 @@ args: - name: masterID required: true default: true - description: Incident ID used for linking to other incidents + description: Incident ID used for linking to other incidents. - name: otherIDs required: true - description: Incidet IDs to link + description: Incidet IDs to link. - name: unlink auto: PREDEFINED predefined: - "yes" - "no" - description: Unlink incidents (default 'no') + description: Unlink incidents (default 'no'). defaultValue: "no" scripttarget: 0 dependson: must: - - demisto-api-post + - core-api-post fromversion: 5.0.0 marketplaces: - xsoar tests: - no test -deprecated: true \ No newline at end of file +deprecated: true diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/README.md index 57ac175fe012..092577218087 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLinkIncidents/README.md @@ -1,6 +1,7 @@ Links two or more incidents. ## Script Data + --- | **Name** | **Description** | @@ -10,11 +11,14 @@ Links two or more incidents. ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post + +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -24,5 +28,6 @@ This script uses the following commands and scripts. | unlink | Whether to unlink incidents. The default is "no". | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.js b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.js index 64eb7edc5328..4d527fca7a37 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.js @@ -1 +1 @@ -return executeCommand('demisto-api-download', {uri: '/log/bundle'}); +return executeCommand('core-api-download', {uri: '/log/bundle'}); diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.yml b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.yml index 77ebd222f31a..1a04dd88418b 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/DemistoLogsBundle.yml @@ -11,7 +11,7 @@ enabled: true scripttarget: 0 dependson: must: - - demisto-api-download + - core-api-download fromversion: 5.0.0 tests: - no test diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/README.md index be86d672567f..5224a5b128c3 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoLogsBundle/README.md @@ -1,6 +1,7 @@ Gets the Cortex XSOAR Log Bundle to the War Room. ## Script Data + --- | **Name** | **Description** | @@ -10,14 +11,18 @@ Gets the Cortex XSOAR Log Bundle to the War Room. ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-download + +* core-api-download ## Inputs + --- There are no inputs for this script. ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.js b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.js index d664f79a6dd2..5a12033985c9 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.js @@ -1,4 +1,4 @@ -var res = executeCommand('demisto-api-get', {uri: '/roles'}); +var res = executeCommand('core-api-get', {uri: '/roles'}); if (isError(res[0])) { throw res[0].Contents; } @@ -20,7 +20,7 @@ body = { roles: roleIDs }; -res = executeCommand('demisto-api-post', {uri: '/invite', body: body}); +res = executeCommand('core-api-post', {uri: '/invite', body: body}); if (isError(res[0])) { throw res[0].Contents; } diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.yml b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.yml index 86eb90829b1a..05cf41fdaee3 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/DemistoSendInvite.yml @@ -12,15 +12,15 @@ args: - name: email required: true default: true - description: Email of user being invited + description: Email of user being invited. - name: roles required: true - description: Roles of invited user + description: Roles of invited user. scripttarget: 0 dependson: must: - - demisto-api-post - - demisto-api-get + - core-api-post + - core-api-get fromversion: 5.0.0 tests: - no test diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/README.md index 7cad9c7ecd15..d2a49fcf3a5d 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoSendInvite/README.md @@ -1,6 +1,7 @@ Sends an invitation to join Cortex XSOAR. ## Script Data + --- | **Name** | **Description** | @@ -10,12 +11,15 @@ Sends an invitation to join Cortex XSOAR. ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post -* demisto-api-get + +* core-api-post +* core-api-get ## Inputs + --- | **Argument Name** | **Description** | @@ -24,5 +28,6 @@ This script uses the following commands and scripts. | roles | The roles of the invited user. | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.js b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.js index 90dea7b5e566..4fbcf324aaa7 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.js +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.js @@ -1,4 +1,4 @@ -var res = executeCommand("demisto-api-multipart", {"uri":'entry/upload/' + args.incidentID,"entryID":args.entryID, "body":args.body}); +var res = executeCommand("core-api-multipart", {"uri":'entry/upload/' + args.incidentID,"entryID":args.entryID, "body":args.body}); if (isError(res[0])) { return res; } diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.yml b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.yml index d90155497c9c..2d0f6ba99f6d 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/DemistoUploadFile.yml @@ -12,16 +12,16 @@ enabled: true args: - name: entryID required: true - description: File entry ID + description: File entry ID. - name: incidentID required: true - description: Incident ID to upload the file to + description: Incident ID to upload the file to. - name: body - description: Request body + description: Request body. scripttarget: 0 dependson: must: - - demisto-api-multipart + - core-api-multipart runas: DBotWeakRole tests: - DemistoUploadFileToIncident Test diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/README.md index 6f26c08d7d98..494a06973091 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFile/README.md @@ -1,5 +1,7 @@ Copies a file from an incident to a specified incident. The file is recorded as an entry in the specified incident's War Room. + ## Script Data + --- | **Name** | **Description** | @@ -9,11 +11,14 @@ Copies a file from an incident to a specified incident. The file is recorded as ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-multipart + +* core-api-multipart ## Inputs + --- | **Argument Name** | **Description** | @@ -23,5 +28,6 @@ This script uses the following commands and scripts. | body | Request body | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.py b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.py index 24dba69dfeb6..2aaf451f8ffb 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.py +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.py @@ -5,7 +5,7 @@ def upload_file(incident_id: str, entry_id: str, body: str = '', as_incident_attachment: bool = True): service_name = 'incident' if as_incident_attachment else 'entry' - return demisto.executeCommand("demisto-api-multipart", + return demisto.executeCommand("core-api-multipart", {"uri": f'{service_name}/upload/{incident_id}', "entryID": entry_id, "body": body}) diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.yml b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.yml index 9ece6b505b0c..1a3054ff2ae4 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.yml +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2.yml @@ -6,15 +6,15 @@ name: DemistoUploadFileV2 fromversion: 5.0.0 script: '-' args: -- description: File entry ID +- description: File entry ID. name: entryID predefined: - '' required: true -- description: Incident ID to upload the file to +- description: Incident ID to upload the file to. name: incidentID required: true -- description: Request body +- description: Request body. name: body - auto: PREDEFINED defaultValue: 'war room entry' @@ -23,21 +23,21 @@ args: - Available options are: - `war room entry`: the file will be uploaded as war room entry. - `incident attachment`: the file will be uploaded as incident attachment. - - default are `war room entry` + - default are `war room entry`. name: target predefined: - 'war room entry' - 'incident attachment' comment: Deprecated. Use UploadFile instead. subtype: python3 -dockerimage: demisto/python3:3.10.6.33415 +dockerimage: demisto/python3:3.10.13.83255 tags: - DemistoAPI timeout: '0' type: python dependson: must: - - demisto-api-multipart + - core-api-multipart tests: - No tests (auto formatted) deprecated: true diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2_test.py b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2_test.py index e7f1fd92016a..6b2de71f95c4 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2_test.py +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/DemistoUploadFileV2_test.py @@ -3,7 +3,7 @@ RAW_RESPONSE = [ { - "Brand": "Demisto REST API", + "Brand": "Core REST API", "Category": "Utilities", "Contents": { "response": { @@ -125,7 +125,7 @@ "Metadata": { "IndicatorTimeline": None, "ShardID": 0, - "brand": "Demisto REST API", + "brand": "Core REST API", "category": "", "contents": "", "contentsSize": 0, @@ -141,13 +141,13 @@ "format": "json", "hasRole": False, "id": "", - "instance": "Demisto REST API_instance_1", + "instance": "Core REST API_instance_1", "investigationId": "737", "isTodo": False, "mirrored": False, "modified": "0001-01-01T00:00:00Z", "note": False, - "parentContent": "!demisto-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", + "parentContent": "!core-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", "parentEntryTruncated": False, "parentId": "726@737", "pinned": False, @@ -171,7 +171,7 @@ "user": "", "version": 0 }, - "ModuleName": "Demisto REST API_instance_1", + "ModuleName": "Core REST API_instance_1", "Note": False, "ReadableContentsFormat": "", "System": "", @@ -200,7 +200,7 @@ def test_demisto_upload_file(mocker): RAW_RESPONSE_ERROR = [ { - "Brand": "Demisto REST API", + "Brand": "Core REST API", "Category": "Utilities", "Contents": { "response": { @@ -322,7 +322,7 @@ def test_demisto_upload_file(mocker): "Metadata": { "IndicatorTimeline": None, "ShardID": 0, - "brand": "Demisto REST API", + "brand": "Core REST API", "category": "", "contents": "", "contentsSize": 0, @@ -338,13 +338,13 @@ def test_demisto_upload_file(mocker): "format": "json", "hasRole": False, "id": "", - "instance": "Demisto REST API_instance_1", + "instance": "Core REST API_instance_1", "investigationId": "737", "isTodo": False, "mirrored": False, "modified": "0001-01-01T00:00:00Z", "note": False, - "parentContent": "!demisto-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", + "parentContent": "!core-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", "parentEntryTruncated": False, "parentId": "726@737", "pinned": False, @@ -368,7 +368,7 @@ def test_demisto_upload_file(mocker): "user": "", "version": 0 }, - "ModuleName": "Demisto REST API_instance_1", + "ModuleName": "Core REST API_instance_1", "Note": False, "ReadableContentsFormat": "", "System": "", diff --git a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/README.md b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/README.md index 8b35d0260acf..cfdb888c2d01 100644 --- a/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/README.md +++ b/Packs/DemistoRESTAPI/Scripts/DemistoUploadFileV2/README.md @@ -1,6 +1,7 @@ Copies a file from this incident to the specified incident. The file is recorded as an entry in the specified incident’s War Room. ## Script Data + --- | **Name** | **Description** | @@ -10,11 +11,14 @@ Copies a file from this incident to the specified incident. The file is recorded | Cortex XSOAR Version | 5.0.0 | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-multipart + +* core-api-multipart ## Inputs + --- | **Argument Name** | **Description** | @@ -25,10 +29,12 @@ This script uses the following commands and scripts. | target | Where to upload the file
- Available options are:
- \`war room entry\`: the file will be uploaded as war room entry.
- \`incident attachment\`: the file will be uploaded as incident attachment.
- default are \`war room entry\` | ## Outputs + --- There are no outputs for this script. ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/DemistoRESTAPI/Scripts/GetIncidentTasksByState/GetIncidentTasksByState.js b/Packs/DemistoRESTAPI/Scripts/GetIncidentTasksByState/GetIncidentTasksByState.js index 94e3ca2eb1f6..73b4032e23d9 100644 --- a/Packs/DemistoRESTAPI/Scripts/GetIncidentTasksByState/GetIncidentTasksByState.js +++ b/Packs/DemistoRESTAPI/Scripts/GetIncidentTasksByState/GetIncidentTasksByState.js @@ -61,7 +61,7 @@ function getStates(states) { var states = getStates(args.states || ''); var inc_id = args.inc_id; -var res = executeCommand('demisto-api-get', {'uri': '/investigation/' + inc_id + '/workplan'}); +var res = executeCommand('core-api-get', {'uri': '/investigation/' + inc_id + '/workplan'}); if (isError(res[0])) { return res; } diff --git a/Packs/DemistoRESTAPI/Scripts/UploadFile/README.md b/Packs/DemistoRESTAPI/Scripts/UploadFile/README.md index 8b35d0260acf..cfdb888c2d01 100644 --- a/Packs/DemistoRESTAPI/Scripts/UploadFile/README.md +++ b/Packs/DemistoRESTAPI/Scripts/UploadFile/README.md @@ -1,6 +1,7 @@ Copies a file from this incident to the specified incident. The file is recorded as an entry in the specified incident’s War Room. ## Script Data + --- | **Name** | **Description** | @@ -10,11 +11,14 @@ Copies a file from this incident to the specified incident. The file is recorded | Cortex XSOAR Version | 5.0.0 | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-multipart + +* core-api-multipart ## Inputs + --- | **Argument Name** | **Description** | @@ -25,10 +29,12 @@ This script uses the following commands and scripts. | target | Where to upload the file
- Available options are:
- \`war room entry\`: the file will be uploaded as war room entry.
- \`incident attachment\`: the file will be uploaded as incident attachment.
- default are \`war room entry\` | ## Outputs + --- There are no outputs for this script. ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.py b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.py index fb8f086e855b..d5fab4c5d494 100644 --- a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.py +++ b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.py @@ -1,15 +1,14 @@ -from typing import Tuple from CommonServerPython import * def upload_file(incident_id: str, entry_id: str, body: str = '', as_incident_attachment: bool = True): service_name = 'incident' if as_incident_attachment else 'entry' - return demisto.executeCommand("demisto-api-multipart", + return demisto.executeCommand("core-api-multipart", {"uri": f'{service_name}/upload/{incident_id}', "entryID": entry_id, "body": body}) -def upload_file_command(args: dict) -> Tuple[str, str]: +def upload_file_command(args: dict) -> tuple[str, str]: incident_id = args.get('incID', '') entry_id = args.get('entryID', '') body = args.get('body', '') diff --git a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.yml b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.yml index 316347992416..926353575ef5 100644 --- a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.yml +++ b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile.yml @@ -6,15 +6,15 @@ name: UploadFile fromversion: 6.5.0 script: '-' args: -- description: File entry ID +- description: File entry ID. name: entryID predefined: - '' required: true -- description: Incident ID to upload the file to +- description: Incident ID to upload the file to. name: incID required: true -- description: Request body +- description: Request body. name: body - auto: PREDEFINED defaultValue: 'war room entry' @@ -23,20 +23,20 @@ args: - Available options are: - `war room entry`: the file will be uploaded as war room entry. - `incident attachment`: the file will be uploaded as incident attachment. - - default are `war room entry` + - default are `war room entry`. name: target predefined: - 'war room entry' - 'incident attachment' comment: Copies a file from this incident to the specified incident. The file is recorded as an entry in the specified incident’s War Room. subtype: python3 -dockerimage: demisto/python3:3.10.12.66339 +dockerimage: demisto/python3:3.10.13.83255 tags: - DemistoAPI timeout: '0' type: python dependson: must: - - demisto-api-multipart + - core-api-multipart tests: - No tests (auto formatted) diff --git a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile_test.py b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile_test.py index 98e448d134df..568fc7984ac2 100644 --- a/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile_test.py +++ b/Packs/DemistoRESTAPI/Scripts/UploadFile/UploadFile_test.py @@ -3,7 +3,7 @@ RAW_RESPONSE = [ { - "Brand": "Demisto REST API", + "Brand": "Core REST API", "Category": "Utilities", "Contents": { "response": { @@ -125,7 +125,7 @@ "Metadata": { "IndicatorTimeline": None, "ShardID": 0, - "brand": "Demisto REST API", + "brand": "Core REST API", "category": "", "contents": "", "contentsSize": 0, @@ -141,13 +141,13 @@ "format": "json", "hasRole": False, "id": "", - "instance": "Demisto REST API_instance_1", + "instance": "Core REST API_instance_1", "investigationId": "737", "isTodo": False, "mirrored": False, "modified": "0001-01-01T00:00:00Z", "note": False, - "parentContent": "!demisto-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", + "parentContent": "!core-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", "parentEntryTruncated": False, "parentId": "726@737", "pinned": False, @@ -171,7 +171,7 @@ "user": "", "version": 0 }, - "ModuleName": "Demisto REST API_instance_1", + "ModuleName": "Core REST API_instance_1", "Note": False, "ReadableContentsFormat": "", "System": "", @@ -200,7 +200,7 @@ def test_upload_file(mocker): RAW_RESPONSE_ERROR = [ { - "Brand": "Demisto REST API", + "Brand": "Core REST API", "Category": "Utilities", "Contents": { "response": { @@ -322,7 +322,7 @@ def test_upload_file(mocker): "Metadata": { "IndicatorTimeline": None, "ShardID": 0, - "brand": "Demisto REST API", + "brand": "Core REST API", "category": "", "contents": "", "contentsSize": 0, @@ -338,13 +338,13 @@ def test_upload_file(mocker): "format": "json", "hasRole": False, "id": "", - "instance": "Demisto REST API_instance_1", + "instance": "Core REST API_instance_1", "investigationId": "737", "isTodo": False, "mirrored": False, "modified": "0001-01-01T00:00:00Z", "note": False, - "parentContent": "!demisto-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", + "parentContent": "!core-api-multipart uri=\"entry/upload/899\" entryID=\"722@737\" body=\"test_bark\"", "parentEntryTruncated": False, "parentId": "726@737", "pinned": False, @@ -368,7 +368,7 @@ def test_upload_file(mocker): "user": "", "version": 0 }, - "ModuleName": "Demisto REST API_instance_1", + "ModuleName": "Core REST API_instance_1", "Note": False, "ReadableContentsFormat": "", "System": "", diff --git a/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident.yml b/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident.yml index 6fd2e07712c9..52dab06b2970 100644 --- a/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident.yml +++ b/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident.yml @@ -13,7 +13,7 @@ script: >- body = args.get('body', None) - response = demisto.executeCommand("demisto-api-multipart", {"uri":"incident/upload/{}".format(incident_id),"entryID":entry_id,"body":body})[0] + response = demisto.executeCommand("core-api-multipart", {"uri":"incident/upload/{}".format(incident_id),"entryID":entry_id,"body":body})[0] if isError(response): demisto.results({ "Type" : entryTypes["error"], "ContentsFormat" : formats["text"], "Contents" : "There was an issue uploading file. Check API key and input arguments."}) @@ -31,17 +31,17 @@ enabled: true args: - name: incident_id required: true - description: ID of incident to upload to + description: ID of incident to upload to. - name: entryID - description: Entry ID of file to upload + description: Entry ID of file to upload. - name: body - description: Request body + description: Request body. scripttarget: 0 dependson: must: - - demisto-api-multipart + - core-api-multipart runas: DBotWeakRole fromversion: 5.0.0 -dockerimage: demisto/python:2.7.18.24066 +dockerimage: demisto/python:2.7.18.76921 tests: - No tests (auto formatted) diff --git a/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident_README.md b/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident_README.md index 1a27eada7f6f..862d0094dd0d 100644 --- a/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident_README.md +++ b/Packs/DemistoRESTAPI/Scripts/script-DemistoUploadFileToIncident_README.md @@ -2,6 +2,7 @@ Deprecated. Use the *DemistoUploadFileV2* script instead. Copies a file from an incident to the specified incident. The file is uploaded as an attachment to the specified incident's summary page, and recorded as an entry in the War Room. ## Script Data + --- | **Name** | **Description** | @@ -11,11 +12,14 @@ Copies a file from an incident to the specified incident. The file is uploaded a ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-multipart + +* core-api-multipart ## Inputs + --- | **Argument Name** | **Description** | @@ -25,5 +29,6 @@ This script uses the following commands and scripts. | body | The request body. | ## Outputs + --- There are no outputs for this script. diff --git a/Packs/DemistoRESTAPI/TestPlaybooks/playbook-DemistoUploadFileV2-test.yml b/Packs/DemistoRESTAPI/TestPlaybooks/playbook-DemistoUploadFileV2-test.yml index a1d4f55122a8..d8aad3f0da52 100644 --- a/Packs/DemistoRESTAPI/TestPlaybooks/playbook-DemistoUploadFileV2-test.yml +++ b/Packs/DemistoRESTAPI/TestPlaybooks/playbook-DemistoUploadFileV2-test.yml @@ -14,6 +14,7 @@ tasks: name: "" iscommand: false brand: "" + description: '' nexttasks: '#none#': - "4" @@ -284,6 +285,7 @@ tasks: type: title iscommand: false brand: "" + description: '' separatecontext: false view: |- { @@ -358,7 +360,7 @@ tasks: version: -1 name: Get File Comment (File With Comment) description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -415,7 +417,7 @@ tasks: version: -1 name: Get File Comment (File Without Comment) description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" diff --git a/Packs/DemistoRESTAPI/TestPlaybooks/playbook-TestDemistoRestAPI_Test.yml b/Packs/DemistoRESTAPI/TestPlaybooks/playbook-TestDemistoRestAPI_Test.yml index f7003023ab8a..56e411de9094 100644 --- a/Packs/DemistoRESTAPI/TestPlaybooks/playbook-TestDemistoRestAPI_Test.yml +++ b/Packs/DemistoRESTAPI/TestPlaybooks/playbook-TestDemistoRestAPI_Test.yml @@ -57,7 +57,7 @@ tasks: version: -1 name: Test POST without body description: '' - script: demisto-api-post + script: core-api-post type: regular iscommand: true brand: '' @@ -91,10 +91,9 @@ tasks: timertriggers: [] ignoreworker: false skipunavailable: false -view: '{"linkLabelsPosition": {}, "paper": {"dimensions": {"height": 200, "width": - 380, "x": 50, "y": 50}}}' +view: '{"linkLabelsPosition": {}, "paper": {"dimensions": {"height": 200, "width": 380, "x": 50, "y": 50}}}' inputs: [] outputs: [] description: '' marketplaces: - - xsoar +- xsoar diff --git a/Packs/DemistoRESTAPI/pack_metadata.json b/Packs/DemistoRESTAPI/pack_metadata.json index c1e7b3a4742a..a7b4d8f92645 100644 --- a/Packs/DemistoRESTAPI/pack_metadata.json +++ b/Packs/DemistoRESTAPI/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cortex REST API", "description": "Use Demisto REST APIs", "support": "xsoar", - "currentVersion": "1.3.41", + "currentVersion": "1.3.42", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/DeveloperTools/ReleaseNotes/1_3_8.json b/Packs/DeveloperTools/ReleaseNotes/1_3_8.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/DeveloperTools/ReleaseNotes/1_3_8.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/DeveloperTools/ReleaseNotes/1_3_8.md b/Packs/DeveloperTools/ReleaseNotes/1_3_8.md new file mode 100644 index 000000000000..98e77a95d501 --- /dev/null +++ b/Packs/DeveloperTools/ReleaseNotes/1_3_8.md @@ -0,0 +1,6 @@ +#### Scripts + +##### VerifyIntegrationHealth + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.py b/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.py index 674b4b7e3302..31dda2202079 100644 --- a/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.py +++ b/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.py @@ -2,22 +2,22 @@ from CommonServerPython import * from CommonServerUserPython import * -from typing import Dict, Any, Tuple +from typing import Any -def health_check(health_dict, integration_name: str) -> Tuple[bool, bool]: +def health_check(health_dict, integration_name: str) -> tuple[bool, bool]: for _, integration in health_dict.items(): if integration.get('brand') == integration_name: return (False, True) if integration.get('lastError') else (True, True) return True, False -def health_check_command(args: Dict[str, Any]) -> CommandResults: +def health_check_command(args: dict[str, Any]) -> CommandResults: integration_name = args.get('integration_name', '') raw_result = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": "/settings/integration/search", "body": { diff --git a/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.yml b/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.yml index 5cd12c24ab27..534a0cf66ee8 100644 --- a/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.yml +++ b/Packs/DeveloperTools/Scripts/VerifyIntegrationHealth/VerifyIntegrationHealth.yml @@ -23,7 +23,7 @@ tags: timeout: '0' type: python subtype: python3 -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 fromversion: 6.0.0 tests: - No test diff --git a/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Incidents_Test.yml b/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Incidents_Test.yml index 1c8811c5b29b..188fc1cfa518 100644 --- a/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Incidents_Test.yml +++ b/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Incidents_Test.yml @@ -1,6 +1,5 @@ id: Fetch Incidents Test version: -1 -vcShouldKeepItemLegacyProdMachine: false name: Fetch Incidents Test starttaskid: "0" tasks: @@ -14,6 +13,7 @@ tasks: name: "" iscommand: false brand: "" + description: '' nexttasks: '#none#': - "4" @@ -116,6 +116,7 @@ tasks: type: title iscommand: false brand: "" + description: '' separatecontext: false view: |- { @@ -139,8 +140,7 @@ tasks: id: e0ea2027-5364-4b49-86f5-6aed5c35a5b7 version: -1 name: Check If Fields Exist - description: Receive fields and context. Verifies that these field exists in - context. + description: Receive fields and context. Verifies that these field exists in context. scriptName: VerifyObjectFieldsList type: regular iscommand: false @@ -666,7 +666,7 @@ tasks: version: -1 name: Get Incident Fields to search description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -854,11 +854,12 @@ inputs: value: {} required: false description: Id of Integration that we want to test. - playbookInputQuery: null + playbookInputQuery: - key: searchfield value: {} required: false description: Comma separated list of fields to confirm that exists in all incidents. - playbookInputQuery: null + playbookInputQuery: outputs: [] fromversion: 6.0.0 +description: '' diff --git a/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Indicators_Test.yml b/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Indicators_Test.yml index 94acbe9496c1..6a2a22fcee64 100644 --- a/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Indicators_Test.yml +++ b/Packs/DeveloperTools/TestPlaybooks/playbook-Fetch_Indicators_Test.yml @@ -1,6 +1,5 @@ id: Fetch Indicators Test version: -1 -vcShouldKeepItemLegacyProdMachine: false name: Fetch Indicators Test starttaskid: "0" tasks: @@ -14,6 +13,7 @@ tasks: name: "" iscommand: false brand: "" + description: '' nexttasks: '#none#': - "4" @@ -114,7 +114,7 @@ tasks: version: -1 name: Get Indicator Field to search description: send HTTP GET requests - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -152,6 +152,7 @@ tasks: type: title iscommand: false brand: "" + description: '' separatecontext: false view: |- { @@ -816,11 +817,12 @@ inputs: value: {} required: false description: Id of Integration that we want to test. - playbookInputQuery: null + playbookInputQuery: - key: searchfield value: {} required: false description: Comma separated list of fields to confirm that exists in al indicators. - playbookInputQuery: null + playbookInputQuery: outputs: [] fromversion: 6.0.0 +description: '' diff --git a/Packs/DeveloperTools/pack_metadata.json b/Packs/DeveloperTools/pack_metadata.json index 97ddc6230b4f..70ab9b3ef831 100644 --- a/Packs/DeveloperTools/pack_metadata.json +++ b/Packs/DeveloperTools/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Developer Tools", "description": "Basic tools for content development.", "support": "community", - "currentVersion": "1.3.7", + "currentVersion": "1.3.8", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/EmailCommunication/ReleaseNotes/2_0_17.json b/Packs/EmailCommunication/ReleaseNotes/2_0_17.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/EmailCommunication/ReleaseNotes/2_0_17.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/EmailCommunication/ReleaseNotes/2_0_17.md b/Packs/EmailCommunication/ReleaseNotes/2_0_17.md new file mode 100644 index 000000000000..5c22786b13c7 --- /dev/null +++ b/Packs/EmailCommunication/ReleaseNotes/2_0_17.md @@ -0,0 +1,6 @@ + +#### Scripts + +##### SendEmailReply + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py index 41c2f7402aa2..1056d6b4e831 100644 --- a/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py +++ b/Packs/EmailCommunication/Scripts/SendEmailReply/SendEmailReply.py @@ -366,7 +366,7 @@ def get_entry_id_list(incident_id, attachments, new_email_attachments, files): for attachment in attachment_list: attachment_name = attachment.get('name', '') file_data = create_file_data_json(attachment, field_name) - demisto.executeCommand("demisto-api-post", {"uri": f"/incident/remove/{incident_id}", "body": file_data}) + demisto.executeCommand("core-api-post", {"uri": f"/incident/remove/{incident_id}", "body": file_data}) if not isinstance(files, list): files = [files] for file in files: @@ -439,7 +439,7 @@ def get_reply_body(notes, incident_id, attachments, reputation_calc_async=False) entry_tags_res = demisto.executeCommand( "addEntries", {"entries": entry_note, 'id': incident_id, 'reputationCalcAsync': reputation_calc_async}) - entry_note_res = demisto.executeCommand("demisto-api-post", {"uri": "/entry/note", "body": json.dumps( + entry_note_res = demisto.executeCommand("core-api-post", {"uri": "/entry/note", "body": json.dumps( {"id": note.get('ID'), "version": -1, "investigationId": incident_id, "data": "false"})}) if is_error(entry_note_res): return_error(get_error(entry_note_res)) diff --git a/Packs/EmailCommunication/pack_metadata.json b/Packs/EmailCommunication/pack_metadata.json index 529dbd21a8e9..5aab8a67eaad 100644 --- a/Packs/EmailCommunication/pack_metadata.json +++ b/Packs/EmailCommunication/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Email Communication", "description": "Do you have to send multiple emails to end users? This content pack helps you streamline the process and automate updates, notifications and more.\n", "support": "xsoar", - "currentVersion": "2.0.16", + "currentVersion": "2.0.17", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "videos": [ diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.json b/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.md b/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.md new file mode 100644 index 000000000000..1e41fcac6ae3 --- /dev/null +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/ReleaseNotes/1_0_2.md @@ -0,0 +1,7 @@ + +#### Scripts + +##### ForwardAuditLogsToSplunkHEC + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.py b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.py index d8ec08389f38..49ff106aecb8 100644 --- a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.py +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.py @@ -33,7 +33,7 @@ def get_audit_logs(timeframe: int) -> Dict: } } - results = demisto.executeCommand('demisto-api-post', {"uri": uri, "body": body}) + results = demisto.executeCommand('core-api-post', {"uri": uri, "body": body}) return results[0]['Contents']['response'] diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.yml b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.yml index 63db14d30c16..fcab79fda158 100644 --- a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.yml +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC.yml @@ -3,13 +3,13 @@ args: defaultValue: "1" description: timeframe to fetch in hours. name: timeframe -comment: 'This Automation script uses the XSOAR API to get the audit logs and pushes them to Splunk HEC. Dependencies: SlunkPy and Demisto REST API integrations.' +comment: 'This Automation script uses the XSOAR API to get the audit logs and pushes them to Splunk HEC. Dependencies: SlunkPy and Core REST API integrations.' commonfields: id: ForwardAuditLogsToSplunkHEC version: -1 dependson: must: [] -dockerimage: demisto/python3:3.10.13.74666 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ForwardAuditLogsToSplunkHEC runas: DBotWeakRole diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC_test.py b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC_test.py index 4deac82451e0..e5bf35f1eb75 100644 --- a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC_test.py +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/ForwardAuditLogsToSplunkHEC_test.py @@ -7,7 +7,7 @@ def execute_command_side_effect(command: str, args: Dict): if command == "splunk-submit-event-hec": return [{'Contents': {'response': ["result1"]}}] - if command == "demisto-api-post": + if command == "core-api-post": if args["uri"] == '/settings/audits': return [{'Contents': {'response': {'total': 2, "audits": ["audit1", "audit2"]}}, "Type": entryTypes["note"]}] return [{'Contents': {'response': {'total': 2, "reply": {"data": ["audit1", "audit2"]}}}, "Type": entryTypes["note"]}] diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/README.md b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/README.md index c09b2ca7e4d5..e66e6a1ae382 100644 --- a/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/README.md +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/Scripts/ForwardAuditLogsToSplunkHEC/README.md @@ -1,4 +1,4 @@ -This Automation script uses the XSOAR API to get the audit logs and pushes them to Splunk HEC. Dependencies: SlunkPy and Demisto REST API integrations +This Automation script uses the XSOAR API to get the audit logs and pushes them to Splunk HEC. Dependencies: SlunkPy and Core REST API integrations ## Script Data --- diff --git a/Packs/ForwardXSOARAuditLogsToSplunkHEC/pack_metadata.json b/Packs/ForwardXSOARAuditLogsToSplunkHEC/pack_metadata.json index 90354d0936d7..b4c80fc78403 100644 --- a/Packs/ForwardXSOARAuditLogsToSplunkHEC/pack_metadata.json +++ b/Packs/ForwardXSOARAuditLogsToSplunkHEC/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Forward XSOAR Audit Logs to Splunk HEC", "description": "This automation script takes a timeframe as input fetches the audit logs for the defined period. Then it pushes them to Splunk HEC. ", "support": "community", - "currentVersion": "1.0.1", + "currentVersion": "1.0.2", "author": "Harri Ruuttila", "url": "", "email": "", diff --git a/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle.yml b/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle.yml index f8fe0762b984..99174686af19 100644 --- a/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle.yml +++ b/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle.yml @@ -213,7 +213,7 @@ tasks: id: 16fe15f9-6a82-4a6b-8e12-c0ab7a1e5eec iscommand: true name: Download log bundle - script: '|||demisto-api-download' + script: '|||core-api-download' type: regular version: -1 taskid: 16fe15f9-6a82-4a6b-8e12-c0ab7a1e5eec @@ -249,7 +249,7 @@ tasks: id: b9fa721a-5789-47b3-8a3d-f5d283071012 iscommand: true name: Download account log bundle - script: '|||demisto-api-download' + script: '|||core-api-download' type: regular version: -1 taskid: b9fa721a-5789-47b3-8a3d-f5d283071012 diff --git a/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle_README.md b/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle_README.md index 44a2e882ef71..296b65881fcf 100644 --- a/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle_README.md +++ b/Packs/HealthCheck/Playbooks/Health_Check_-_Collect_Log_Bundle_README.md @@ -47,30 +47,38 @@ Holding the default Thresholds: } ## Dependencies + This playbook uses the following sub-playbooks, integrations, and scripts. ### Sub-playbooks + This playbook does not use any sub-playbooks. ### Integrations + This playbook does not use any integrations. ### Scripts + * PrintErrorEntry * HealthCheckUnpack ### Commands -* demisto-api-download + +* core-api-download ## Playbook Inputs + --- There are no inputs for this playbook. ## Playbook Outputs + --- There are no outputs for this playbook. ## Playbook Image + --- ![Health Check - Collect Log Bundle](./../doc_files/HealthCheck-CollectLogBundle-pb.png) /Users/tzimmer/Documents/GitHub/content/Packs/HealthCheck/doc_files/HealthCheck-CollectLogBundle-pb.png \ No newline at end of file diff --git a/Packs/HealthCheck/README.md b/Packs/HealthCheck/README.md index d60ae2753285..ac410db7a907 100644 --- a/Packs/HealthCheck/README.md +++ b/Packs/HealthCheck/README.md @@ -7,15 +7,15 @@ The actionable items report will contain recommendations based on errors found o ##Prerequisites **Single Server Deployment** -1. Configure **"Demisto REST API"** Integration Instance with **Admin** user +1. Configure **"Core REST API"** Integration Instance with **Admin** user **Multi-Tenants Deployment** 1. Create API Key on Main Tenant -2. Create **Demisto REST API** integration on Main Tenant and use the API Key you created in previous step. +2. Create **Core REST API** integration on Main Tenant and use the API Key you created in previous step. On instance settings define in URL field *https://127.0.0.1* make sure not to set the tenant name in the URL. -2. Propogate **Demisto REST API** instance to All tenants or to the required tenant using propogation labels. +2. Propogate **Core REST API** instance to All tenants or to the required tenant using propogation labels. **How to**: diff --git a/Packs/HealthCheck/ReleaseNotes/2_0_14.json b/Packs/HealthCheck/ReleaseNotes/2_0_14.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/HealthCheck/ReleaseNotes/2_0_14.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/HealthCheck/ReleaseNotes/2_0_14.md b/Packs/HealthCheck/ReleaseNotes/2_0_14.md new file mode 100644 index 000000000000..e813cc283a87 --- /dev/null +++ b/Packs/HealthCheck/ReleaseNotes/2_0_14.md @@ -0,0 +1,85 @@ + +#### Playbooks + +##### Health Check - Collect Log Bundle + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) + +#### Scripts + +##### HealthCheckCPU + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckServerConfiguration + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckIncidentsCreatedWeekly + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckAPIvalidation + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckIncidentTypes + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckNumberOfDroppedIncidents + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckCommonIndicators + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckContainersStatus + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckDiskUsageLine + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckIncidentsCreatedDaily + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckWorkers + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckInstalledPacks + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckDiskUsage + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckIncidentsCreatedMonthly + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckMemory + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckFields + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckSystemDiagnostics + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckPlaybookAnalysis + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### HealthCheckIntegrations + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.py b/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.py index 9831808a62de..fd623ad61e24 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.py +++ b/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.py @@ -27,7 +27,7 @@ def isAdminAPIInstance(): accountName = f"acc_{accountName}" if accountName != "" else "" res = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}/user/preferences", "body": { @@ -49,7 +49,7 @@ def isAdminAPIInstance(): errors = [""] -# Check if Demisto REST API integration was defined and number of instances +# Check if Core REST API integration was defined and number of instances ApiIntegrations = isDemistoAPIIntegrationAvailable() if ApiIntegrations == 0: errors.append('No API integration defined') @@ -57,12 +57,12 @@ def isAdminAPIInstance(): if ApiIntegrations == 2: errors.append("Too many API integrations were defined") -# Check if Demisto REST API integration defined with DefaultAdmin API key +# Check if Core REST API integration defined with DefaultAdmin API key if not isAdminAPIInstance(): errors.append('API instance is not using Admin') if len(errors) > 1: strerror = "\n".join(errors) - return_error(f"Demisto REST API Validation failed due to: {strerror}") + return_error(f"Core REST API Validation failed due to: {strerror}") else: return_results("Done") diff --git a/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.yml b/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.yml index e7d431c02266..f13b325de854 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckAPIvalidation/HealthCheckAPIvalidation.yml @@ -4,7 +4,7 @@ comment: |- commonfields: id: HealthCheckAPIvalidation version: -1 -dockerimage: demisto/python3:3.10.9.46807 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckAPIvalidation runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.py b/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.py index 0a1dd3fb5a70..8fa6373c8903 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.py +++ b/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.py @@ -65,7 +65,7 @@ def main(args): is_widget = argToBoolean(args.get('isWidget', True)) res = execute_command( - 'demisto-api-post', + 'core-api-post', { 'uri': f'{account_name}statistics/widgets/query', 'body': { diff --git a/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.yml b/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.yml index 93a4ee6da0d9..105619a682a0 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckCPU/HealthCheckCPU.yml @@ -10,7 +10,7 @@ comment: Present or parse CPU usage stats. commonfields: id: HealthCheckCPU version: -1 -dockerimage: demisto/python3:3.10.9.42476 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckCPU runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.py b/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.py index d756b4b5c8a7..ea4e8f7c3f60 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.py +++ b/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.py @@ -31,7 +31,7 @@ def main(args): body = build_body(tenant_name) indicator_thresholds = args.get('Thresholds', THRESHOLDS) - indicator_res = execute_command('demisto-api-post', { + indicator_res = execute_command('core-api-post', { 'uri': f'{account_name}indicators/search', 'body': body, }) diff --git a/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.yml b/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.yml index 330dcc3176d5..6bf6feb0e7de 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckCommonIndicators/HealthCheckCommonIndicators.yml @@ -1,11 +1,11 @@ args: - description: Define the thresholds. name: Thresholds -comment: Reports on common indicators +comment: Reports on common indicators. commonfields: id: HealthCheckCommonIndicators version: -1 -dockerimage: demisto/python3:3.10.8.37753 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckCommonIndicators runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py b/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py index 98713786be09..a91c2c11d4a1 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py +++ b/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py @@ -7,7 +7,7 @@ def main(): account_name = incident.get('account') account_name = f'acc_{account_name}/' if account_name != "" else "" - res = execute_command('demisto-api-get', {'uri': f'{account_name}health/containers'}) + res = execute_command('core-api-get', {'uri': f'{account_name}health/containers'}) containers = res['response'] return CommandResults( diff --git a/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.yml b/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.yml index 91af7f4bf314..8a22b67536f8 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.yml @@ -1,13 +1,13 @@ -comment: Containers status +comment: Containers status. commonfields: id: HealthCheckContainersStatus version: -1 -dockerimage: demisto/python3:3.10.4.29342 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckContainersStatus outputs: - contextPath: containers - description: Containers status table + description: Containers status table. runas: DBotWeakRole script: '' scripttarget: 0 diff --git a/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.py b/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.py index edbe00147591..3f8cb4bea8dc 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.py +++ b/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.py @@ -50,7 +50,7 @@ def main(args): partition = entry['value'] res = execute_command( - "demisto-api-post", + "core-api-post", { "uri": f"{account_name}/statistics/widgets/query", "body": { @@ -118,6 +118,7 @@ def main(args): } } } + return None else: add_actions = analyze_data(stats) return CommandResults( diff --git a/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.yml b/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.yml index 1a4831e75393..51f50472e3f2 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckDiskUsage/HealthCheckDiskUsage.yml @@ -10,7 +10,7 @@ comment: Present or parse Disk usage stats. commonfields: id: HealthCheckDiskUsage version: -1 -dockerimage: demisto/python3:3.10.4.29342 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckDiskUsage runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.py b/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.py index 35211578cba0..c8eb7b2fae5c 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.py +++ b/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.py @@ -5,13 +5,13 @@ def main(): ctx = demisto.context() dataFromCtx = ctx.get("widgets") if not dataFromCtx: - res = execute_command("demisto-api-get", {"uri": "/system/config"}) + res = execute_command("core-api-get", {"uri": "/system/config"}) config_json = res['response'] partition = config_json.get('sysConf', {}).get('disk.partitions.to.monitor') or '/' res = execute_command( - "demisto-api-post", + "core-api-post", { "uri": "/statistics/widgets/query", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.yml b/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.yml index b760421fab8a..c576b56fe1f3 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckDiskUsageLine/HealthCheckDiskUsageLine.yml @@ -1,8 +1,8 @@ -comment: Present Disk usage stats line widget +comment: Present Disk usage stats line widget. commonfields: id: HealthCheckDiskUsageLine version: -1 -dockerimage: demisto/python3:3.10.9.42476 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckDiskUsageLine runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.py b/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.py index df8c4910a12a..90d8f7d237f3 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.py +++ b/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.py @@ -5,11 +5,9 @@ def find_indexed_longText_fields(fields): found = [] for field in fields: - if field['type'] in RIKEY_TYPES and field['unsearchable'] is False: - if field['packID'] == "": - if field['system'] is False: - if field['name'] != 'description': - found.append({'fieldname': field['name'], 'fieldtype': field['type']}) + if field['type'] in RIKEY_TYPES and field['unsearchable'] is False and field['packID'] == "" and field['system'] is False: + if field['name'] != 'description': + found.append({'fieldname': field['name'], 'fieldtype': field['type']}) return found @@ -25,7 +23,7 @@ def find_indexed_longText_fields(fields): account_name = incident.get('account') account_name = f'acc_{account_name}/' if account_name != "" else "" -res = demisto.executeCommand('demisto-api-get', {'uri': f'{account_name}incidentfields'}) +res = demisto.executeCommand('core-api-get', {'uri': f'{account_name}incidentfields'}) if is_error(res): return_error(res[0]['Contents']) @@ -40,7 +38,7 @@ def find_indexed_longText_fields(fields): 'category': 'Content', 'severity': 'Medium', 'description': DESCRIPTION[0], - 'resolution': '{}'.format(RESOLUTION[0]), + 'resolution': f'{RESOLUTION[0]}', }) diff --git a/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.yml b/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.yml index 078958300a4c..db94babd94af 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckFields/HealthCheckFields.yml @@ -1,8 +1,8 @@ -comment: Parsing custom fields to detect indexed fields for risky field types +comment: Parsing custom fields to detect indexed fields for risky field types. commonfields: id: HealthCheckFields version: -1 -dockerimage: demisto/python3:3.10.4.29342 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckFields runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.py b/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.py index c620d29a6848..f01f0bb11239 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.py +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.py @@ -13,7 +13,7 @@ def main(): account_name = f"acc_{account_name}" if account_name != "" else "" res = execute_command( - "demisto-api-get", + "core-api-get", { "uri": f"{account_name}/incidenttype" })['response'] diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.yml b/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.yml index 04c99f0ddfee..c13848948fa5 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentTypes/HealthCheckIncidentTypes.yml @@ -1,8 +1,8 @@ -comment: "Identify custom and detached system incidents type \nChecking if 'Auto Extraction' is turned on for:\nExtract from all\nExtract from specific indicators doesn't have any settings" +comment: "Identify custom and detached system incidents type \nChecking if 'Auto Extraction' is turned on for:\nExtract from all\nExtract from specific indicators doesn't have any settings." commonfields: id: HealthCheckIncidentTypes version: -1 -dockerimage: demisto/python3:3.10.11.58677 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckIncidentTypes runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.py b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.py index cd8d40e35e3c..4df5284c5271 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.py +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.py @@ -9,7 +9,7 @@ accountName = f"acc_{accountName}/" if accountName != "" else "" stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}statistics/widgets/query", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.yml b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.yml index a6a7041f54c2..ca3b912b1600 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedDaily/HealthCheckIncidentsCreatedDaily.yml @@ -1,8 +1,8 @@ -comment: Trend graph for incidents created per day +comment: Trend graph for incidents created per day. commonfields: id: HealthCheckIncidentsCreatedDaily version: -1 -dockerimage: demisto/python3:3.10.11.58677 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckIncidentsCreatedDaily runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.py b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.py index 981e8630c04e..5f86e9e67027 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.py +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.py @@ -9,7 +9,7 @@ accountName = f"acc_{accountName}" if accountName != "" else "" stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}/statistics/widgets/query", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.yml b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.yml index a980d71f8cb4..3d1f1a185ea6 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedMonthly/HealthCheckIncidentsCreatedMonthly.yml @@ -1,8 +1,8 @@ -comment: Trend graph for incidents created per month +comment: Trend graph for incidents created per month. commonfields: id: HealthCheckIncidentsCreatedMonthly version: -1 -dockerimage: demisto/python3:3.10.11.58677 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckIncidentsCreatedMonthly runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.py b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.py index 04c993653ee2..8dafa525084a 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.py +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.py @@ -9,7 +9,7 @@ accountName = f"acc_{accountName}" if accountName != "" else "" stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}/statistics/widgets/query", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.yml b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.yml index 1c9f3862aa59..1efb4e336d92 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckIncidentsCreatedWeekly/HealthCheckIncidentsCreatedWeekly.yml @@ -1,8 +1,8 @@ -comment: Trend graph for incident creation +comment: Trend graph for incident creation. commonfields: id: HealthCheckIncidentsCreatedWeekly version: -1 -dockerimage: demisto/python3:3.10.11.58677 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckIncidentsCreatedWeekly runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.py b/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.py index 8ecc50700fb5..02a712d4310f 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.py +++ b/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.py @@ -7,7 +7,7 @@ accountName = incident.get('account') accountName = f"acc_{accountName}/" if accountName != "" else "" -config_json = demisto.executeCommand("demisto-api-get", +config_json = demisto.executeCommand("core-api-get", {"uri": f"{accountName}contentpacks/installed-expired"})[0]["Contents"]["response"] for item in config_json: diff --git a/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.yml b/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.yml index f22ce4526350..9cee38359236 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckInstalledPacks/HealthCheckInstalledPacks.yml @@ -1,13 +1,13 @@ -comment: "Read the installedpacks.json. \n\nCount and get packs names" +comment: "Read the installedpacks.json. \n\nCount and get packs names." commonfields: id: HealthCheckInstalledPacks version: -1 -dockerimage: demisto/python3:3.10.4.29342 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckInstalledPacks outputs: - contextPath: FileData - description: Data read from war room file + description: Data read from war room file. runas: DBotWeakRole script: '' scripttarget: 0 diff --git a/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.py b/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.py index 3e967b4f2645..6959a8e75131 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.py +++ b/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.py @@ -6,7 +6,7 @@ accountName = f"acc_{accountName}" if accountName != "" else "" res = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}/settings/integration/search", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.yml b/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.yml index d37ba2f1c180..e20431398c28 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckIntegrations/HealthCheckIntegrations.yml @@ -1,8 +1,8 @@ -comment: Collect integrations name and count number of engines +comment: Collect integrations name and count number of engines. commonfields: id: HealthCheckIntegrations version: -1 -dockerimage: demisto/python3:3.10.4.29342 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckIntegrations runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.py b/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.py index 6d2cc622fbe8..7570d157b2ed 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.py +++ b/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.py @@ -31,9 +31,8 @@ def analyzeData(res): else: medFound = 0 - if not highRes: - if item['data'][0] >= 90: - highRes = True + if not highRes and item['data'][0] >= 90: + highRes = True if lowRes or medRes or highRes: addActions = [] @@ -61,7 +60,7 @@ def analyzeData(res): args = demisto.args() isWidget = argToBoolean(args.get('isWidget', True)) stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}/statistics/widgets/query", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.yml b/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.yml index e2e5ce696944..dd99c32c0e17 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckMemory/HealthCheckMemory.yml @@ -6,11 +6,11 @@ args: predefined: - 'True' - 'False' -comment: Present or analyze memory usage +comment: Present or analyze memory usage. commonfields: id: HealthCheckMemory version: -1 -dockerimage: demisto/python3:3.10.9.42476 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckMemory runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py b/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py index b49cad7adc14..d736399930b6 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py +++ b/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.py @@ -19,7 +19,7 @@ stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}settings/audits", "body": { diff --git a/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.yml b/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.yml index dd7fcba97200..52b00ece7eb5 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckNumberOfDroppedIncidents/HealthCheckNumberOfDroppedIncidents.yml @@ -1,23 +1,23 @@ args: - auto: PREDEFINED default: true - description: Is widget or playbook command + description: Is widget or playbook command. name: isWidget predefined: - 'False' - 'True' -- description: Define the thresholds +- description: Define the thresholds. name: Thresholds -comment: Number of dropped incidents +comment: Number of dropped incidents. commonfields: id: HealthCheckNumberOfDroppedIncidents version: -1 -dockerimage: demisto/python3:3.10.11.58677 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckNumberOfDroppedIncidents outputs: - contextPath: NumberOfDroppedIncidents - description: Number of dropped incidents + description: Number of dropped incidents. runas: DBotWeakRole script: '' scripttarget: 0 diff --git a/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.py b/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.py index e01e2be17747..3a77fbd59386 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.py +++ b/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.py @@ -4,7 +4,7 @@ def findTopUsedPLaybooks(accountName): stats = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": f"{accountName}statistics/widgets/query", "body": { @@ -80,11 +80,11 @@ def findTopUsedPLaybooks(accountName): thresholds = args.get('Thresholds', Thresholds) customPlaybooks = demisto.executeCommand( - "demisto-api-post", {"uri": f"{account_name}playbook/search", - "body": {"query": "system:F"}})[0]["Contents"]["response"]["playbooks"] + "core-api-post", {"uri": f"{account_name}playbook/search", + "body": {"query": "system:F"}})[0]["Contents"]["response"]["playbooks"] builtinPlaybooks = demisto.executeCommand( - "demisto-api-post", {"uri": f"{account_name}playbook/search", - "body": {"query": "system:T"}})[0]["Contents"]["response"]["playbooks"] + "core-api-post", {"uri": f"{account_name}playbook/search", + "body": {"query": "system:T"}})[0]["Contents"]["response"]["playbooks"] builtinPlaybooksNames = [] copyDetected = [] diff --git a/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.yml b/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.yml index bdf071383a22..3d6d6ab32a00 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckPlaybookAnalysis/HealthCheckPlaybookAnalysis.yml @@ -1,13 +1,13 @@ args: -- description: Define the thresholds +- description: Define the thresholds. name: Thresholds -- description: un +- description: un. name: Inadvisable -comment: Parsing playbooks +comment: Parsing playbooks. commonfields: id: HealthCheckPlaybookAnalysis version: -1 -dockerimage: demisto/python3:3.10.10.49934 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckPlaybookAnalysis runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py b/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py index d6ffd4fa9382..e9ca5a491e09 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py +++ b/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py @@ -96,7 +96,7 @@ def checkKeyValue(config): EVAL = False try: - config_json = demisto.executeCommand("demisto-api-get", {"uri": "/system/config"})[0]["Contents"]["response"] + config_json = demisto.executeCommand("core-api-get", {"uri": "/system/config"})[0]["Contents"]["response"] new_json = [] res = [] checkKeyValue(config_json) diff --git a/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.yml b/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.yml index 62406f67c324..45bbb5a37b5e 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.yml @@ -1,13 +1,13 @@ -comment: Collect server configurations and save that into a table field +comment: Collect server configurations and save that into a table field. commonfields: id: HealthCheckServerConfiguration version: -1 -dockerimage: demisto/python3:3.10.8.37753 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckServerConfiguration outputs: - contextPath: FileData - description: Data read from war room file + description: Data read from war room file. type: Unknown - contextPath: HealthCheck.ActionableItems description: A list of possible actions for improving the system health. diff --git a/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.py b/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.py index 574c7f914796..1819caaf29b7 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.py +++ b/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.py @@ -21,22 +21,22 @@ def LargeIncidents(account_name): - largeIncidents = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}diagnostics/incidentsSize"})[0]['Contents'] + largeIncidents = demisto.executeCommand("core-api-get", {"uri": f"{account_name}diagnostics/incidentsSize"})[0]['Contents'] return largeIncidents['response'] def BigWorkplans(account_name): - bigWorkplans = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}diagnostics/bigworkplans"})[0]['Contents'] + bigWorkplans = demisto.executeCommand("core-api-get", {"uri": f"{account_name}diagnostics/bigworkplans"})[0]['Contents'] return bigWorkplans['response'] def BigContext(account_name): - bigContext = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}diagnostics/invContextSize"})[0]['Contents'] + bigContext = demisto.executeCommand("core-api-get", {"uri": f"{account_name}diagnostics/invContextSize"})[0]['Contents'] return bigContext['response'] def BigTasks(account_name): - bigTasks = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}diagnostics/bigtasks"})[0]['Contents'] + bigTasks = demisto.executeCommand("core-api-get", {"uri": f"{account_name}diagnostics/bigtasks"})[0]['Contents'] return bigTasks['response'][0]['tasksList'] @@ -47,7 +47,7 @@ def FormatSize(size): while size > power: size /= power n += 1 - return "{:.2f} {}".format(size, power_labels[n]) + return f"{size:.2f} {power_labels[n]}" def format_time(time): @@ -102,13 +102,13 @@ def FormatTableAndSet(data, dataSource): } out = [] -for key in SystemDiagnosticsResults.keys(): +for key, value in SystemDiagnosticsResults.copy().items(): if key != "bigTasks": - res = FormatTableAndSet(SystemDiagnosticsResults[key], key) + res = FormatTableAndSet(value, key) SystemDiagnosticsResults[key] = res out.extend(res) else: - bigTasksNewFormat = FormatTableAndSet(SystemDiagnosticsResults[key], key) + bigTasksNewFormat = FormatTableAndSet(value, key) actionableItems = [] if SystemDiagnosticsResults['largeIncidents']: diff --git a/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.yml b/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.yml index 07edbc0dcb55..669e68064ba4 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckSystemDiagnostics/HealthCheckSystemDiagnostics.yml @@ -1,8 +1,8 @@ -comment: Collect data from System Diagnostics tool +comment: Collect data from System Diagnostics tool. commonfields: id: HealthCheckSystemDiagnostics version: -1 -dockerimage: demisto/python3:3.10.8.37753 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckSystemDiagnostics runas: DBotWeakRole diff --git a/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.py b/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.py index dc70c6f47f9d..ef3d820a91b8 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.py +++ b/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.py @@ -34,7 +34,7 @@ def nano_to_secs(table): else: minutes = int(secs / 60) mod_sec = secs % 60 - entry['Duration'] = "{} Minutes and {} seconds".format(str(minutes), mod_sec) + entry['Duration'] = f"{str(minutes)} Minutes and {mod_sec} seconds" def format_time(table): @@ -66,7 +66,7 @@ def main(args): is_widget = argToBoolean(args.get('isWidget', True)) if is_widget is True: - workers = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}workers/status"})[0]['Contents'] + workers = demisto.executeCommand("core-api-get", {"uri": f"{account_name}workers/status"})[0]['Contents'] if not workers['response']['ProcessInfo']: table = [{'Details': '-', 'Duration': '-', 'StartedAt': '-'}] @@ -87,7 +87,7 @@ def main(args): return dmst_entry else: - workers = demisto.executeCommand("demisto-api-get", {"uri": f"{account_name}workers/status"})[0]['Contents'] + workers = demisto.executeCommand("core-api-get", {"uri": f"{account_name}workers/status"})[0]['Contents'] demisto.executeCommand("setIncident", { 'healthcheckworkerstotal': workers['response']['Total'], 'healthcheckworkersbusy': workers['response']['Busy'] diff --git a/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.yml b/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.yml index f0658fe02b32..a6a295f6e166 100644 --- a/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.yml +++ b/Packs/HealthCheck/Scripts/HealthCheckWorkers/HealthCheckWorkers.yml @@ -1,21 +1,21 @@ args: - auto: PREDEFINED defaultValue: 'True' - description: is it widget or playbook task + description: is it widget or playbook task. name: isWidget predefined: - 'True' - 'False' -comment: Present or analyze workers usage +comment: Present or analyze workers usage. commonfields: id: HealthCheckWorkers version: -1 -dockerimage: demisto/python3:3.10.8.37753 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: HealthCheckWorkers outputs: - contextPath: workers - description: Workers status table + description: Workers status table. runas: DBotWeakRole script: '' scripttarget: 0 diff --git a/Packs/HealthCheck/pack_metadata.json b/Packs/HealthCheck/pack_metadata.json index c362cab94bdc..04f2d0c5e07f 100644 --- a/Packs/HealthCheck/pack_metadata.json +++ b/Packs/HealthCheck/pack_metadata.json @@ -2,7 +2,7 @@ "name": "System Diagnostics and Health Check", "description": "CS Health Check", "support": "community", - "currentVersion": "2.0.13", + "currentVersion": "2.0.14", "author": "Cortex XSOAR Customer Success", "url": "https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/bd-p/Cortex_XSOAR_Discussions", "email": "", diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.json b/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.md b/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.md new file mode 100644 index 000000000000..bf64b3e9b856 --- /dev/null +++ b/Packs/IntegrationsAndIncidentsHealthCheck/ReleaseNotes/1_3_16.md @@ -0,0 +1,11 @@ + +#### Scripts + +##### RestartFailedTasks + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### GetFailedTasks + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.py b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.py index 7bcfbd44bd9c..da397957350b 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.py +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.py @@ -1,17 +1,16 @@ import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 -from typing import Any -BRAND = "Demisto REST API" +BRAND = "Core REST API" def get_rest_api_instance_to_use(): """ - This function checks if there are more than one instance of demisto rest api. + This function checks if there are more than one instance of Core REST API. Returns: - Demisto Rest Api instance to use + Core REST API instance to use """ all_instances = demisto.getModules() number_of_rest_api_instances = 0 @@ -21,7 +20,7 @@ def get_rest_api_instance_to_use(): rest_api_instance_to_use = instance_name number_of_rest_api_instances += 1 if number_of_rest_api_instances > 1: - return_error("GetFailedTasks: This script can only run with a single instance of the Demisto REST API. " + return_error("GetFailedTasks: This script can only run with a single instance of the Core REST API. " "Specify the instance name in the 'rest_api_instance' argument.") return rest_api_instance_to_use @@ -86,7 +85,7 @@ def get_incident_tasks_using_rest_api_instance(incident: dict, rest_api_instance Args: incident (dict): An incident object. - rest_api_instance (str): A Demisto REST API instance name to use for fetching task details. + rest_api_instance (str): A Core REST API instance name to use for fetching task details. Returns: List of the tasks given from the response. @@ -94,7 +93,7 @@ def get_incident_tasks_using_rest_api_instance(incident: dict, rest_api_instance uri = f'investigation/{str(incident["id"])}/workplan/tasks' response = demisto.executeCommand( - "demisto-api-post", + "core-api-post", { "uri": uri, "body": { @@ -107,7 +106,7 @@ def get_incident_tasks_using_rest_api_instance(incident: dict, rest_api_instance if is_error(response): error = f'Failed retrieving tasks for incident ID {incident["id"]}.\n \ - Make sure that the API key configured in the Demisto REST API integration \ + Make sure that the API key configured in the Core REST API integration \ is one with sufficient permissions to access that incident.\n' + get_error(response) raise Exception(error) @@ -145,12 +144,12 @@ def get_incident_tasks_using_internal_request(incident: dict): def get_incident_data(incident: dict, rest_api_instance: str = None): """ Returns the failing task objects of an incident. - The request is done using a Demisto Rest API instance if given, + The request is done using a Core REST API instance if given, otherwise it will be done using the demisto.internalHttpRequest method. Args: incident (dict): An incident object. - rest_api_instance (str): A Demisto REST API instance name to use for fetching task details. + rest_api_instance (str): A Core REST API instance name to use for fetching task details. Returns: tuple of context outputs and total amount of related error entries diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.yml b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.yml index fd7be862f12e..aa5224c9e170 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.yml +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks.yml @@ -1,6 +1,6 @@ args: - defaultValue: -status:closed - description: The query by which to retrieve failed tasks. Optional. The default value is "-status:closed" + description: The query by which to retrieve failed tasks. Optional. The default value is "-status:closed". name: query - defaultValue: '300' description: Maximum number of incidents to query. Maximum is 1000. @@ -22,7 +22,7 @@ script: '-' subtype: python3 timeout: '0' type: python -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 tests: - No tests fromversion: 6.0.0 diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks_test.py b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks_test.py index eba5bb569d15..600fbff501af 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks_test.py +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/GetFailedTasks_test.py @@ -8,8 +8,9 @@ def mock_execute_command(command_name, _): if command_name == 'getIncidents': return INCIDENTS_RESULT - elif command_name == 'demisto-api-post': + elif command_name == 'core-api-post': return RESTAPI_TAS_RESULT + return None @pytest.mark.parametrize('rest_api_instacne', ['rest_api_instacne', None]) @@ -100,7 +101,7 @@ def test_get_incident_tasks_using_internal_request(mocker, response, expected_re def test_get_incident_data_using_rest_api_instance(mocker): """ Given: - - An incident and an Demisto Rest Api instance. + - An incident and an Core REST API instance. When: - Running the get_incident_data function. @@ -118,7 +119,7 @@ def test_get_incident_data_using_rest_api_instance(mocker): def test_get_incident_data_using_internal_http_request(mocker): """ Given: - - An incident and no Demisto Rest Api instance. + - An incident and no Core REST API instance. When: - Running the get_incident_data function. @@ -135,7 +136,7 @@ def test_get_incident_data_using_internal_http_request(mocker): def test_get_incident_data_internal_http_request_fail(mocker): """ Given: - - An incident and no Demisto Rest Api instance. + - An incident and no Core REST API instance. When: - Running the get_incident_data function. diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py index 68cbdae5547d..913705edc95f 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py @@ -243,8 +243,8 @@ RESTAPI_TAS_RESULT = [ { - "ModuleName": "Demisto REST API_instance_1", - "Brand": "Demisto REST API", + "ModuleName": "Core REST API_instance_1", + "Brand": "Core REST API", "Category": "Utilities", "ID": "", "Version": 0, @@ -390,7 +390,7 @@ "parentId": "158@51", "pinned": False, "fileMetadata": None, - "parentContent": "!demisto-api-post uri=\"investigation/7/workplan/tasks\" body=\"{\\\"states\\\":[\\\"Error\\\"],\\\"types\\\":[\\\"regular\\\",\\\"condition\\\",\\\"collection\\\"]}\"", + "parentContent": "!core-api-post uri=\"investigation/7/workplan/tasks\" body=\"{\\\"states\\\":[\\\"Error\\\"],\\\"types\\\":[\\\"regular\\\",\\\"condition\\\",\\\"collection\\\"]}\"", "parentEntryTruncated": False, "system": "", "reputations": None, @@ -411,8 +411,8 @@ "playbookId": "", "reputationSize": 0, "contentsSize": 0, - "brand": "Demisto REST API", - "instance": "Demisto REST API_instance_1", + "brand": "Core REST API", + "instance": "Core REST API_instance_1", "IndicatorTimeline": None, "mirrored": False }, diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py index 1fb31ffa5526..540381fc8715 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py @@ -5,7 +5,7 @@ @pytest.mark.parametrize('list_, expected', [ ([{ - 'Contents': 'Cortex XDR - IR_instance_1,Demisto REST API_instance_1,Image ' + 'Contents': 'Cortex XDR - IR_instance_1,Core REST API_instance_1,Image ' 'OCR_default_instance,Rasterize_default_instance,Where is the egg?_default_instance,d2,' 'fcm_default_instance,testmodule,Active Directory Query v2_instance_1,BigFix_instance_1,' 'Tanium Threat Response_instance_1,Threat Grid_instance_1,VirusTotal_instance_1,' diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/README.md b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/README.md index 540b0fa3b81f..8f0dd168e55a 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/README.md +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/README.md @@ -1,6 +1,7 @@ Use this Script to re-run failed tasks. Run in the same incident after running `GetFailedTasks` for restarting all of the failed tasks or some of them. ## Script Data + --- | **Name** | **Description** | @@ -10,11 +11,14 @@ Use this Script to re-run failed tasks. Run in the same incident after running ` | XSOAR Version | 6.0.0 | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-post + +* core-api-post ## Inputs + --- | **Argument Name** | **Description** | @@ -25,6 +29,7 @@ This script uses the following commands and scripts. | group_size | Integer of how many tasks you want to be restarted at a time \(grouping\) before a sleep period \(as to not overwhelm the system\) | ## Outputs + --- | **Path** | **Description** | **Type** | @@ -36,6 +41,7 @@ This script uses the following commands and scripts. | RestartedTasks.Task.TaskName | The name of the task | String | ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.py b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.py index 3fd71a7a42d0..49264000db58 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.py +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.py @@ -69,7 +69,7 @@ def restart_tasks(failed_tasks: list, sleep_time: int, group_size: int): if is_xsoar_version_6_2: body = {'taskinfo': body} - demisto.executeCommand("demisto-api-post", {"uri": "inv-playbook/task/execute", "body": json.dumps(body)}) + demisto.executeCommand("core-api-post", {"uri": "inv-playbook/task/execute", "body": json.dumps(body)}) restarted_tasks.append({'IncidentID': incident_id, 'TaskID': task_id, 'PlaybookName': playbook_name, 'TaskName': task_name}) restarted_tasks_count += 1 diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.yml b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.yml index 5ae18b2c3c5f..b649078fd250 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.yml +++ b/Packs/IntegrationsAndIncidentsHealthCheck/Scripts/RestartFailedTasks/RestartFailedTasks.yml @@ -1,15 +1,15 @@ args: - defaultValue: Job - description: Comma Separated list of failed tasks to exclude from restart based on playbook string match + description: Comma Separated list of failed tasks to exclude from restart based on playbook string match. name: playbook_exclusion - defaultValue: '10' - description: Sleep between restarting batch task (seconds) + description: Sleep between restarting batch task (seconds). name: sleep_time - defaultValue: '100' - description: Limit of number of incidents to restart tasks on + description: Limit of number of incidents to restart tasks on. name: incident_limit - defaultValue: '10' - description: Integer of how many tasks you want to be restarted at a time (grouping) before a sleep period (as to not overwhelm the system) + description: Integer of how many tasks you want to be restarted at a time (grouping) before a sleep period (as to not overwhelm the system). name: group_size comment: Use this Script to re-run failed tasks. Run in the same incident after running `GetFailedTasks` for restarting all of the failed tasks or some of them. commonfields: @@ -19,28 +19,28 @@ enabled: true name: RestartFailedTasks outputs: - contextPath: RestartedTasks.Total - description: The total amount of tasks that were reopened + description: The total amount of tasks that were reopened. type: Number - contextPath: RestartedTasks.Task.TaskID - description: The ID of the task + description: The ID of the task. type: String - contextPath: RestartedTasks.Task.IncidentID - description: The ID of the incident of the task + description: The ID of the incident of the task. type: String - contextPath: RestartedTasks.Task.PlaybookName - description: The name of the playbook of the task + description: The name of the playbook of the task. type: String - contextPath: RestartedTasks.Task.TaskName - description: The name of the task + description: The name of the task. type: String script: '-' subtype: python3 timeout: 1.2µs type: python -dockerimage: demisto/python3:3.10.6.33415 +dockerimage: demisto/python3:3.10.13.83255 tests: - No tests (auto formatted) dependson: must: - - demisto-api-post + - core-api-post fromversion: 6.0.0 diff --git a/Packs/IntegrationsAndIncidentsHealthCheck/pack_metadata.json b/Packs/IntegrationsAndIncidentsHealthCheck/pack_metadata.json index c4e3e504f142..848125ed51bd 100644 --- a/Packs/IntegrationsAndIncidentsHealthCheck/pack_metadata.json +++ b/Packs/IntegrationsAndIncidentsHealthCheck/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Integrations & Incidents Health Check", "description": "Do you know which of your integrations or open incidents failed? With this content, you can view your failed integrations and open incidents", "support": "xsoar", - "currentVersion": "1.3.15", + "currentVersion": "1.3.16", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/MobileIronCLOUD_description.md b/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/MobileIronCLOUD_description.md index 77397f3aa1bc..09164c6aa580 100644 --- a/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/MobileIronCLOUD_description.md +++ b/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/MobileIronCLOUD_description.md @@ -3,7 +3,7 @@ 1. Log in to the MobileIron Cloud Admin console. 2. Open the users section. 3. Click the create user button and select the option to create a new API user. It is recommended to create a new user for the Cortex XSOAR integration specifically and not reuse an existing one. -4. Fill in all the required details (i.e., use demisto-api-user as the username) and make sure you enter a strong password. +4. Fill in all the required details (i.e., use core-api-user as the username) and make sure you enter a strong password. 5. When setting up the Cortex XSOAR integration, use the auto-generated email address as the username and the password you defined as the MobileIron tenant credentials. 6. Click the `Test` button and ensure the connection can be established. @@ -16,4 +16,4 @@ If you are dividing the devices into different spaces, it is important to make s points to the correct `Partition ID (Device Space ID)`. You should leave this value blank if you are not using spaces or if you want the integration to automatically resolve the -default space ID. +default space ID. \ No newline at end of file diff --git a/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/README.md b/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/README.md index fb9be5ffe7be..628bef42eb35 100644 --- a/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/README.md +++ b/Packs/MobileIronUEM/Integrations/MobileIronCLOUD/README.md @@ -6,7 +6,7 @@ 2. Open the users section. 3. Click the create user button and select the option to create a new API user. It is recommended to create a new user for the Cortex XSOAR integration specifically and not reuse an existing one. -4. Fill in all the required details (i.e., use demisto-api-user as the username) and make sure you enter a strong password. +4. Fill in all the required details (i.e., use core-api-user as the username) and make sure you enter a strong password. 5. When setting up the Cortex XSOAR integration, use the auto-generated email address as the username and the password you defined as the MobileIron tenant credentials. 6. Click the `Test` button and ensure the connection can be established. @@ -57,10 +57,14 @@ Here is an example image of the rule | isFetch | Fetch incidents | False | 4. Click **Test** to validate the URLs, token, and connection. + ## Commands + You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details. + ### mobileiron-cloud-get-devices-data + *** Gets all the devices based on a particular filter query. The command might execute multiple API calls depending on the amount of devices that would be returned. @@ -68,6 +72,7 @@ Gets all the devices based on a particular filter query. The command might execu #### Base Command `mobileiron-cloud-get-devices-data` + #### Input | **Argument Name** | **Description** | **Required** | @@ -113,9 +118,11 @@ Gets all the devices based on a particular filter query. The command might execu #### Command Example + ```!mobileiron-cloud-get-devices-data``` #### Context Example + ```json { "MobileIronCloud": { @@ -162,6 +169,7 @@ Gets all the devices based on a particular filter query. The command might execu ``` ### mobileiron-cloud-get-device-by-mac + *** Gets a single device matching the provided mac address. @@ -169,6 +177,7 @@ Gets a single device matching the provided mac address. #### Base Command `mobileiron-cloud-get-device-by-mac` + #### Input | **Argument Name** | **Description** | **Required** | @@ -213,9 +222,11 @@ Gets a single device matching the provided mac address. #### Command Example + ```!mobileiron-cloud-get-device-by-mac device_mac=MAC_HERE``` #### Context Example + ```json { "MobileIronCloud": { @@ -260,6 +271,7 @@ Gets a single device matching the provided mac address. ``` ### mobileiron-cloud-get-device-by-serial + *** Gets a single device matching the provided value for the device serial number. @@ -267,6 +279,7 @@ Gets a single device matching the provided value for the device serial number. #### Base Command `mobileiron-cloud-get-device-by-serial` + #### Input | **Argument Name** | **Description** | **Required** | @@ -311,9 +324,11 @@ Gets a single device matching the provided value for the device serial number. #### Command Example + ```!mobileiron-cloud-get-device-by-serial device_serial=SERIAL_HERE``` #### Context Example + ```json { "MobileIronCloud": { @@ -358,6 +373,7 @@ Gets a single device matching the provided value for the device serial number. ``` ### mobileiron-cloud-unlock-device + *** Sends an unlock action to the device. @@ -365,6 +381,7 @@ Sends an unlock action to the device. #### Base Command `mobileiron-cloud-unlock-device` + #### Input | **Argument Name** | **Description** | **Required** | @@ -373,6 +390,7 @@ Sends an unlock action to the device. #### Command Example + ```!mobileiron-cloud-unlock-device device_id=1100646``` #### Human Readable Output @@ -380,6 +398,7 @@ Sends an unlock action to the device. >Action was performed successfully ### mobileiron-cloud-retire-device + *** Sends a retire action to the device. @@ -387,6 +406,7 @@ Sends a retire action to the device. #### Base Command `mobileiron-cloud-retire-device` + #### Input | **Argument Name** | **Description** | **Required** | @@ -399,6 +419,7 @@ Sends a retire action to the device. >Action was performed successfully ### mobileiron-cloud-wipe-device + *** Sends a wipe action to the device. This is a potentially destructive action as it will completely wipe the device. @@ -406,6 +427,7 @@ Sends a wipe action to the device. This is a potentially destructive action as i #### Base Command `mobileiron-cloud-wipe-device` + #### Input | **Argument Name** | **Description** | **Required** | @@ -419,6 +441,7 @@ Sends a wipe action to the device. This is a potentially destructive action as i ### mobileiron-cloud-force-check-in + *** Forces a check in to the particular device based on the device ID. @@ -426,6 +449,7 @@ Forces a check in to the particular device based on the device ID. #### Base Command `mobileiron-cloud-force-check-in` + #### Input | **Argument Name** | **Description** | **Required** | @@ -439,6 +463,7 @@ Forces a check in to the particular device based on the device ID. ### mobileiron-cloud-send-message + *** Sends a message to the device. @@ -446,6 +471,7 @@ Sends a message to the device. #### Base Command `mobileiron-cloud-send-message` + #### Input | **Argument Name** | **Description** | **Required** | @@ -462,12 +488,14 @@ Sends a message to the device. ### mobileiron-cloud-get-device-by-id + *** Returns the data for a particular device based on the device ID. #### Base Command `mobileiron-cloud-get-device-by-id` + #### Input | **Argument Name** | **Description** | **Required** | @@ -512,9 +540,11 @@ Returns the data for a particular device based on the device ID. #### Command Example + ```!mobileiron-cloud-get-device-by-id device_id=1100646``` #### Context Example + ```json { "MobileIronCloud": { diff --git a/Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE_description.md b/Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE_description.md index ecc137ac50a7..19d25dc280c4 100644 --- a/Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE_description.md +++ b/Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE_description.md @@ -4,7 +4,7 @@ 2. Open the `Users` top section. 3. Click on the `create local user` button. It is recommended to create a new user for the Cortex XSOAR integration specifically and not reuse an existing one. -4. Make sure you enter all the details and keep note of the User ID (ex. demisto-api-user) and the password specifically. +4. Make sure you enter all the details and keep note of the User ID (ex. core-api-user) and the password specifically. 5. Click on the `Admins` top section 6. Add the user you just created as an admin to the instance. 6. When setting up the Cortex XSOAR integration use User ID as the username and the password you defined as the MobileIron tenant credentials. @@ -17,4 +17,4 @@ Refer to the API documentation at the MobileIron community for more details on s If you are dividing the devices into different spaces, it is important to make sure the integration points to the correct `Device Admin Space ID`. -In most cases, this is set to the value *1* for the global space ID. +In most cases, this is set to the value *1* for the global space ID. \ No newline at end of file diff --git a/Packs/MobileIronUEM/Integrations/MobileIronCORE/README.md b/Packs/MobileIronUEM/Integrations/MobileIronCORE/README.md index 673a54e33c8f..4a613eb72362 100644 --- a/Packs/MobileIronUEM/Integrations/MobileIronCORE/README.md +++ b/Packs/MobileIronUEM/Integrations/MobileIronCORE/README.md @@ -8,7 +8,7 @@ This integration was created and tested with version *11.0.0* of MobileIronCORE 2. Open the `Users` top section. 3. Click on the `create local user` button. It is recommended to create a new user for the Cortex XSOAR integration specifically and not reuse an existing one. -4. Make sure you enter all the details and keep note of the User ID (ex. demisto-api-user) and the password specifically. +4. Make sure you enter all the details and keep note of the User ID (ex. core-api-user) and the password specifically. 5. Click on the `Admins` top section. 6. Add the user you just created as an admin to the instance. 6. When setting up the Cortex XSOAR integration use User ID as the username and the password you defined as the MobileIron tenant credentials @@ -60,10 +60,14 @@ Here is an example image of the rule | isFetch | Fetch incidents | False | 4. Click **Test** to validate the URLs, token, and connection. + ## Commands + You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details. + ### mobileiron-core-send-message + *** Sends a message to the particular device based on the device ID. @@ -71,6 +75,7 @@ Sends a message to the particular device based on the device ID. #### Base Command `mobileiron-core-send-message` + #### Input | **Argument Name** | **Description** | **Required** | @@ -82,6 +87,7 @@ Sends a message to the particular device based on the device ID. ### mobileiron-core-update-os + *** Updates the operating system on the particular device based on the device ID. @@ -89,6 +95,7 @@ Updates the operating system on the particular device based on the device ID. #### Base Command `mobileiron-core-update-os` + #### Input | **Argument Name** | **Description** | **Required** | @@ -98,6 +105,7 @@ Updates the operating system on the particular device based on the device ID. ### mobileiron-core-unlock-device-only + *** Unlocks the particular device based on the device ID. @@ -105,6 +113,7 @@ Unlocks the particular device based on the device ID. #### Base Command `mobileiron-core-unlock-device-only` + #### Input | **Argument Name** | **Description** | **Required** | @@ -113,6 +122,7 @@ Unlocks the particular device based on the device ID. ### mobileiron-core-enable-voice-roaming + *** Enables voice roaming on the particular device based on the device ID. @@ -120,6 +130,7 @@ Enables voice roaming on the particular device based on the device ID. #### Base Command `mobileiron-core-enable-voice-roaming` + #### Input | **Argument Name** | **Description** | **Required** | @@ -128,6 +139,7 @@ Enables voice roaming on the particular device based on the device ID. ### mobileiron-core-disable-voice-roaming + *** Disables voice roaming on the particular device based on the device ID. @@ -135,6 +147,7 @@ Disables voice roaming on the particular device based on the device ID. #### Base Command `mobileiron-core-disable-voice-roaming` + #### Input | **Argument Name** | **Description** | **Required** | @@ -143,6 +156,7 @@ Disables voice roaming on the particular device based on the device ID. ### mobileiron-core-enable-data-roaming + *** Enables data roaming on the particular device based on the device ID. @@ -150,6 +164,7 @@ Enables data roaming on the particular device based on the device ID. #### Base Command `mobileiron-core-enable-data-roaming` + #### Input | **Argument Name** | **Description** | **Required** | @@ -158,6 +173,7 @@ Enables data roaming on the particular device based on the device ID. ### mobileiron-core-disable-data-roaming + *** Disables data roaming on the particular device based on the device ID. @@ -165,6 +181,7 @@ Disables data roaming on the particular device based on the device ID. #### Base Command `mobileiron-core-disable-data-roaming` + #### Input | **Argument Name** | **Description** | **Required** | @@ -173,6 +190,7 @@ Disables data roaming on the particular device based on the device ID. ### mobileiron-core-enable-personal-hotspot + *** Enables a personal hotspot on the particular device based on the device ID. @@ -180,6 +198,7 @@ Enables a personal hotspot on the particular device based on the device ID. #### Base Command `mobileiron-core-enable-personal-hotspot` + #### Input | **Argument Name** | **Description** | **Required** | @@ -188,6 +207,7 @@ Enables a personal hotspot on the particular device based on the device ID. ### mobileiron-core-disable-personal-hotspot + *** Disables a personal hotspot on the particular device based on the device ID. @@ -195,6 +215,7 @@ Disables a personal hotspot on the particular device based on the device ID. #### Base Command `mobileiron-core-disable-personal-hotspot` + #### Input | **Argument Name** | **Description** | **Required** | @@ -203,6 +224,7 @@ Disables a personal hotspot on the particular device based on the device ID. ### mobileiron-core-unlock-app-connect-container + *** Unlocks an app connect container on the particular device based on the device ID. @@ -210,6 +232,7 @@ Unlocks an app connect container on the particular device based on the device ID #### Base Command `mobileiron-core-unlock-app-connect-container` + #### Input | **Argument Name** | **Description** | **Required** | @@ -218,6 +241,7 @@ Unlocks an app connect container on the particular device based on the device ID ### mobileiron-core-retire-device + *** Retires a device based on the device ID. @@ -225,6 +249,7 @@ Retires a device based on the device ID. #### Base Command `mobileiron-core-retire-device` + #### Input | **Argument Name** | **Description** | **Required** | @@ -233,6 +258,7 @@ Retires a device based on the device ID. ### mobileiron-core-wipe-device + *** Wipes a device based on the device ID. @@ -240,6 +266,7 @@ Wipes a device based on the device ID. #### Base Command `mobileiron-core-wipe-device` + #### Input | **Argument Name** | **Description** | **Required** | @@ -248,6 +275,7 @@ Wipes a device based on the device ID. ### mobileiron-core-force-checkin + *** Forces check in to the device based on the device ID. @@ -255,6 +283,7 @@ Forces check in to the device based on the device ID. #### Base Command `mobileiron-core-force-checkin` + #### Input | **Argument Name** | **Description** | **Required** | @@ -263,12 +292,14 @@ Forces check in to the device based on the device ID. ### mobileiron-core-get-devices-data + *** Gets a list of devices matching the provided query. #### Base Command `mobileiron-core-get-devices-data` + #### Input | **Argument Name** | **Description** | **Required** | @@ -317,9 +348,11 @@ Gets a list of devices matching the provided query. #### Command Example + ```!mobileiron-core-get-devices-data``` #### Context Example + ```json { "MobileIronCore": { @@ -359,6 +392,7 @@ Gets a list of devices matching the provided query. ### mobileiron-core-get-device-by-uuid + *** Gets a single device based on the device UUID. @@ -366,6 +400,7 @@ Gets a single device based on the device UUID. #### Base Command `mobileiron-core-get-device-by-uuid` + #### Input | **Argument Name** | **Description** | **Required** | @@ -413,9 +448,11 @@ Gets a single device based on the device UUID. #### Command Example + ```!mobileiron-core-get-device-by-uuid device_uuid=9b0da853-9f9b-483c-97ef-f4b5457299cf``` #### Context Example + ```json { "MobileIronCore": { @@ -452,12 +489,14 @@ Gets a single device based on the device UUID. ``` ### mobileiron-core-get-device-by-serial + *** Gets a single device based on the device serial number. #### Base Command `mobileiron-core-get-device-by-serial` + #### Input | **Argument Name** | **Description** | **Required** | @@ -505,10 +544,12 @@ Gets a single device based on the device serial number. #### Command Example + ```!mobileiron-core-get-device-by-serial device_serial=EXAMPLE``` #### Context Example + ```json { "MobileIronCore": { @@ -545,6 +586,7 @@ Gets a single device based on the device serial number. ``` ### mobileiron-core-get-device-by-mac + *** Gets a single device based on the device WiFi MAC address. @@ -600,10 +642,12 @@ Gets a single device based on the device WiFi MAC address. #### Command Example + ```!mobileiron-core-get-device-by-mac device_mac=EXAMPLE``` #### Context Example + ```json { "MobileIronCore": { @@ -640,12 +684,14 @@ Gets a single device based on the device WiFi MAC address. ``` ### mobileiron-core-get-device-by-ip + *** Gets a single device based on the device IP address. #### Base Command `mobileiron-core-get-device-by-ip` + #### Input | **Argument Name** | **Description** | **Required** | @@ -693,10 +739,12 @@ Gets a single device based on the device IP address. #### Command Example + ```!mobileiron-core-get-device-by-ip device_id=IP``` #### Context Example + ```json { "MobileIronCore": { diff --git a/Packs/MobileIronUEM/ReleaseNotes/1_0_14.json b/Packs/MobileIronUEM/ReleaseNotes/1_0_14.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/MobileIronUEM/ReleaseNotes/1_0_14.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/MobileIronUEM/ReleaseNotes/1_0_14.md b/Packs/MobileIronUEM/ReleaseNotes/1_0_14.md new file mode 100644 index 000000000000..38b11a0d7ac1 --- /dev/null +++ b/Packs/MobileIronUEM/ReleaseNotes/1_0_14.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### MobileIronCLOUD + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### MobileIronCORE + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/MobileIronUEM/pack_metadata.json b/Packs/MobileIronUEM/pack_metadata.json index 8cb50e51a3ee..581bd7862527 100644 --- a/Packs/MobileIronUEM/pack_metadata.json +++ b/Packs/MobileIronUEM/pack_metadata.json @@ -3,7 +3,7 @@ "description": "This MobileIron UEM Content Pack enables fetching device data and incidents from both MobileIron Core and Cloud. The integration, apart from providing custom commands helpful when doing data enrichment, includes sample playbooks and an incident layout to help analyst investigations", "support": "partner", "certification": "certified", - "currentVersion": "1.0.13", + "currentVersion": "1.0.14", "author": "MobileIron Inc.", "url": "https://mobileiron.com", "email": "ecosystem@mobileiron.com", diff --git a/Packs/PANWComprehensiveInvestigation/Playbooks/Palo_Alto_Networks_-_Endpoint_Malware_Investigation_v3.yml b/Packs/PANWComprehensiveInvestigation/Playbooks/Palo_Alto_Networks_-_Endpoint_Malware_Investigation_v3.yml index ad1c34da50b8..cf1e0be4a1b4 100644 --- a/Packs/PANWComprehensiveInvestigation/Playbooks/Palo_Alto_Networks_-_Endpoint_Malware_Investigation_v3.yml +++ b/Packs/PANWComprehensiveInvestigation/Playbooks/Palo_Alto_Networks_-_Endpoint_Malware_Investigation_v3.yml @@ -916,7 +916,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API - - operator: isEqualString left: value: diff --git a/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.json b/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.md b/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.md new file mode 100644 index 000000000000..68a0715739fb --- /dev/null +++ b/Packs/PANWComprehensiveInvestigation/ReleaseNotes/1_3_21.md @@ -0,0 +1,4 @@ + +#### Playbooks +##### Palo Alto Networks - Endpoint Malware Investigation v3 +Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. \ No newline at end of file diff --git a/Packs/PANWComprehensiveInvestigation/pack_metadata.json b/Packs/PANWComprehensiveInvestigation/pack_metadata.json index 67131d4ecc93..eb06b829910e 100644 --- a/Packs/PANWComprehensiveInvestigation/pack_metadata.json +++ b/Packs/PANWComprehensiveInvestigation/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Comprehensive Investigation by Palo Alto Networks", "description": "Are you a Palo Alto Networks customer? We have just the content pack to help you orchestrate incident response across Palo Alto Networks products.", "support": "xsoar", - "currentVersion": "1.3.20", + "currentVersion": "1.3.21", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/SymantecEDR/TestPlaybooks/playbook-SymantecEDR_Test.yml b/Packs/SymantecEDR/TestPlaybooks/playbook-SymantecEDR_Test.yml index ada7fff4db58..583ec790c422 100644 --- a/Packs/SymantecEDR/TestPlaybooks/playbook-SymantecEDR_Test.yml +++ b/Packs/SymantecEDR/TestPlaybooks/playbook-SymantecEDR_Test.yml @@ -259,7 +259,7 @@ tasks: id: dc1ce88a-c13c-4147-8795-3a6515876e19 version: -1 name: Provides Command - description: Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Demisto REST API" integration must first be enabled. + description: Finds which integrations implement a specific Demisto command. The results will be returned as comma-separated values (CSV). The "Core REST API" integration must first be enabled. scriptName: ProvidesCommand type: regular iscommand: false diff --git a/Packs/Tidy/TestPlaybooks/Tidy_-_Test.yml b/Packs/Tidy/TestPlaybooks/Tidy_-_Test.yml index 429772ce18af..13c1462f397e 100644 --- a/Packs/Tidy/TestPlaybooks/Tidy_-_Test.yml +++ b/Packs/Tidy/TestPlaybooks/Tidy_-_Test.yml @@ -74,12 +74,7 @@ tasks: id: 1a2f4019-bdd9-44b9-8fec-1d47cadf2a62 version: -1 name: Run instances - description: Launches the specified number of instances using an AMI for which - you have permissions. You can create a launch template , which is a resource - that contains the parameters to launch an instance. When you launch an instance - using RunInstances , you can specify the launch template instead of specifying - the launch parameters. An instance is ready for you to use when its in the - running state. You can check the state of your instance using DescribeInstances. + description: Launches the specified number of instances using an AMI for which you have permissions. You can create a launch template , which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances , you can specify the launch template instead of specifying the launch parameters. An instance is ready for you to use when its in the running state. You can check the state of your instance using DescribeInstances. script: '|||aws-ec2-run-instances' type: regular iscommand: true @@ -121,8 +116,7 @@ tasks: id: c39d8a36-bf77-442f-87e8-43ada583a8dd version: -1 name: Is instance ready? - description: A waiter function that runs every 15 seconds until a successful - state is reached + description: A waiter function that runs every 15 seconds until a successful state is reached script: '|||aws-ec2-waiter-instance-status-ok' type: regular iscommand: true @@ -230,8 +224,7 @@ tasks: id: 0cb8a3c8-8ef2-412b-8905-e788154bcd2f version: -1 name: Terminate Instance - description: Shuts down one or more instances. This operation is idempotent; - if you terminate an instance more than once, each call succeeds. + description: Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. script: '|||aws-ec2-terminate-instances' type: regular iscommand: true @@ -263,8 +256,7 @@ tasks: id: 22397a92-6566-44dd-8821-1634f3b656d9 version: -1 name: Is instance terminated? - description: A waiter function that runs every 15 seconds until a successful - state is reached + description: A waiter function that runs every 15 seconds until a successful state is reached script: '|||aws-ec2-waiter-instance-terminated' type: regular iscommand: true @@ -423,7 +415,7 @@ tasks: version: -1 name: Configure Tidy Instance description: send HTTP PUT request - script: '|||demisto-api-put' + script: '|||core-api-put' type: regular iscommand: true brand: "" @@ -553,8 +545,7 @@ tasks: id: 0e9a018f-a8b4-4e1d-8384-b8880aa527ad version: -1 name: Check that Tidy integration enabled - description: Returns 'yes' if integration brand is available. Otherwise returns - 'no' + description: Returns 'yes' if integration brand is available. Otherwise returns 'no' scriptName: IsIntegrationAvailable type: condition iscommand: false @@ -597,4 +588,4 @@ view: |- inputs: [] outputs: [] fromversion: 6.0.0 -description: Test Tidy content developer setup on a aws mac machine +description: Test Tidy content developer setup on a aws mac machine. diff --git a/Packs/Troubleshoot/Layouts/layout-edit-Integration_Troubleshooting_Layout-Integration_Troubleshooting.json b/Packs/Troubleshoot/Layouts/layout-edit-Integration_Troubleshooting_Layout-Integration_Troubleshooting.json index be5da16af89b..84a2497b4fac 100644 --- a/Packs/Troubleshoot/Layouts/layout-edit-Integration_Troubleshooting_Layout-Integration_Troubleshooting.json +++ b/Packs/Troubleshoot/Layouts/layout-edit-Integration_Troubleshooting_Layout-Integration_Troubleshooting.json @@ -67,7 +67,7 @@ "type": "" }, { - "description": "To use the Troubleshooting Incident, you must have a configured [Demisto REST API integration](https://xsoar.pan.dev/docs/reference/articles/integrations-and-incident-health-check#1-demisto-rest-api-integration)", + "description": "To use the Troubleshooting Incident, you must have a configured [Core REST API integration](https://xsoar.pan.dev/docs/reference/articles/integrations-and-incident-health-check#1-core-rest-api-integration)", "fields": [ { "fieldId": "incident_troubleshoottype", diff --git a/Packs/Troubleshoot/Layouts/layoutscontainer-Integration_Troubleshooting.json b/Packs/Troubleshoot/Layouts/layoutscontainer-Integration_Troubleshooting.json index 9a3fe0d920b9..331d10610e43 100644 --- a/Packs/Troubleshoot/Layouts/layoutscontainer-Integration_Troubleshooting.json +++ b/Packs/Troubleshoot/Layouts/layoutscontainer-Integration_Troubleshooting.json @@ -246,7 +246,7 @@ "type": "" }, { - "description": "To use the Troubleshooting Incident, you must have a configured [Demisto REST API integration](https://xsoar.pan.dev/docs/reference/articles/integrations-and-incident-health-check#1-demisto-rest-api-integration)", + "description": "To use the Troubleshooting Incident, you must have a configured [Core REST API integration](https://xsoar.pan.dev/docs/reference/articles/integrations-and-incident-health-check#1-core-rest-api-integration)", "fields": [ { "fieldId": "incident_troubleshoottype", diff --git a/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting.yml b/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting.yml index e6a624c9600c..34f96cd90a86 100644 --- a/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting.yml +++ b/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting.yml @@ -3,8 +3,7 @@ version: -1 contentitemexportablefields: contentitemfields: {} name: Integration Troubleshooting -description: Troubleshoot a problem with either an integration's configuration or - with running a command. +description: Troubleshoot a problem with either an integration's configuration or with running a command. starttaskid: "0" tasks: "0": @@ -451,8 +450,7 @@ tasks: - "19" scriptarguments: value: - simple: The command succeeds when changing the 'Proxy' value. Try changing - it and see if the problem persists. + simple: The command succeeds when changing the 'Proxy' value. Try changing it and see if the problem persists. separatecontext: false view: |- { @@ -484,8 +482,7 @@ tasks: - "19" scriptarguments: message: - simple: This is not a verified XSOAR integration. Use an official integration - instead. + simple: This is not a verified XSOAR integration. Use an official integration instead. continueonerror: true separatecontext: false view: |- @@ -551,8 +548,7 @@ tasks: - "19" scriptarguments: value: - simple: The command succeeds when changing the 'Insecure' (Trust any certificate, - not secure) value. Try changing it and see if the problem persists. + simple: The command succeeds when changing the 'Insecure' (Trust any certificate, not secure) value. Try changing it and see if the problem persists. separatecontext: false view: |- { @@ -719,8 +715,7 @@ tasks: id: 1b34a222-1005-427c-8926-a669b1c3822e version: -1 name: Did insecure change work? - description: Did changing the 'Insecure' (Trust any certificate, not secure) - value work? + description: Did changing the 'Insecure' (Trust any certificate, not secure) value work? type: condition iscommand: false brand: "" @@ -957,8 +952,8 @@ tasks: task: id: 44cebb67-c8c0-4247-804f-623e8caf4ae7 version: -1 - name: Is Demisto REST API integration configured? - description: Is the Demisto REST API integration configured? + name: Is Core REST API integration configured? + description: Is the Core REST API integration configured? type: condition iscommand: false brand: "" @@ -984,7 +979,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API accessor: state iscontext: true right: @@ -1017,8 +1012,7 @@ tasks: brand: "" scriptarguments: message: - simple: The Demisto REST API integration is not configured. Configure the - integration in order to use this playbook. + simple: The Core REST API integration is not configured. Configure the integration in order to use this playbook. separatecontext: false view: |- { @@ -1065,8 +1059,7 @@ tasks: id: 09db14ae-7d44-4e58-81a6-20627815216a version: -1 name: Is running with insecure checked? - description: Checks if the incident's 'Insecure' (Trust any certificate, not - secure) value is selected. + description: Checks if the incident's 'Insecure' (Trust any certificate, not secure) value is selected. type: condition iscommand: false brand: "" @@ -1186,7 +1179,7 @@ tasks: version: -1 name: Get server logs description: Download files from the Cortex XSOAR server. - script: '|||demisto-api-download' + script: '|||core-api-download' type: regular iscommand: true brand: "" @@ -1220,7 +1213,7 @@ tasks: version: -1 name: Get advanced parameters description: Send HTTP GET requests. - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" diff --git a/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting_README.md b/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting_README.md new file mode 100644 index 000000000000..d324e0b97503 --- /dev/null +++ b/Packs/Troubleshoot/Playbooks/playbook-Integration_Troubleshooting_README.md @@ -0,0 +1,47 @@ +Troubleshoot a problem with either an integration's configuration or with running a command. + +## Dependencies + +This playbook uses the following sub-playbooks, integrations, and scripts. + +### Sub-playbooks + +This playbook does not use any sub-playbooks. + +### Integrations + +This playbook does not use any integrations. + +### Scripts + +* PrintErrorEntry +* Print +* TroubleshootTestInstance +* TroubleshootGetInstanceParameters +* TroubleshootAggregateResults +* ZipFile +* TroubleshootIsDockerImageExists +* ReadFile +* TroubleshootExecuteCommand +* TroubleshootGetCommandandArgs + +### Commands + +* core-api-download +* core-api-get + +## Playbook Inputs + +--- + +| **Name** | **Description** | **Default Value** | **Required** | +| --- | --- | --- | --- | +| instancename | The name of the instance to check. | incident.instancename | Required | +| troubleshoottype | The troubleshoot type. | incident.troubleshoottype | Required | +| commandline | The full command to run, for example, "\!vt-comments-get resource=www.example.com" | incident.commandline | Optional | +| insecure | Whether to run with changing the insecure flag. | incident.runwithinsecure | Optional | + +## Playbook Outputs + +--- +There are no outputs for this playbook. \ No newline at end of file diff --git a/Packs/Troubleshoot/README.md b/Packs/Troubleshoot/README.md index a1df255854eb..9912135047cb 100644 --- a/Packs/Troubleshoot/README.md +++ b/Packs/Troubleshoot/README.md @@ -14,7 +14,7 @@ that you can later submit to the [Cortex XSOAR support site](https://support.pal ## How to use --- -* Configure a [Demisto REST API integration](https://xsoar.pan.dev/docs/reference/packs/integrations-and-incident-health-check#1-demisto-rest-api-integration) instance. +* Configure a [Core REST API integration](https://xsoar.pan.dev/docs/reference/packs/integrations-and-incident-health-check#1-core-rest-api-integration) instance. * Create a new incident of type "Integration Troubleshooting" * **Troubleshoot type**: * Use ***I'm unable to configure an instance*** if you fail to configure an integration (the test button returns an error). diff --git a/Packs/Troubleshoot/ReleaseNotes/2_0_13.json b/Packs/Troubleshoot/ReleaseNotes/2_0_13.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/Troubleshoot/ReleaseNotes/2_0_13.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/Troubleshoot/ReleaseNotes/2_0_13.md b/Packs/Troubleshoot/ReleaseNotes/2_0_13.md new file mode 100644 index 000000000000..7924a07a8743 --- /dev/null +++ b/Packs/Troubleshoot/ReleaseNotes/2_0_13.md @@ -0,0 +1,29 @@ + +#### Playbooks + +##### Integration Troubleshooting + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) + +#### Scripts + +##### TroubleshootTestInstance + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### TroubleshootGetInstanceParameters + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### TroubleshootIsDockerImageExists + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) + +#### Layouts + +- **Integration Troubleshooting Layout** + +##### Integration Troubleshooting Layout + +- Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. diff --git a/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.py b/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.py index d39f132eab70..9de5aee14792 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.py +++ b/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.py @@ -1,10 +1,9 @@ -from typing import Tuple from CommonServerPython import * def get_configurations_from_xsoar() -> dict: - res = demisto.executeCommand('demisto-api-post', { + res = demisto.executeCommand('core-api-post', { 'uri': 'settings/integration/search', 'body': """{"size": 500}""" }) @@ -13,7 +12,7 @@ def get_configurations_from_xsoar() -> dict: return res[0]['Contents']['response'] -def get_conf(name: str) -> Tuple[dict, dict]: +def get_conf(name: str) -> tuple[dict, dict]: configurations = get_configurations_from_xsoar() try: instance_config = list(filter(lambda item: item['name'] == name, configurations['instances']))[0] @@ -35,7 +34,7 @@ def get_proxy_key(instance: dict) -> Optional[str]: return proxy_key -def get_proxy_key_value(instance: dict) -> Tuple[Optional[str], Optional[bool]]: +def get_proxy_key_value(instance: dict) -> tuple[Optional[str], Optional[bool]]: # Try to find any param named proxy if (proxy_key := get_proxy_key(instance)) is not None: return proxy_key, bool(instance[proxy_key]) @@ -52,7 +51,7 @@ def get_insecure_key(instance: dict) -> Optional[str]: return None -def get_insecure_key_value(instance: dict) -> Tuple[Optional[str], Optional[bool]]: +def get_insecure_key_value(instance: dict) -> tuple[Optional[str], Optional[bool]]: if (key := get_insecure_key(instance)) is not None: return key, bool(instance[key]) else: @@ -73,7 +72,7 @@ def build_parameters(integration_config: dict, instance_config: dict) -> dict: if data := instance_config.get('data'): instance = {field['name']: field['value'] for field in data} else: - instance = dict() + instance = {} instance['engine'] = instance_config['engine'] try: del instance['credentials'] diff --git a/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.yml b/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.yml index f737bcd26d98..ae0452e0a64d 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.yml +++ b/Packs/Troubleshoot/Scripts/TroubleshootGetInstanceParameters/TroubleshootGetInstanceParameters.yml @@ -53,10 +53,10 @@ tags: - troubleshoot timeout: '0' type: python -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 fromversion: 5.0.0 dependson: must: - - demisto-api-post + - core-api-post tests: - No tests (auto formatted) diff --git a/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.py b/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.py index 86da82dbc38e..5859522adb55 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.py +++ b/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.py @@ -8,7 +8,7 @@ def get_installed_docker_images(): res = demisto.executeCommand( - 'demisto-api-get', + 'core-api-get', {'uri': 'settings/docker-images'} ) if is_error(res): diff --git a/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.yml b/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.yml index 1a1f94e32fe6..5a053a59a586 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.yml +++ b/Packs/Troubleshoot/Scripts/TroubleshootIsDockerImageExists/TroubleshootIsDockerImageExists.yml @@ -23,8 +23,8 @@ type: python subtype: python3 dependson: must: - - demisto-api-get -dockerimage: demisto/python3:3.10.12.63474 + - core-api-get +dockerimage: demisto/python3:3.10.13.83255 fromversion: 5.0.0 tests: - No tests (auto formatted) diff --git a/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.py b/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.py index e8a7537c80aa..2fec57b85773 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.py +++ b/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.py @@ -1,7 +1,7 @@ """ Gets an instance configuration and a parameter to modify, to check if is works. """ -from typing import Iterable +from collections.abc import Iterable from CommonServerPython import * @@ -28,7 +28,7 @@ def change_keys(instance: dict, keys: Iterable) -> dict: def save_configuration(arguments: dict) -> List[str]: res = demisto.executeCommand( - 'demisto-api-put', + 'core-api-put', { 'uri': 'settings/integration', 'body': arguments @@ -38,7 +38,7 @@ def save_configuration(arguments: dict) -> List[str]: def execute_test_module(arguments: dict) -> List[str]: res = demisto.executeCommand( - 'demisto-api-post', + 'core-api-post', { 'uri': '/settings/integration/test', 'body': arguments diff --git a/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.yml b/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.yml index 23be0e5da28f..8086b9d32c60 100644 --- a/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.yml +++ b/Packs/Troubleshoot/Scripts/TroubleshootTestInstance/TroubleshootTestInstance.yml @@ -28,12 +28,11 @@ tags: timeout: '0' type: python subtype: python3 -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 fromversion: 5.0.0 dependson: must: - - demisto-api-put - - demisto-api-post + - core-api-put + - core-api-post tests: - No tests (auto formatted) - diff --git a/Packs/Troubleshoot/pack_metadata.json b/Packs/Troubleshoot/pack_metadata.json index 3a84aebc85f7..9b53f318d41e 100644 --- a/Packs/Troubleshoot/pack_metadata.json +++ b/Packs/Troubleshoot/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Troubleshoot", "description": "Use this pack to troubleshoot your environment.", "support": "xsoar", - "currentVersion": "2.0.12", + "currentVersion": "2.0.13", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/Use_Case_Builder/Playbooks/Use_Case_Builder.yml b/Packs/Use_Case_Builder/Playbooks/Use_Case_Builder.yml index 912f81dac686..d173a068e8c9 100644 --- a/Packs/Use_Case_Builder/Playbooks/Use_Case_Builder.yml +++ b/Packs/Use_Case_Builder/Playbooks/Use_Case_Builder.yml @@ -705,7 +705,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API - - operator: isEqualString left: value: @@ -717,7 +717,7 @@ tasks: iscontext: true right: value: - simple: Demisto REST API + simple: Core REST API continueonerrortype: "" view: |- { diff --git a/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.json b/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.md b/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.md new file mode 100644 index 000000000000..7f802d453793 --- /dev/null +++ b/Packs/Use_Case_Builder/ReleaseNotes/1_0_5.md @@ -0,0 +1,14 @@ + +#### Scripts + +##### UseCasePlaybookAutoGenerator + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) + + +#### Playbooks + +##### Use Case Builder + +Replaced the usage of the deprecated **Demisto REST API** integration with the **Core REST API** integration. \ No newline at end of file diff --git a/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.py b/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.py index 7748a7ebd331..e89c7e1eae45 100644 --- a/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.py +++ b/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.py @@ -129,7 +129,7 @@ def main(): useCasePlaybook.endPlaybook() playbookPostJSON = useCasePlaybook.createPlaybookJSON() - demisto.executeCommand("demisto-api-post", {"uri": "/playbook/save", "body": playbookPostJSON}) + demisto.executeCommand("core-api-post", {"uri": "/playbook/save", "body": playbookPostJSON}) except Exception as ex: demisto.error(traceback.format_exc()) # print the traceback return_error(f'Failed to execute BaseScript. Error: {str(ex)}') diff --git a/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.yml b/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.yml index 0dfef13291f4..6390a5c50322 100644 --- a/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.yml +++ b/Packs/Use_Case_Builder/Scripts/UseCasePlaybookAutoGenerator/UseCasePlaybookAutoGenerator.yml @@ -5,7 +5,7 @@ contentitemexportablefields: contentitemfields: fromServerVersion: "" comment: '' -dockerimage: demisto/python3:3.10.12.63474 +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: UseCasePlaybookAutoGenerator runas: DBotWeakRole diff --git a/Packs/Use_Case_Builder/pack_metadata.json b/Packs/Use_Case_Builder/pack_metadata.json index 8731eccf384f..66b95a738d69 100644 --- a/Packs/Use_Case_Builder/pack_metadata.json +++ b/Packs/Use_Case_Builder/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Use Case Builder", "description": "To streamline the Use Case Design process and provide tools to help you get into production faster!", "support": "community", - "currentVersion": "1.0.4", + "currentVersion": "1.0.5", "author": "Joe Cosgrove", "url": "https://www.paloaltonetworks.com/cortex", "email": "jcosgrove@paloaltonetworks.com", @@ -17,4 +17,4 @@ "marketplaces": [ "xsoar" ] -} +} \ No newline at end of file diff --git a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content.yml b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content.yml index 64b10a6bdfcd..1ae992393dab 100644 --- a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content.yml +++ b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content.yml @@ -62,7 +62,7 @@ tasks: id: 3fb995fa-a0bf-4054-8f8c-d829a5ceb5d2 iscommand: true name: Download Custom Content Bundle from Dev - script: '|||demisto-api-download' + script: '|||core-api-download' tags: - devcontent type: regular @@ -151,10 +151,10 @@ tasks: skipunavailable: false task: brand: "" - description: "# Setup Demisto Dev\n\nPlease setup a single instance of the Core REST API or Demisto REST API Integration for your Development server to continue using this playbook. \n\nThis instance must be named **Demisto Dev**.\n\nRerun this playbook once completed. \n" + description: "# Setup Demisto Dev\n\nPlease setup a single instance of the Core REST API Integration for your Development server to continue using this playbook. \n\nThis instance must be named **Demisto Dev**.\n\nRerun this playbook once completed. \n" id: e09f3cae-5301-451b-85ca-138e4ca93bbf iscommand: false - name: Enable Demisto Dev - Core or Demisto REST API integration instance to continue + name: Enable Demisto Dev - Core REST API integration instance to continue type: regular version: -1 taskid: e09f3cae-5301-451b-85ca-138e4ca93bbf diff --git a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content_README.md b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content_README.md index f73ed29eab67..011aa7cec08b 100644 --- a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content_README.md +++ b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Export_Selected_Custom_Content_README.md @@ -14,7 +14,7 @@ This playbook does not use any sub-playbooks. ### Integrations -* Demisto REST API +* Core REST API ### Scripts @@ -24,7 +24,7 @@ This playbook does not use any sub-playbooks. ### Commands * setIncident -* demisto-api-download +* core-api-download * closeInvestigation ## Playbook Inputs diff --git a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod.yml b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod.yml index d5cd3f45c9d1..c57afbaa06db 100644 --- a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod.yml +++ b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod.yml @@ -1,5 +1,5 @@ description: |- - This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API or Demisto REST API integration. + This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API integration. Please ensure to read the setup instructions for this pack carefully. @@ -68,7 +68,7 @@ tasks: id: 45d6032a-9bfe-4db1-8b27-1e600f74a706 iscommand: true name: Download Custom Content Bundle from Dev - script: '|||demisto-api-download' + script: '|||core-api-download' tags: - devcontent type: regular @@ -128,10 +128,10 @@ tasks: skipunavailable: false task: brand: "" - description: Checks if the provided Core REST API or Demisto REST API instance is available for the XSOAR Simple Dev to Prod workflow. + description: Checks if the provided Core REST API instance is available for the XSOAR Simple Dev to Prod workflow. id: 4dde15ac-db8b-41e3-8680-4e7927257751 iscommand: false - name: Is the Demisto Dev - Core/Demisto REST API integration instance enabled? + name: Is the Demisto Dev - Core REST API integration instance enabled? script: IsDemistoRestAPIInstanceAvailable type: condition version: -1 @@ -157,10 +157,10 @@ tasks: skipunavailable: false task: brand: "" - description: "# Setup Demisto Dev\n\nPlease setup a single instance of the Core REST API or Demisto REST API Integration for your Development server to continue using this playbook. \n\nThis instance must be named **Demisto Dev**.\n\nRerun this playbook once completed. \n\n" + description: "# Setup Demisto Dev\n\nPlease setup a single instance of the Core REST API Integration for your Development server to continue using this playbook. \n\nThis instance must be named **Demisto Dev**.\n\nRerun this playbook once completed. \n\n" id: 6b342869-d7bb-4c5a-80f9-f929a0836f69 iscommand: false - name: Enable Demisto Dev - Core/Demisto REST API integration instance to continue + name: Enable Demisto Dev - Core REST API integration instance to continue type: regular version: -1 taskid: 6b342869-d7bb-4c5a-80f9-f929a0836f69 @@ -498,7 +498,7 @@ tasks: id: 1957024c-a9ab-4aa9-8fde-54d059eb654e iscommand: true name: Push Selected Content to Prod - script: '|||demisto-api-multipart' + script: '|||core-api-multipart' type: regular version: -1 taskid: 1957024c-a9ab-4aa9-8fde-54d059eb654e @@ -620,7 +620,7 @@ tasks: id: 9538b972-1086-4717-89ee-0b8e5e96446e iscommand: true name: 'Backup Custom Content Bundle from Prod ' - script: '|||demisto-api-download' + script: '|||core-api-download' tags: - prodbackup type: regular @@ -691,10 +691,10 @@ tasks: skipunavailable: false task: brand: "" - description: Checks if the provided Core REST API or Demisto REST API instance is available for the XSOAR Simple Dev to Prod workflow. + description: Checks if the provided Core REST API instance is available for the XSOAR Simple Dev to Prod workflow. id: 2f1df859-7924-4ccd-856c-1f17300cfb5b iscommand: false - name: Is the Demisto Prod - Core/Demisto REST API integration instance enabled? + name: Is the Demisto Prod - Core REST API integration instance enabled? script: IsDemistoRestAPIInstanceAvailable type: condition version: -1 @@ -735,10 +735,10 @@ tasks: skipunavailable: false task: brand: "" - description: Checks the configuration on the Core REST API or Demisto REST API Prod instance to see if it's correct + description: Checks the configuration on the Core REST API Prod instance to see if it's correct id: 511c189a-5f93-4289-8e1f-8404ed0f9a25 iscommand: false - name: Is the Production Core/Demisto REST API setup properly? + name: Is the Production Core REST API setup properly? type: condition version: -1 taskid: 511c189a-5f93-4289-8e1f-8404ed0f9a25 @@ -763,7 +763,7 @@ tasks: skipunavailable: false task: brand: "" - description: "# Setup Instructions for Demisto Prod\n\nThe Demisto Prod - Core REST API or Demisto REST API instance must be set to \"Do not use by default\" on the instance configuration. \n\nThe check in this playbook indicates this is not set properly, please ensure to read the setup instructions for this Pack. \n\nPlease set the **Demisto Prod** instance properly, and re-run this playbook. " + description: "# Setup Instructions for Demisto Prod\n\nThe Demisto Prod - Core REST API instance must be set to \"Do not use by default\" on the instance configuration. \n\nThe check in this playbook indicates this is not set properly, please ensure to read the setup instructions for this Pack. \n\nPlease set the **Demisto Prod** instance properly, and re-run this playbook. " id: 40db8672-b761-46e9-8fa9-2b87fb9fc443 iscommand: false name: Demisto Prod Instance not setup properly, provide instructions @@ -972,10 +972,10 @@ tasks: skipunavailable: false task: brand: "" - description: "# Setup Demisto Prod\n\nPlease setup a single instance of the Core REST API or Demisto REST API Integration for your Production server to continue using this playbook. \n\nThis instance must be named **Demisto Prod**, and the instance must be marked as **Do not use by default**\n\nRerun this playbook once completed. \n\n" + description: "# Setup Demisto Prod\n\nPlease setup a single instance of the Core REST API Integration for your Production server to continue using this playbook. \n\nThis instance must be named **Demisto Prod**, and the instance must be marked as **Do not use by default**\n\nRerun this playbook once completed. \n\n" id: 8c9702f6-e0a1-4888-8db8-5c5e5459b798 iscommand: false - name: Enable Demisto Prod - Core/Demisto REST API integration instance to continue + name: Enable Demisto Prod - Core REST API integration instance to continue type: regular version: -1 taskid: 8c9702f6-e0a1-4888-8db8-5c5e5459b798 diff --git a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod_README.md b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod_README.md index 60dc1d1d88d8..0eb628196f87 100644 --- a/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod_README.md +++ b/Packs/XSOAR-SimpleDevToProd/Playbooks/playbook-JOB_-_XSOAR_-_Simple_Dev_to_Prod_README.md @@ -1,4 +1,4 @@ -This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Demisto REST API integration. +This playbook is intended to be run as an adhoc job to quickly create a custom content bundle with only selected items from the servers custom content. You can import this new zip on the other XSOAR server, or push it to production using the Core REST API integration. Please ensure to read the setup instructions for this pack carefully. @@ -14,7 +14,7 @@ This playbook does not use any sub-playbooks. ### Integrations -* Demisto REST API +* Core REST API ### Scripts @@ -23,9 +23,9 @@ This playbook does not use any sub-playbooks. ### Commands -* demisto-api-download +* core-api-download * closeInvestigation -* demisto-api-multipart +* core-api-multipart * setIncident ## Playbook Inputs diff --git a/Packs/XSOAR-SimpleDevToProd/README.md b/Packs/XSOAR-SimpleDevToProd/README.md index 8194ab1e5a71..d2a48472319d 100644 --- a/Packs/XSOAR-SimpleDevToProd/README.md +++ b/Packs/XSOAR-SimpleDevToProd/README.md @@ -16,7 +16,7 @@ To begin, you need to setup the following: 1. Ensure your **Common Scripts** Pack is updated via the Marketplace. This pack makes use of the ZipFile automation from that pack. -2. Create an instance of the Demisto REST API integration for your XSOAR Development Server, where the instance name is **Demisto Dev**. +2. Create an instance of the Core REST API integration for your XSOAR Development Server, where the instance name is **Demisto Dev**. 4. Create a Job on your Dev XSOAR Server, with the type set to **XSOAR Dev to Prod**, using the playbook **JOB - XSOAR - Export Selected Custom Content** (this is the default). @@ -48,8 +48,8 @@ To begin, you need to setup the following: If you are intending to use the **JOB - XSOAR - Simple Dev to Prod** playbook for the automated push to production, I recommend the following additional settings on your Development Server: 1. Set the server configuration **ignore.default.in.playbooks = true**, which prevents playbook tasks from using integration instances which are marked as "Do not use by default". - * This ensures any other playbooks in your Development Server which use the Demisto Rest API integration don't try and use the Demisto Prod instance that you may have setup as part of this pack. - * The "Do not use by default" setting also ensures that users running manually Demisto Rest API integration commands via the Command Line Interface (CLI) don't use the Demisto Prod instance by mistake. + * This ensures any other playbooks in your Development Server which use the Core Rest API integration don't try and use the Demisto Prod instance that you may have setup as part of this pack. + * The "Do not use by default" setting also ensures that users running manually Core REST API integration commands via the Command Line Interface (CLI) don't use the Demisto Prod instance by mistake. 2. Restrict access to the Demisto Prod integration instance commands to approved XSOAR Administrators, please refer to the [Cortex XSOAR Administrators Guide](https://docs-cortex.paloaltonetworks.com/p/XSOAR) for your version for how to do this. * Permissions on the Demisto Prod instance should be restricted to users in the appropriate XSOAR roles (e.g. Administrators) diff --git a/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.json b/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.md b/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.md new file mode 100644 index 000000000000..728a184a79cc --- /dev/null +++ b/Packs/XSOAR-SimpleDevToProd/ReleaseNotes/1_0_7.md @@ -0,0 +1,9 @@ + +#### Playbooks + +##### JOB - XSOAR - Simple Dev to Prod + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### JOB - XSOAR - Export Selected Custom Content + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/XSOAR-SimpleDevToProd/pack_metadata.json b/Packs/XSOAR-SimpleDevToProd/pack_metadata.json index 58aafba6a515..c34f87e6b8e1 100644 --- a/Packs/XSOAR-SimpleDevToProd/pack_metadata.json +++ b/Packs/XSOAR-SimpleDevToProd/pack_metadata.json @@ -2,7 +2,7 @@ "name": "XSOAR - Simple Dev to Prod", "description": "This pack simplifies exporting custom content items between your XSOAR environments.", "support": "community", - "currentVersion": "1.0.6", + "currentVersion": "1.0.7", "author": "Mike Beauchamp", "url": "", "email": "mbeauchamp@paloaltonetworks.com", diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation.yml b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation.yml index 508a36d2eaaf..9b449884874a 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation.yml +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation.yml @@ -11,16 +11,12 @@ inputs: root: incident accessor: demistorestapiname required: true - description: Defines which instance of a configured Demisto API to use for checking - updates against. - playbookInputQuery: null + description: Defines which instance of a configured Demisto API to use for checking updates against. + playbookInputQuery: name: Check For Content Installation outputs: - contextPath: PacksUpdated - description: This will return true if all the content packs were updated. If a user - specified "All" in the content pack filters then all packs must be updated. Otherwise, - only those that are specified in the filter need to be updated for this to return - as True. + description: This will return true if all the content packs were updated. If a user specified "All" in the content pack filters then all packs must be updated. Otherwise, only those that are specified in the filter need to be updated for this to return as True. type: boolean - contextPath: ContentDataPreCheck description: This will return the names of packs that were not updated successfully. @@ -114,7 +110,7 @@ tasks: id: 855437f4-5e4f-45b6-8430-9aa92004787d iscommand: true name: Check for updates - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular version: -1 taskid: 855437f4-5e4f-45b6-8430-9aa92004787d @@ -177,8 +173,7 @@ tasks: skipunavailable: false task: brand: "" - description: This task checks to see if either all packs were updates or if - the user filtered packs were all updated. + description: This task checks to see if either all packs were updates or if the user filtered packs were all updated. id: e4616c06-c123-450f-8047-b88512bbf1c4 iscommand: false name: Are all the packs updated? diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation_README.md b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation_README.md index 99da3f70393c..bf609cdd230a 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation_README.md +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Check_For_Content_Installation_README.md @@ -1,26 +1,33 @@ This playbook checks for content updates. ## Dependencies + This playbook uses the following sub-playbooks, integrations, and scripts. ### Sub-playbooks + This playbook does not use any sub-playbooks. ### Integrations + This playbook does not use any integrations. ### Scripts + * DeleteContext * Set ### Commands -* demisto-api-get + +* core-api-get ## Playbook Inputs + --- There are no inputs for this playbook. ## Playbook Outputs + --- | **Path** | **Description** | **Type** | diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check.yml b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check.yml index 88a268d2c389..e17aa0868737 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check.yml +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check.yml @@ -2,13 +2,10 @@ contentitemexportablefields: contentitemfields: propagationLabels: - all -description: Deprecated. Use "Content Update Manager" playbook instead. This playbook will check to see if there are any content updates available - for installed packs and notify users via e-mail or Slack. +description: Deprecated. Use "Content Update Manager" playbook instead. This playbook will check to see if there are any content updates available for installed packs and notify users via e-mail or Slack. id: Content Update Check inputs: -- description: Provide semi-colon delimited e-mail addresses that will be used for - the new content notifications. You will require an integration installed and configured - that supports the send-mail command. +- description: Provide semi-colon delimited e-mail addresses that will be used for the new content notifications. You will require an integration installed and configured that supports the send-mail command. key: notificationemail playbookInputQuery: required: true @@ -16,8 +13,7 @@ inputs: complex: accessor: contentnotificationemail root: incident -- description: Provide a Slack username to which the notifications will be sent to. - You will require Slack integration to be installed and configured. +- description: Provide a Slack username to which the notifications will be sent to. You will require Slack integration to be installed and configured. key: slackuser playbookInputQuery: required: false @@ -25,9 +21,7 @@ inputs: complex: accessor: contentnotificationslackusername root: incident -- description: Provide a Slack channel to which the notifications will be sent to. - You will require Slack integration to be installed and configured. Also, ensure - that the XSOAR application has access to this channel. +- description: Provide a Slack channel to which the notifications will be sent to. You will require Slack integration to be installed and configured. Also, ensure that the XSOAR application has access to this channel. key: slackchannel playbookInputQuery: required: false @@ -101,7 +95,7 @@ tasks: id: 76a92f34-11f1-449d-80c4-e95bdff94024 iscommand: true name: Check for updates - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular version: -1 taskid: 76a92f34-11f1-449d-80c4-e95bdff94024 @@ -250,8 +244,7 @@ tasks: skipunavailable: false task: brand: "" - description: This will check if e-mail addresses have been provided and that - there are "send-mail" compatible integrations that are enabled. + description: This will check if e-mail addresses have been provided and that there are "send-mail" compatible integrations that are enabled. id: 1ae3bd65-646f-4d0b-8a98-67c599b73085 iscommand: false name: Emails @@ -399,8 +392,7 @@ tasks: skipunavailable: false task: brand: "" - description: This task will check if any Slack integrations are configured and - whether a Slack channel has been provided in the inputs. + description: This task will check if any Slack integrations are configured and whether a Slack channel has been provided in the inputs. id: d401a9b9-cc39-4485-8ed9-93f4aaaac611 iscommand: false name: Slack Channel @@ -463,8 +455,7 @@ tasks: skipunavailable: false task: brand: "" - description: This task will check if any Slack integrations are configured and - whether a Slack username has been provided in the inputs. + description: This task will check if any Slack integrations are configured and whether a Slack username has been provided in the inputs. id: 23769514-fc90-41d2-843a-f6b29c0ffd17 iscommand: false name: Slack User @@ -836,9 +827,7 @@ tasks: skipunavailable: false task: brand: "" - description: This task checks to see if there are any relevant updates available. - It will include all updates as relevant if the user has selected "All" packs - to be monitored. + description: This task checks to see if there are any relevant updates available. It will include all updates as relevant if the user has selected "All" packs to be monitored. id: ae99952a-402d-45f2-8544-3ed9f2085ecb iscommand: false name: Are there relevant updates? @@ -876,8 +865,7 @@ tasks: - args: prefix: value: - simple: Updates available but they do not match the user filter - ( + simple: Updates available but they do not match the user filter ( suffix: value: simple: ) @@ -927,10 +915,7 @@ tasks: skipunavailable: false task: brand: "" - description: This checks whether the packs were updated after either the sub-playbook - has timed out or there are no more updates to be applied. It will result in - the "yes" branch if the updates installed match those that were selected in - the Content Packs to be monitored. + description: This checks whether the packs were updated after either the sub-playbook has timed out or there are no more updates to be applied. It will result in the "yes" branch if the updates installed match those that were selected in the Content Packs to be monitored. id: 35d060bc-206c-472a-82df-6d49d9b46797 iscommand: false name: Were the packs updated? @@ -1047,8 +1032,7 @@ tasks: skipunavailable: false task: brand: "" - description: This will check whether the user has provided a specific content - pack update filter other than "All" + description: This will check whether the user has provided a specific content pack update filter other than "All" id: 77cbffc5-59fc-4834-8c8f-01dbd8707f66 iscommand: false name: Is there a user filter? @@ -1333,8 +1317,7 @@ tasks: skipunavailable: false task: brand: "" - description: This task will check if any Slack integrations are configured and - whether a Slack channel has been provided in the inputs. + description: This task will check if any Slack integrations are configured and whether a Slack channel has been provided in the inputs. id: 3070987b-f741-4911-85fd-49deb75a4f00 iscommand: false name: Send Slack notification if channel exists diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check_README.md b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check_README.md index 1ca87fcf181c..b713005b1162 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check_README.md +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Check_README.md @@ -1,26 +1,32 @@ Deprecated. Use "Content Update Manager" playbook instead. This playbook will check to see if there are any content updates available for installed packs and notify users via e-mail or Slack. ## Dependencies + This playbook uses the following sub-playbooks, integrations, and scripts. ### Sub-playbooks + * Check For Content Installation ### Integrations + * SlackV2 ### Scripts + * GetServerURL * Set ### Commands + * closeInvestigation * send-notification * setIncident * send-mail -* demisto-api-get +* core-api-get ## Playbook Inputs + --- | **Name** | **Description** | **Default Value** | **Required** | @@ -31,5 +37,6 @@ This playbook uses the following sub-playbooks, integrations, and scripts. | packs | A CSV of packs to monitor | incident.contentpackselection | Required | ## Playbook Outputs + --- There are no outputs for this playbook. diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager.yml b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager.yml index c31237ab4017..738b5f5e0236 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager.yml +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager.yml @@ -47,7 +47,7 @@ tasks: version: -1 name: Check for updates description: Sends an HTTP GET request to check for updates. - script: '|||demisto-api-get' + script: '|||core-api-get' type: regular iscommand: true brand: "" @@ -178,8 +178,7 @@ tasks: id: f322f372-6e92-4a8b-8c85-67c509ba37a1 version: -1 name: Are there e-mail addresses? - description: Checks if e-mail addresses are provided in the inputs and whether - any "send-mail" compatible integrations are enabled. + description: Checks if e-mail addresses are provided in the inputs and whether any "send-mail" compatible integrations are enabled. type: condition iscommand: false brand: "" @@ -243,8 +242,7 @@ tasks: id: c84f2fd3-e605-43d5-8b74-eda542bdcb33 version: -1 name: Are there Slack channels? - description: Checks if a Slack channel is provided in the inputs and whether - any Slack integrations are configured. + description: Checks if a Slack channel is provided in the inputs and whether any Slack integrations are configured. type: condition iscommand: false brand: "" @@ -308,8 +306,7 @@ tasks: id: aebffc5d-e57e-4fff-80ef-d9863fe82e4b version: -1 name: Are there Slack users? - description: Checks if a Slack username is provided in the inputs and whether - any Slack integrations are configured. + description: Checks if a Slack username is provided in the inputs and whether any Slack integrations are configured. type: condition iscommand: false brand: "" @@ -592,8 +589,7 @@ tasks: - id: "0" label: "" labelarg: - simple: Would you like XSOAR to perform automatic update for the found content - packs? + simple: Would you like XSOAR to perform automatic update for the found content packs? required: false gridcolumns: [] defaultrows: [] @@ -726,8 +722,7 @@ tasks: id: d2a57629-0340-41a4-82e7-a0e9988fb1c6 version: -1 name: Are there relevant updates? - description: Checks if relevant updates are available. It includes all updates - if the user selects monitoring "All" packs. + description: Checks if relevant updates are available. It includes all updates if the user selects monitoring "All" packs. type: condition iscommand: false brand: "" @@ -791,8 +786,7 @@ tasks: args: prefix: value: - simple: Updates available but they do not match the user filter - ( + simple: Updates available but they do not match the user filter ( suffix: value: simple: ) @@ -821,9 +815,7 @@ tasks: id: ab6eccd9-64b6-47b3-8879-76a0bc7aed15 version: -1 name: Were the packs updated? - description: Checks whether the packs were updated after either the sub-playbook - timed out or there are no more updates to apply. It results in the "yes" branch - if the installed updates match those selected in the content packs to be monitored. + description: Checks whether the packs were updated after either the sub-playbook timed out or there are no more updates to apply. It results in the "yes" branch if the installed updates match those selected in the content packs to be monitored. type: condition iscommand: false brand: "" @@ -963,8 +955,7 @@ tasks: id: d44eb457-7e91-4bcd-819a-75fbb32609c0 version: -1 name: Is there a user filter? - description: Checks whether the user provided a specific content pack update - filter other than "All". + description: Checks whether the user provided a specific content pack update filter other than "All". type: condition iscommand: false brand: "" @@ -1248,8 +1239,7 @@ tasks: id: cdbd4214-f433-457a-8cdf-c821beaf0f51 version: -1 name: Are there Slack channels? - description: Checks if a Slack channel is provided in the inputs and whether - any Slack integrations are configured. + description: Checks if a Slack channel is provided in the inputs and whether any Slack integrations are configured. type: condition iscommand: false brand: "" @@ -1582,8 +1572,7 @@ tasks: - id: "0" label: "" labelarg: - simple: Would you like XSOAR to perform automatic update for the found content - packs? + simple: Would you like XSOAR to perform automatic update for the found content packs? required: false gridcolumns: [] defaultrows: [] @@ -1766,8 +1755,7 @@ tasks: - id: "0" label: "" labelarg: - simple: Would you like XSOAR to perform automatic update for the found content - packs? + simple: Would you like XSOAR to perform automatic update for the found content packs? required: false gridcolumns: [] defaultrows: [] @@ -1818,8 +1806,7 @@ tasks: is_auto_json_transform: {} json_transform_properties: value: - simple: '{"changelog": {"keys": ["releaseNotes","released"], "is_nested": - true}}' + simple: '{"changelog": {"keys": ["releaseNotes","released"], "is_nested": true}}' title: {} separatecontext: false view: |- @@ -1876,8 +1863,7 @@ tasks: id: a4c8e1d3-ff41-4ff2-828c-8bfe4147e0e1 version: -1 name: Are there Slack users? - description: Checks if a Slack username is provided in the inputs and whether - any Slack integrations are configured. + description: Checks if a Slack username is provided in the inputs and whether any Slack integrations are configured. type: condition iscommand: false brand: "" @@ -2137,8 +2123,7 @@ tasks: id: 37df4958-12a3-428e-84d2-bda313d530db version: -1 name: Are there e-mail addresses? - description: Checks if e-mail addresses are provided in the inputs and whether - any "send-mail" compatible integrations are enabled. + description: Checks if e-mail addresses are provided in the inputs and whether any "send-mail" compatible integrations are enabled. type: condition iscommand: false brand: "" @@ -2461,9 +2446,7 @@ inputs: root: incident accessor: contentnotificationemail required: true - description: "Provides semi-colon delimited e-mail addresses for the new content\ - \ notifications. Note: You must have an installed and configured integration that\ - \ supports the send-mail command." + description: "Provides semi-colon delimited e-mail addresses for the new content notifications. Note: You must have an installed and configured integration that supports the send-mail command." playbookInputQuery: - key: slackuser value: @@ -2471,8 +2454,7 @@ inputs: root: incident accessor: contentnotificationslackusername required: false - description: "Provides a Slack username for the new content notifications. Note:\ - \ You must have an installed and configured Slack integration." + description: "Provides a Slack username for the new content notifications. Note: You must have an installed and configured Slack integration." playbookInputQuery: - key: slackchannel value: @@ -2480,9 +2462,7 @@ inputs: root: incident accessor: contentnotificationslackchannel required: false - description: "Provides a Slack channel for the new content notifications. Note:\ - \ You must have an installed and configured Slack integration. Also, make sure\ - \ the Cortex XSOAR application has access to this channel." + description: "Provides a Slack channel for the new content notifications. Note: You must have an installed and configured Slack integration. Also, make sure the Cortex XSOAR application has access to this channel." playbookInputQuery: - key: slackchannelid value: @@ -2490,8 +2470,7 @@ inputs: root: incident accessor: contentnotificationslackchannelid required: false - description: "Provides a Slack channel ID for the new content notifications. Note:\ - \ You must have an installed and configured Slack integration." + description: "Provides a Slack channel ID for the new content notifications. Note: You must have an installed and configured Slack integration." playbookInputQuery: - key: packs value: @@ -2529,9 +2508,8 @@ inputs: root: incident accessor: demistorestapiname required: true - description: Defines which instance of a configured Demisto API to use for checking - updates against. - playbookInputQuery: null + description: Defines which instance of a configured Demisto API to use for checking updates against. + playbookInputQuery: outputs: [] tests: - No tests (auto formatted) diff --git a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager_README.md b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager_README.md index 1eed8594f04c..b13206bd44b1 100644 --- a/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager_README.md +++ b/Packs/XSOARContentUpdateNotifications/Playbooks/playbook-Content_Update_Manager_README.md @@ -2,11 +2,14 @@ This playbook is part of the Content Management pack. ## Usage + This playbook checks for any available content updates for selected installed content packs and notifies users via e-mail or Slack. It also contains an auto-update flow that lets users decide via playbook inputs or communication tasks if they want to trigger an auto-update process to install all updates that were found. ## Triggers + The content update flow can be triggered in one of the following ways. + - Manually trigger by: 1) Creating a new incident with the type **Content Update Manager**. 2) Inserting the pack names you want to check and update. @@ -16,27 +19,31 @@ The content update flow can be triggered in one of the following ways. ## Configuration & Dependencies - GetServerURL pack - This is a mandatory dependency for the **Content Update Manager** playbook to run properly. You must install the GetServerURL pack through the XSOAR marketplace. No further configuration is required for this pack. -- Demisto REST API - This is a mandatory dependency for the **Content Update Manager** playbook to run properly. +- Core REST API - This is a mandatory dependency for the **Content Update Manager** playbook to run properly. - Send Notifications - Configure an email gateway integration or the Slack messaging integration to get notifications about the content update process. ### Sub-playbooks + **Content Version Check** - This playbook is a part of the **Content Update Manager** playbook flow, and it checks whether the installed content is updated to its latest version. ### Integrations -- Demisto REST API + +- Core REST API - Scripts - GetServerURL - CollectPacksData - MarketplacePackInstaller ### Commands -- demisto-api-get + +- core-api-get - Set - setIncident - closeInvestigation ## Playbook Inputs + --- | **Name** | **Description** | **Default Value** | **Required** | @@ -49,7 +56,9 @@ The content update flow can be triggered in one of the following ways. ## Playbook Outputs + There are no outputs for this playbook. ## Playbook Image + ![image](https://github.com/demisto/content/raw/ec6fdf6bc123841f8ba688e6d7e21072327f0d9c/Packs/XSOARContentUpdateNotifications/doc_files/Content_Update_Manager.png?raw=true) \ No newline at end of file diff --git a/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.json b/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.json new file mode 100644 index 000000000000..549cd91ede1b --- /dev/null +++ b/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.json @@ -0,0 +1,4 @@ +{ + "breakingChanges": true, + "breakingChangesNotes": "The Demisto REST API integration has been deprecated. Use the Core REST API integration in its place. The functionalities are the same." +} \ No newline at end of file diff --git a/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.md b/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.md new file mode 100644 index 000000000000..c33b4b1ee107 --- /dev/null +++ b/Packs/XSOARContentUpdateNotifications/ReleaseNotes/1_0_7.md @@ -0,0 +1,19 @@ + +#### Playbooks + +##### Content Update Check + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### Content Update Manager + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) +##### Check For Content Installation + +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) + +#### Scripts + +##### ListInstalledContentPacks + +- Updated the Docker image to: *demisto/python3:3.10.13.83255*. +- Deprecated the ***demisto-api-**** commands and replaced with the ***core-api-**** commands. (Commands are identical, no effect is expected.) diff --git a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.py b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.py index faeb88099536..0cf6e3df2ced 100644 --- a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.py +++ b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.py @@ -2,9 +2,9 @@ from CommonServerPython import * # noqa: F401 args = demisto.args() -updated = True if args.get('updates') == 'true' else False +updated = args.get('updates') == 'true' -packs = demisto.executeCommand("demisto-api-get", {"uri": "/contentpacks/installed-expired"})[0]['Contents'].get('response') +packs = demisto.executeCommand("core-api-get", {"uri": "/contentpacks/installed-expired"})[0]['Contents'].get('response') parsed_packs = [{ "name": x.get('name'), "version": x.get('currentVersion'), diff --git a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.yml b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.yml index bf689409033b..046e296ecf8d 100644 --- a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.yml +++ b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/ListInstalledContentPacks.yml @@ -12,19 +12,19 @@ commonfields: version: -1 dependson: must: - - '|||demisto-api-get' -dockerimage: demisto/python3:3.10.12.63474 + - '|||core-api-get' +dockerimage: demisto/python3:3.10.13.83255 enabled: true name: ListInstalledContentPacks outputs: - contextPath: InstalledPacks.Name - description: Pack Name + description: Pack Name. type: string - contextPath: InstalledPacks.Version - description: Pack Version + description: Pack Version. type: string - contextPath: InstalledPacks.Update - description: Is there an update available + description: Is there an update available. type: boolean runas: DBotWeakRole script: '' diff --git a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/README.md b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/README.md index 7dc8a0caf2c1..61587bac8a58 100644 --- a/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/README.md +++ b/Packs/XSOARContentUpdateNotifications/Scripts/ListInstalledContentPacks/README.md @@ -1,6 +1,7 @@ This script will show all installed content packs and whether they have an update. ## Script Data + --- | **Name** | **Description** | @@ -9,11 +10,14 @@ This script will show all installed content packs and whether they have an updat | Tags | | ## Dependencies + --- This script uses the following commands and scripts. -* demisto-api-get + +* core-api-get ## Inputs + --- | **Argument Name** | **Description** | @@ -21,6 +25,7 @@ This script uses the following commands and scripts. | updates | Whether to only show packs that have updates available. | ## Outputs + --- | **Path** | **Description** | **Type** | @@ -30,6 +35,7 @@ This script uses the following commands and scripts. | InstalledPacks.Update | Is there an update available | boolean | ### Troubleshooting + Multi-tenant environments should be configured with the Cortex Rest API instance when using this automation. Make sure the *Use tenant* parameter (in the Cortex Rest API integration) is checked to ensure that API calls are made to the current tenant instead of the master tenant. \ No newline at end of file diff --git a/Packs/XSOARContentUpdateNotifications/pack_metadata.json b/Packs/XSOARContentUpdateNotifications/pack_metadata.json index 68921deb5349..60be8ac68354 100644 --- a/Packs/XSOARContentUpdateNotifications/pack_metadata.json +++ b/Packs/XSOARContentUpdateNotifications/pack_metadata.json @@ -2,7 +2,7 @@ "name": "XSOAR Content Update Notifications", "description": "This pack will check for any available content updates for existing packs and send an e-mail or Slack message to users to inform them of the updates.", "support": "community", - "currentVersion": "1.0.6", + "currentVersion": "1.0.7", "author": "Adam Burt and XSOAR Labs", "url": "", "email": "",