Skip to content

Commit a220010

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8653a85 of spec repo
1 parent 88bc3e4 commit a220010

21 files changed

Lines changed: 1054 additions & 3 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,38 @@ components:
18231823
x-enum-varnames:
18241824
- CUSTOM_TIMEBOARD
18251825
- CUSTOM_SCREENBOARD
1826+
DataProjectionQuery:
1827+
description: Query configuration for a data projection request.
1828+
properties:
1829+
data_source:
1830+
description: Data source for the query.
1831+
example: logs
1832+
type: string
1833+
indexes:
1834+
description: List of indexes to query.
1835+
items:
1836+
description: Index name.
1837+
type: string
1838+
type: array
1839+
query_string:
1840+
description: The query string to filter events.
1841+
example: "service:web-store"
1842+
type: string
1843+
storage:
1844+
description: Storage location for the query.
1845+
type: string
1846+
required:
1847+
- query_string
1848+
- data_source
1849+
type: object
1850+
DataProjectionRequestType:
1851+
description: Type of a data projection request.
1852+
enum:
1853+
- data_projection
1854+
example: data_projection
1855+
type: string
1856+
x-enum-varnames:
1857+
- DATA_PROJECTION
18261858
DeleteSharedDashboardResponse:
18271859
description: Response containing token of deleted shared dashboard.
18281860
properties:
@@ -11338,6 +11370,150 @@ components:
1133811370
maxItems: 2
1133911371
minItems: 2
1134011372
type: array
11373+
PointPlotDimension:
11374+
description: Dimension of the point plot.
11375+
enum:
11376+
- group
11377+
- time
11378+
- y
11379+
- radius
11380+
example: y
11381+
type: string
11382+
x-enum-varnames:
11383+
- GROUP
11384+
- TIME
11385+
- Y
11386+
- RADIUS
11387+
PointPlotProjection:
11388+
description: Projection configuration for the point plot widget.
11389+
properties:
11390+
dimensions:
11391+
description: List of dimension mappings for the projection.
11392+
items:
11393+
$ref: "#/components/schemas/PointPlotProjectionDimension"
11394+
type: array
11395+
extra_columns:
11396+
description: Additional columns to include in the projection.
11397+
items:
11398+
description: Column name.
11399+
type: string
11400+
type: array
11401+
type:
11402+
$ref: "#/components/schemas/PointPlotProjectionType"
11403+
required:
11404+
- type
11405+
- dimensions
11406+
type: object
11407+
PointPlotProjectionDimension:
11408+
description: Dimension mapping for the point plot projection.
11409+
properties:
11410+
alias:
11411+
description: Alias for the column.
11412+
type: string
11413+
column:
11414+
description: Source column name from the dataset.
11415+
example: duration
11416+
type: string
11417+
dimension:
11418+
$ref: "#/components/schemas/PointPlotDimension"
11419+
required:
11420+
- column
11421+
- dimension
11422+
type: object
11423+
PointPlotProjectionType:
11424+
description: Type of the projection.
11425+
enum:
11426+
- point_plot
11427+
example: point_plot
11428+
type: string
11429+
x-enum-varnames:
11430+
- POINT_PLOT
11431+
PointPlotWidgetDefinition:
11432+
description: The point plot displays individual data points over time.
11433+
properties:
11434+
custom_links:
11435+
description: List of custom links.
11436+
items:
11437+
$ref: "#/components/schemas/WidgetCustomLink"
11438+
type: array
11439+
description:
11440+
description: The description of the widget.
11441+
type: string
11442+
legend:
11443+
$ref: "#/components/schemas/PointPlotWidgetLegend"
11444+
markers:
11445+
description: List of markers for the widget.
11446+
items:
11447+
$ref: "#/components/schemas/WidgetMarker"
11448+
type: array
11449+
requests:
11450+
description: List of request configurations for the widget.
11451+
items:
11452+
$ref: "#/components/schemas/PointPlotWidgetRequest"
11453+
type: array
11454+
time:
11455+
$ref: "#/components/schemas/WidgetTime"
11456+
title:
11457+
description: Title of the widget.
11458+
type: string
11459+
title_align:
11460+
$ref: "#/components/schemas/WidgetTextAlign"
11461+
title_size:
11462+
description: Size of the title.
11463+
type: string
11464+
type:
11465+
$ref: "#/components/schemas/PointPlotWidgetDefinitionType"
11466+
yaxis:
11467+
$ref: "#/components/schemas/WidgetAxis"
11468+
required:
11469+
- type
11470+
- requests
11471+
type: object
11472+
PointPlotWidgetDefinitionType:
11473+
default: point_plot
11474+
description: Type of the point plot widget.
11475+
enum:
11476+
- point_plot
11477+
example: point_plot
11478+
type: string
11479+
x-enum-varnames:
11480+
- POINT_PLOT
11481+
PointPlotWidgetLegend:
11482+
description: Legend configuration for the point plot widget.
11483+
properties:
11484+
type:
11485+
$ref: "#/components/schemas/PointPlotWidgetLegendType"
11486+
required:
11487+
- type
11488+
type: object
11489+
PointPlotWidgetLegendType:
11490+
description: Type of legend to show for the point plot widget.
11491+
enum:
11492+
- automatic
11493+
- none
11494+
example: automatic
11495+
type: string
11496+
x-enum-varnames:
11497+
- AUTOMATIC
11498+
- NONE
11499+
PointPlotWidgetRequest:
11500+
description: Request configuration for the point plot widget.
11501+
properties:
11502+
limit:
11503+
description: Maximum number of data points to return.
11504+
format: int64
11505+
type: integer
11506+
projection:
11507+
$ref: "#/components/schemas/PointPlotProjection"
11508+
query:
11509+
$ref: "#/components/schemas/DataProjectionQuery"
11510+
request_type:
11511+
$ref: "#/components/schemas/DataProjectionRequestType"
11512+
required:
11513+
- request_type
11514+
- query
11515+
- projection
11516+
type: object
1134111517
PowerpackTemplateVariableContents:
1134211518
description: Powerpack template variable contents.
1134311519
properties:
@@ -25604,6 +25780,7 @@ components:
2560425780
- $ref: "#/components/schemas/MonitorSummaryWidgetDefinition"
2560525781
- $ref: "#/components/schemas/NoteWidgetDefinition"
2560625782
- $ref: "#/components/schemas/PowerpackWidgetDefinition"
25783+
- $ref: "#/components/schemas/PointPlotWidgetDefinition"
2560725784
- $ref: "#/components/schemas/QueryValueWidgetDefinition"
2560825785
- $ref: "#/components/schemas/RetentionCurveWidgetDefinition"
2560925786
- $ref: "#/components/schemas/RunWorkflowWidgetDefinition"

docs/datadog_api_client.v1.model.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,20 @@ datadog\_api\_client.v1.model.dashboard\_type module
676676
:members:
677677
:show-inheritance:
678678

679+
datadog\_api\_client.v1.model.data\_projection\_query module
680+
------------------------------------------------------------
681+
682+
.. automodule:: datadog_api_client.v1.model.data_projection_query
683+
:members:
684+
:show-inheritance:
685+
686+
datadog\_api\_client.v1.model.data\_projection\_request\_type module
687+
--------------------------------------------------------------------
688+
689+
.. automodule:: datadog_api_client.v1.model.data_projection_request_type
690+
:members:
691+
:show-inheritance:
692+
679693
datadog\_api\_client.v1.model.delete\_shared\_dashboard\_response module
680694
------------------------------------------------------------------------
681695

@@ -3441,6 +3455,69 @@ datadog\_api\_client.v1.model.point module
34413455
:members:
34423456
:show-inheritance:
34433457

3458+
datadog\_api\_client.v1.model.point\_plot\_dimension module
3459+
-----------------------------------------------------------
3460+
3461+
.. automodule:: datadog_api_client.v1.model.point_plot_dimension
3462+
:members:
3463+
:show-inheritance:
3464+
3465+
datadog\_api\_client.v1.model.point\_plot\_projection module
3466+
------------------------------------------------------------
3467+
3468+
.. automodule:: datadog_api_client.v1.model.point_plot_projection
3469+
:members:
3470+
:show-inheritance:
3471+
3472+
datadog\_api\_client.v1.model.point\_plot\_projection\_dimension module
3473+
-----------------------------------------------------------------------
3474+
3475+
.. automodule:: datadog_api_client.v1.model.point_plot_projection_dimension
3476+
:members:
3477+
:show-inheritance:
3478+
3479+
datadog\_api\_client.v1.model.point\_plot\_projection\_type module
3480+
------------------------------------------------------------------
3481+
3482+
.. automodule:: datadog_api_client.v1.model.point_plot_projection_type
3483+
:members:
3484+
:show-inheritance:
3485+
3486+
datadog\_api\_client.v1.model.point\_plot\_widget\_definition module
3487+
--------------------------------------------------------------------
3488+
3489+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition
3490+
:members:
3491+
:show-inheritance:
3492+
3493+
datadog\_api\_client.v1.model.point\_plot\_widget\_definition\_type module
3494+
--------------------------------------------------------------------------
3495+
3496+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_definition_type
3497+
:members:
3498+
:show-inheritance:
3499+
3500+
datadog\_api\_client.v1.model.point\_plot\_widget\_legend module
3501+
----------------------------------------------------------------
3502+
3503+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend
3504+
:members:
3505+
:show-inheritance:
3506+
3507+
datadog\_api\_client.v1.model.point\_plot\_widget\_legend\_type module
3508+
----------------------------------------------------------------------
3509+
3510+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_legend_type
3511+
:members:
3512+
:show-inheritance:
3513+
3514+
datadog\_api\_client.v1.model.point\_plot\_widget\_request module
3515+
-----------------------------------------------------------------
3516+
3517+
.. automodule:: datadog_api_client.v1.model.point_plot_widget_request
3518+
:members:
3519+
:show-inheritance:
3520+
34443521
datadog\_api\_client.v1.model.powerpack\_template\_variable\_contents module
34453522
----------------------------------------------------------------------------
34463523

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"""
2+
Create a new dashboard with point_plot widget
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.data_projection_query import DataProjectionQuery
10+
from datadog_api_client.v1.model.data_projection_request_type import DataProjectionRequestType
11+
from datadog_api_client.v1.model.point_plot_dimension import PointPlotDimension
12+
from datadog_api_client.v1.model.point_plot_projection import PointPlotProjection
13+
from datadog_api_client.v1.model.point_plot_projection_dimension import PointPlotProjectionDimension
14+
from datadog_api_client.v1.model.point_plot_projection_type import PointPlotProjectionType
15+
from datadog_api_client.v1.model.point_plot_widget_definition import PointPlotWidgetDefinition
16+
from datadog_api_client.v1.model.point_plot_widget_definition_type import PointPlotWidgetDefinitionType
17+
from datadog_api_client.v1.model.point_plot_widget_request import PointPlotWidgetRequest
18+
from datadog_api_client.v1.model.widget import Widget
19+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
20+
21+
body = Dashboard(
22+
title="Example-Dashboard",
23+
layout_type=DashboardLayoutType.ORDERED,
24+
widgets=[
25+
Widget(
26+
definition=PointPlotWidgetDefinition(
27+
title="",
28+
title_size="16",
29+
title_align=WidgetTextAlign.LEFT,
30+
type=PointPlotWidgetDefinitionType.POINT_PLOT,
31+
requests=[
32+
PointPlotWidgetRequest(
33+
request_type=DataProjectionRequestType.DATA_PROJECTION,
34+
query=DataProjectionQuery(
35+
query_string="service:web-store",
36+
data_source="logs",
37+
),
38+
projection=PointPlotProjection(
39+
type=PointPlotProjectionType.POINT_PLOT,
40+
dimensions=[
41+
PointPlotProjectionDimension(
42+
column="host",
43+
dimension=PointPlotDimension.GROUP,
44+
),
45+
PointPlotProjectionDimension(
46+
column="@duration",
47+
dimension=PointPlotDimension.Y,
48+
),
49+
],
50+
),
51+
),
52+
],
53+
),
54+
),
55+
],
56+
)
57+
58+
configuration = Configuration()
59+
with ApiClient(configuration) as api_client:
60+
api_instance = DashboardsApi(api_client)
61+
response = api_instance.create_dashboard(body=body)
62+
63+
print(response)

0 commit comments

Comments
 (0)