Skip to content
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
35 changes: 30 additions & 5 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,23 @@
{
"title": "Example-Dashboard",
"layout_type": "ordered",
"widgets": [
{
"definition": {
"type": "note",
"content": "test",
"background_color": "white",
"font_size": "14",
"text_align": "left",
"show_tick": false,
"tick_pos": "50%",
"tick_edge": "left"
}
}
],
"default_timeframe": {
"type": "live",
"unit": "hour",
"value": 4
}
}
5 changes: 5 additions & 0 deletions data/api/v1/CodeExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
"suffix": "_1024858348",
"description": "Create a new dashboard with a formulas and functions treemap widget"
},
{
"group": "dashboards",
"suffix": "_4032568083",
"description": "Create a new dashboard with a live default_timeframe returns \"OK\" response"
},
{
"group": "dashboards",
"suffix": "_2644712913",
Expand Down
65 changes: 65 additions & 0 deletions data/api/v1/full_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,10 @@ components:
format: date-time
readOnly: true
type: string
default_timeframe:
$ref: "#/components/schemas/DashboardDefaultTimeframeSetting"
description: The default timeframe applied when opening the dashboard. Set to `null` to clear.
nullable: true
description:
description: Description of the dashboard.
nullable: true
Expand Down Expand Up @@ -1557,13 +1561,48 @@ components:
required:
- data
type: object
DashboardDefaultTimeframeSetting:
description: The default timeframe applied when opening the dashboard. Set to `null` to clear the dashboard's default timeframe.
oneOf:
- $ref: "#/components/schemas/DashboardLiveTimeframe"
- $ref: "#/components/schemas/DashboardFixedTimeframe"
DashboardDeleteResponse:
description: Response from the delete dashboard call.
properties:
deleted_dashboard_id:
description: ID of the deleted dashboard.
type: string
type: object
DashboardFixedTimeframe:
description: A fixed dashboard timeframe.
properties:
from:
description: Start time in milliseconds since epoch.
example: 1712080128000
format: int64
minimum: 0
type: integer
to:
description: End time in milliseconds since epoch.
example: 1712083128000
format: int64
minimum: 0
type: integer
type:
$ref: "#/components/schemas/DashboardFixedTimeframeType"
required:
- type
- from
- to
type: object
DashboardFixedTimeframeType:
description: Type of fixed timeframe.
enum:
- fixed
example: fixed
type: string
x-enum-varnames:
- FIXED
DashboardGlobalTime:
description: Object containing the live span selection for the dashboard.
properties:
Expand Down Expand Up @@ -1672,6 +1711,32 @@ components:
$ref: "#/components/schemas/DashboardList"
type: array
type: object
DashboardLiveTimeframe:
description: A live dashboard timeframe.
properties:
type:
$ref: "#/components/schemas/DashboardLiveTimeframeType"
unit:
$ref: "#/components/schemas/WidgetLiveSpanUnit"
value:
description: Value of the live timeframe span.
example: 4
format: int64
minimum: 1
type: integer
required:
- type
- value
- unit
type: object
DashboardLiveTimeframeType:
description: Type of live timeframe.
enum:
- live
example: live
type: string
x-enum-varnames:
- LIVE
DashboardReflowType:
description: |-
Reflow type for a **new dashboard layout** dashboard. Set this only when layout type is 'ordered'.
Expand Down
Loading