Skip to content

Update template variable schemas with type field in dashboards and shared dashboards endpoints for group by template variables #30186

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-26 17:58:30.290427",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-27 20:55:14.515407",
"spec_repo_commit": "81bebed1"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-26 17:58:39.398706",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-27 20:55:23.784970",
"spec_repo_commit": "81bebed1"
}
}
}
40 changes: 25 additions & 15 deletions content/en/api/v1/dashboards/examples.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"description": null,
"layout_type": "ordered",
"notify_list": [],
"reflow_type": "auto",
"restricted_roles": [],
"template_variables": [
{
"available_values": [
"service",
"datacenter",
"env"
],
"defaults": [
"service",
"datacenter"
],
"name": "group_by_var",
"type": "group"
}
],
"title": "",
"widgets": [
{
"definition": {
"requests": {
"fill": {
"q": "avg:system.cpu.user{*}"
}
},
"type": "hostmap"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"dashboard_id": "123-abc-456",
"dashboard_type": "custom_timeboard",
"share_type": "open",
"global_time": {
"live_span": "1h"
},
"selectable_template_vars": [
{
"default_value": "*",
"name": "group_by_var",
"type": "group",
"visible_tags": [
"selectableValue1",
"selectableValue2"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"global_time": {
"live_span": "15m"
},
"share_list": [],
"share_type": "open",
"selectable_template_vars": [
{
"default_value": "*",
"name": "group_by_var",
"type": "group",
"visible_tags": [
"selectableValue1",
"selectableValue2"
]
}
]
}
15 changes: 15 additions & 0 deletions data/api/v1/CodeExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@
"suffix": "_2850365602",
"description": "Create a new dashboard with template variable presets using values returns \"OK\" response"
},
{
"group": "dashboards",
"suffix": "_1751391372",
"description": "Create a new dashboard with template variable type field returns \"OK\" response"
},
{
"group": "dashboards",
"suffix": "_41622531",
Expand Down Expand Up @@ -452,6 +457,11 @@
"group": "dashboards",
"suffix": "",
"description": "Create a shared dashboard returns \"OK\" response"
},
{
"group": "dashboards",
"suffix": "_1668947073",
"description": "Create a shared dashboard with a group template variable returns \"OK\" response"
}
],
"DeleteDashboards": [
Expand Down Expand Up @@ -492,6 +502,11 @@
"group": "dashboards",
"suffix": "",
"description": "Update a shared dashboard returns \"OK\" response"
},
{
"group": "dashboards",
"suffix": "_1708268778",
"description": "Update a shared dashboard with selectable_template_vars returns \"OK\" response"
}
],
"CancelDowntimesByScope": [
Expand Down
13 changes: 13 additions & 0 deletions data/api/v1/full_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,13 @@ components:
example: host
nullable: true
type: string
type:
description: The type of variable. This is to differentiate between filter
variables (interpolated in query) and group by variables (interpolated
into group by).
example: group
nullable: true
type: string
required:
- name
type: object
Expand Down Expand Up @@ -12685,6 +12692,12 @@ components:
prefix:
description: The tag/attribute key associated with the template variable.
type: string
type:
description: The type of variable. This is to differentiate between filter
variables (interpolated in query) and group by variables (interpolated
into group by).
nullable: true
type: string
visible_tags:
description: List of visible tag values on the shared dashboard.
items:
Expand Down
Loading
Loading