-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Lens] Improve Visualizations API documentation #259842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
6298f86
[Lens] Improve Visualizations API documentation
florent-leborgne 1a03d0b
Improve intro overlay clarity and fix invalid JSON
florent-leborgne 73ba372
[Lens] Improve schema property descriptions for API documentation
florent-leborgne 608189c
Use info/warn callouts in Visualizations API overlay
florent-leborgne 0109a3c
[Lens] Add response schema descriptions and overlay improvements
florent-leborgne 3a0a569
[Lens] Remove redundant label overrides in histogram and range schemas
florent-leborgne 4337946
Revert "[Lens] Remove redundant label overrides in histogram and rang…
florent-leborgne d20491e
[Lens] Restore shared schema refs in search response meta
florent-leborgne 807dd01
[Lens] Inline route schemas so descriptions render in generated OAS
florent-leborgne e9641b4
[Lens] Move API intro before Get Started heading in overlay
florent-leborgne 7c579c8
[Lens] Update examples and overlay for size→limit and alignments→labe…
florent-leborgne e29151b
[Lens] Add Dashboards API cross-links to Visualizations overlay
florent-leborgne f63d49b
[Lens] Add cross-API positioning, fix auth link, improve bridge parag…
florent-leborgne 1ddac4f
[Lens] Improve Data source modes section with sub-headings
florent-leborgne c093e0e
[Lens] Remove blank line before info callout in Get started
florent-leborgne 2968ada
[Lens] Reframe ES|QL limitation as positive guidance
florent-leborgne 7783cf6
[Lens] Add titles to oneOf/anyOf schema variants for readable API docs
florent-leborgne 6076dcd
[Lens] Add consistent cURL/Console labels to code samples
florent-leborgne 90a1622
[Lens] Add docs and chart reference links to info callout
florent-leborgne d97507b
[Lens] Add schema title overrides for Viz-specific schemas
florent-leborgne f5c31b2
[Lens] Remove generated OAS output files from tracking
florent-leborgne fddceb0
[Lens] Update filter field name: query → expression in examples and o…
florent-leborgne 96fe8a1
[Lens] Rename by reference/inline by value → linked/inline
florent-leborgne 9e96e99
[Lens] Rename annotation layer title: by reference → linked
florent-leborgne fab03ce
[Lens] Use 'linked from library' for first mention in Next steps
florent-leborgne 161c943
[Lens] Fix review comments: pie example field names and rank_by signi…
florent-leborgne 934d6a3
[Lens] Remove phantom metric schema fields that duplicate metricStyli…
florent-leborgne 521de7a
[Lens] Update examples and overlay: dataset→data_source rename
florent-leborgne c9296af
[Lens] De-emphasize Lens term in overlay and schema comments
florent-leborgne 5dc99f1
[Lens] Polish schema descriptions: trailing periods, terse fixes
florent-leborgne d986d89
[Lens] Polish all chart schema descriptions: trailing periods and cla…
florent-leborgne 6358cd3
[Lens] Rework overlay intro: structure, prose, no em dashes
florent-leborgne 38edcaf
[Lens] Add 403, fix Next steps link, strip additionalProperties from …
florent-leborgne 6b27f09
[Lens] Remove broken overlay action; remove broken chart docs link
florent-leborgne dd9edbc
[Lens] Clean up schema IDs and add OAS post-processing pipeline
florent-leborgne 0e18c5a
[Lens] Restore description improvements, keep original schema IDs
florent-leborgne 271af87
[Lens] Remove enableQueryVersion from update route (not a docs change)
florent-leborgne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
oas_docs/examples/create_datatable_visualization_request.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| summary: Create a data table visualization | ||
| description: > | ||
| Creates a data table showing top client IPs by request count. Uses the Kibana sample web logs dataset (`kibana_sample_data_logs`). | ||
| value: | ||
| type: data_table | ||
| title: Top client IPs by request count | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| density: | ||
| mode: default | ||
| metrics: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| rows: | ||
| - operation: terms | ||
| fields: | ||
| - clientip | ||
| limit: 20 |
34 changes: 34 additions & 0 deletions
34
oas_docs/examples/create_datatable_visualization_response.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| summary: Data table visualization response | ||
| description: > | ||
| The response includes the assigned visualization ID, the full data table | ||
| configuration, and creation metadata. | ||
| value: | ||
| id: 7c9e6030-b3c5-11ef-bd7a-2b6b1a8c0f3d | ||
| data: | ||
| type: data_table | ||
| title: Top client IPs by request count | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| density: | ||
| mode: default | ||
| metrics: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| rows: | ||
| - operation: terms | ||
| fields: | ||
| - clientip | ||
| limit: 20 | ||
| meta: | ||
| type: lens | ||
| created_at: '2025-03-20T10:45:00.000Z' | ||
| updated_at: '2025-03-20T10:45:00.000Z' |
30 changes: 30 additions & 0 deletions
30
oas_docs/examples/create_metric_visualization_request.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| summary: Create a metric visualization | ||
| description: > | ||
| Creates a metric chart that displays the average bytes. Uses the Kibana sample web logs dataset (`kibana_sample_data_logs`). | ||
| value: | ||
| type: metric | ||
| title: Average response time | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| metrics: | ||
| - type: primary | ||
| operation: average | ||
| field: bytes | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| compact: true | ||
| filter: | ||
| expression: '' | ||
| labels: | ||
| alignment: left | ||
| value: | ||
| alignment: right | ||
| icon: | ||
| name: empty |
37 changes: 37 additions & 0 deletions
37
oas_docs/examples/create_metric_visualization_response.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| summary: Metric visualization response | ||
| description: > | ||
| The response includes the visualization ID, the full chart configuration in the data field, | ||
| and metadata about creation time and type. | ||
| value: | ||
| id: 1e4f0a30-b3c5-11ef-bd7a-2b6b1a8c0f3d | ||
| data: | ||
| type: metric | ||
| title: Average response time | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| metrics: | ||
| - type: primary | ||
| operation: average | ||
| field: bytes | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| compact: true | ||
| filter: | ||
| expression: '' | ||
| labels: | ||
| alignment: left | ||
| value: | ||
| alignment: right | ||
| icon: | ||
| name: empty | ||
| meta: | ||
| type: lens | ||
| created_at: '2025-03-20T10:30:00.000Z' | ||
| updated_at: '2025-03-20T10:30:00.000Z' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| summary: Create a donut chart visualization | ||
| description: > | ||
| Creates a donut chart showing web traffic distribution by operating system. Uses the Kibana sample web logs dataset (`kibana_sample_data_logs`). | ||
| value: | ||
| type: pie | ||
| title: Traffic by operating system | ||
| donut_hole: m | ||
| filters: [] | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| legend: | ||
| visibility: auto | ||
| size: auto | ||
| values: | ||
| mode: percentage | ||
| percent_decimals: 1 | ||
| metrics: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| group_by: | ||
| - operation: terms | ||
| fields: | ||
| - machine.os.keyword | ||
| limit: 5 | ||
| color: | ||
| mode: categorical | ||
| palette: default | ||
| mapping: [] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| summary: Donut chart visualization response | ||
| description: > | ||
| The response includes the assigned visualization ID, the full pie/donut chart configuration, | ||
| and creation metadata. | ||
| value: | ||
| id: 5b8d4f20-b3c5-11ef-bd7a-2b6b1a8c0f3d | ||
| data: | ||
| type: pie | ||
| title: Traffic by operating system | ||
| donut_hole: medium | ||
| filters: [] | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| legend: | ||
| visible: auto | ||
| size: auto | ||
| value_display: | ||
| mode: percentage | ||
| percent_decimals: 1 | ||
| metrics: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| group_by: | ||
| - operation: terms | ||
| fields: | ||
| - machine.os.keyword | ||
| limit: 5 | ||
| color: | ||
| mode: categorical | ||
| palette: default | ||
| mapping: [] | ||
| meta: | ||
| type: lens | ||
| created_at: '2025-03-20T10:40:00.000Z' | ||
| updated_at: '2025-03-20T10:40:00.000Z' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| summary: Create a line chart visualization | ||
| description: > | ||
| Creates a line chart showing log entry counts over time, broken down by response code. Uses the Kibana sample web logs dataset (`kibana_sample_data_logs`). | ||
| value: | ||
| type: xy | ||
| title: Log entries over time by response code | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| legend: | ||
| visibility: auto | ||
| inside: false | ||
| position: right | ||
| fitting: | ||
| type: none | ||
| axis: | ||
| x: | ||
| title: | ||
| visible: true | ||
| value: Timestamp | ||
| left: | ||
| title: | ||
| visible: true | ||
| value: Count | ||
| scale: linear | ||
| decorations: {} | ||
| layers: | ||
| - type: line | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| x: | ||
| operation: date_histogram | ||
| field: timestamp | ||
| y: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| breakdown_by: | ||
| operation: terms | ||
| fields: | ||
| - response.keyword | ||
| limit: 5 | ||
| color: | ||
| mode: categorical | ||
| palette: default | ||
| mapping: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| summary: Line chart visualization response | ||
| description: > | ||
| The response includes the assigned visualization ID, the full XY chart configuration, | ||
| and creation metadata. | ||
| value: | ||
| id: 3a7c2e10-b3c5-11ef-bd7a-2b6b1a8c0f3d | ||
| data: | ||
| type: xy | ||
| title: Log entries over time by response code | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| legend: | ||
| visibility: auto | ||
| inside: false | ||
| position: right | ||
| fitting: | ||
| type: none | ||
| axis: | ||
| x: | ||
| title: | ||
| visible: true | ||
| value: Timestamp | ||
| left: | ||
| title: | ||
| visible: true | ||
| value: Count | ||
| scale: linear | ||
| decorations: {} | ||
| layers: | ||
| - type: line | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| x: | ||
| operation: date_histogram | ||
| field: timestamp | ||
| y: | ||
| - operation: count | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| filter: | ||
| expression: '' | ||
| breakdown_by: | ||
| operation: terms | ||
| fields: | ||
| - response.keyword | ||
| limit: 5 | ||
| color: | ||
| mode: categorical | ||
| palette: default | ||
| mapping: [] | ||
| meta: | ||
| type: lens | ||
| created_at: '2025-03-20T10:35:00.000Z' | ||
| updated_at: '2025-03-20T10:35:00.000Z' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| summary: Get a metric visualization | ||
| description: > | ||
| Response from retrieving a single visualization by ID. The response envelope contains | ||
| the visualization ID, the full chart configuration in the data field, and metadata. | ||
| value: | ||
| id: 1e4f0a30-b3c5-11ef-bd7a-2b6b1a8c0f3d | ||
| data: | ||
| type: metric | ||
| title: Average response time | ||
| data_source: | ||
| type: data_view_spec | ||
| index_pattern: kibana_sample_data_logs | ||
| time_field: timestamp | ||
| filters: [] | ||
| query: | ||
| query: '' | ||
| language: kuery | ||
| metrics: | ||
| - type: primary | ||
| operation: average | ||
| field: bytes | ||
| format: | ||
| type: number | ||
| decimals: 0 | ||
| compact: true | ||
| filter: | ||
| expression: '' | ||
| labels: | ||
| alignment: left | ||
| value: | ||
| alignment: right | ||
| icon: | ||
| name: empty | ||
| meta: | ||
| type: lens | ||
| created_at: '2025-03-20T10:30:00.000Z' | ||
| updated_at: '2025-03-20T11:15:00.000Z' |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.