Skip to content

[Automatic Migrations] Get Dashboards Endpoint#234016

Merged
logeekal merged 4 commits intoelastic:mainfrom
logeekal:feat/get_dashboards_endpoint
Sep 8, 2025
Merged

[Automatic Migrations] Get Dashboards Endpoint#234016
logeekal merged 4 commits intoelastic:mainfrom
logeekal:feat/get_dashboards_endpoint

Conversation

@logeekal
Copy link
Contributor

@logeekal logeekal commented Sep 4, 2025

Summary

Resolves

Adds GET /internal/dashboards/{migration_id}/dashboards endpoint which add capability to list, search and order dashboards.

@logeekal logeekal force-pushed the feat/get_dashboards_endpoint branch from 3aff0a8 to c04c32f Compare September 4, 2025 13:15
@logeekal logeekal marked this pull request as ready for review September 4, 2025 13:47
@logeekal logeekal requested review from a team as code owners September 4, 2025 13:47
@logeekal logeekal added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Threat Hunting Security Solution Threat Hunting Team labels Sep 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@logeekal logeekal added the v9.2.0 label Sep 4, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
_data_stream_timestamp 1 - -1
_doc_count 1 - -1
_ignored_source 1 - -1
_index_mode 1 - -1
_inference_fields 1 - -1
_tier 1 - -1
apm-custom-dashboards 5 - -5
apm-server-schema 2 - -2
apm-service-group 5 - -5
application_usage_daily 2 - -2
config 2 - -2
config-global 2 - -2
coreMigrationVersion 1 - -1
created_at 1 - -1
created_by 1 - -1
entity-definition 9 - -9
entity-discovery-api-key 2 - -2
event_loop_delays_daily 2 - -2
favorites 4 - -4
file 11 - -11
file-upload-usage-collection-telemetry 3 - -3
fileShare 5 - -5
infra-custom-dashboards 4 - -4
infrastructure-monitoring-log-view 2 - -2
intercept_trigger_record 5 - -5
legacy-url-alias 7 - -7
managed 1 - -1
ml-job 6 - -6
ml-module 13 - -13
ml-trained-model 7 - -7
monitoring-telemetry 2 - -2
namespace 1 - -1
namespaces 1 - -1
observability-onboarding-state 2 - -2
originId 1 - -1
product-doc-install-status 7 - -7
references 4 - -4
sample-data-telemetry 3 - -3
security-ai-prompt 8 - -8
slo 11 - -11
space 5 - -5
synthetics-monitor 34 - -34
synthetics-monitor-multi-space 34 - -34
tag 4 - -4
type 1 - -1
typeMigrationVersion 1 - -1
ui-metric 2 - -2
updated_at 1 - -1
updated_by 1 - -1
upgrade-assistant-ml-upgrade-operation 3 - -3
upgrade-assistant-reindex-operation 3 - -3
uptime-synthetics-api-key 2 - -2
url 5 - -5
usage-counters 2 - -2
total -246

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@logeekal logeekal requested a review from Copilot September 5, 2025 15:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a GET /internal/siem_migrations/dashboards/{migration_id}/dashboards endpoint that adds the capability to list, search, filter, sort and paginate dashboards in SIEM dashboard migrations. The implementation follows a similar pattern to existing rule migration functionality.

Key changes include:

  • Added comprehensive dashboard filtering and sorting capabilities
  • Implemented API endpoint with extensive test coverage
  • Refactored common sorting logic to be shared between rules and dashboards
  • Enhanced type definitions and API schema for dashboard querying

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mocks.ts Removed unused imports and statsOverrideCallbackFactory function
index.ts Added export for common utilities
es_queries_dashboards.ts Added function to index test dashboard migration data
dashboards.ts Added getDashboards method to test utility
dashboard_mocks.ts Added mock data structures and helper functions for testing
common.ts Created common utilities file with moved statsOverrideCallbackFactory
dashboard_migrations/index.ts Added test file registration for new GET endpoint
dashboards/get.ts Comprehensive test suite for the new GET dashboards endpoint
security_solution_api.gen.ts Generated API client code for new endpoint
rules/data/sort.ts Refactored to use common sorting utilities and improved type safety
rule_migrations_data_rules_client.ts Updated to use refactored common types
rules/api/rules/get.ts Updated audit logging method name
dashboards/data/sort.ts New sorting implementation for dashboard migrations
dashboards/data/dsl_queries.ts New filtering queries for dashboard migrations
dashboard_migrations_data_dashboards_client.ts Enhanced client with filtering and sorting logic
dashboards/api/index.ts Registered new GET endpoint route
dashboards/api/dashboards/get.ts Main API endpoint implementation
dashboards/api/dashboards/create.ts Removed debug logging
Common data types and schema files Enhanced type definitions and API schema

@logeekal logeekal enabled auto-merge (squash) September 7, 2025 23:46
logeekal and others added 2 commits September 8, 2025 01:46
…on/test_suites/siem_migrations/rules/trial_license_complete_tier/dashboard_migrations/dashboards/get.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@logeekal logeekal merged commit 0edc6df into elastic:main Sep 8, 2025
12 checks passed
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Sep 15, 2025
## Summary

Resolves 
- elastic/security-team#13835
- elastic/security-team#13803

Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which
add capability to `list`, `search` and order dashboards.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
## Summary

Resolves 
- elastic/security-team#13835
- elastic/security-team#13803

Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which
add capability to `list`, `search` and order dashboards.
niros1 pushed a commit that referenced this pull request Sep 30, 2025
## Summary

Resolves 
- elastic/security-team#13835
- elastic/security-team#13803

Adds `GET /internal/dashboards/{migration_id}/dashboards` endpoint which
add capability to `list`, `search` and order dashboards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants